Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Pass self-created form fields from products to order form.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-30-2003, 06:45 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default Pass self-created form fields from products to order form.

Hi everyone.

We've created a section for custom clothings, adding 14 measurement fields to some of our products using {if/else} rules. They display correctly in the template. The problem for me now is, how do I bring these extra values into the order form, and succeedngly the emails sent to us and the customers?

Any insights to this problem is greatly appreciated!
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #2  
Old 03-31-2003, 12:36 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Wouldn't product options be used for such?
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 04-01-2003, 01:17 AM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

Hello Boomer.

We only have about 20 custom-tailored items in 1 category, so I didn't really want to run extra sql queries to lag out the site. Once customers gos into .php mode, our site will feel a little bit sluggish.

But still, would product options be better for it anyway?

If it's not too complicated to pass extra "non-param" "non product options" to the cart, then email notifications, I'd like to try it out.
But I'm open to suggestions!

*EDIT* I remember why I would want to do that now, because we have 16 fields for the page, and for each field, we have 10-36 dropdown options(eg 6'0", 6'1", ...6'5"...6'11"...). That would result in a very big sql data for us, even if it's only for 20 items. I guess I'm a minimalist, trying to keep things tight and tidy....
Unless if we can store smarty codes in the product options field itself? Then I can store a section loop to generate those numbers and save space..
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #4  
Old 04-06-2003, 05:22 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

Just looking for pointers to pass self-created form fields to the check out process if possible. Do I have to use {assign var=xxx}, cache it, and pass it to the checkout process? If anyone can give me some pointers, I'd be grateful!
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #5  
Old 04-07-2003, 07:53 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

You'll need to add additional fields to the orders_details table in your database, then make adjustments accordingly to your php files mainly include/func.php func_place_order(); As well as to your TPL files to reflect the new additions.

hth.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #6  
Old 04-10-2003, 12:19 PM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

Sounds like you just want to add a product options pull-down menu under the specific product options. This would be way easier, more efficient (no extra sql calls) and it will automatically pass the options to your order data so it's included in the email receipt. It's very easy if you just follow the javascript example included in the admin product modification interface. We did this with some state-specific products to allow users to specify which version/state they need. You can see this here:

http://www.realestate-school.com/online-store/customer/product.php?productid=40

Just try adding to cart without selecting a state and see what happens. This javascript was all added as a product option for the specific product and is stored in the database with the product. Works great for us and required no cart mods.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote
  #7  
Old 04-10-2003, 07:51 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

Well actually, I didn't really want to use product options at all, because the x-cart team did a mod for us for multi-options. I really don't want to coplicate the provider team in my company with modification hassle, and to reduce the load on the SQL, since those <select> options will forever not change.

Right now I'm doing it with product options. It's a lot more work for the provider lads, but at the moment I can't think of a better way. Boomer's logic sounds logical, but with my amount of workload, I'll have to push it down my to-do list. If I do get it to work in the future, I'll definitely post it!

BTW your method would have been fantastic too MinorGod. Wish I'd thought of that earlier.

P.S. here's a link to how ours work atm.
http://goodorient.he.net/~jameslam/xcart/customer/product.php?productid=24627&cat=431&page=1

Thanks for all your help everyone. Got this sorted out at the short moment.
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:26 AM.

   

 
X-Cart forums © 2001-2020