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

Extra Fields

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

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default Extra Fields

I need more than 10 extra fields.

I need about 20 extra fields altogether.

I learn this limitation the hard way.

I created all the fields, filled them with data and poof half of the data dissapeared.

Can you please help,

Thank you so kindly

John
Reply With Quote
  #2  
Old 04-03-2003, 11:44 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

http://forum.x-cart.com/viewtopic.php?t=1356&highlight=extrafields
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 04-04-2003, 08:18 AM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default Thanks

Thanks

I searched and searched the forums but for some reason I coulndnt find a post about this subject. Thanks for the link
Reply With Quote
  #4  
Old 04-05-2003, 10:06 AM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default Here is the info from the other post for anyone looking.

Here is the info from the other post for anyone looking.

You'll need to adjust include/product_modify.php:

Code:
Code:
# # Update product data # db_query("update $sql_tbl[products] set product='$product', categoryid='$categoryid', categoryid1='$categoryid1', categoryid2='$categoryid2', categoryid3='$categoryid3', brand='$brand', model='$model', descr='$descr', fulldescr='$fulldescr', avail='$avail', discount='$discount', weight='$weight', productcode='$productcode', forsale='$forsale', distribution='$distribution', free_shipping='$free_shipping', shipping_freight='$shipping_freight', discount_avail='$discount_avail', min_amount='$min_amount', param00='$param00', param01='$param01', param02='$param02', param03='$param03', param04='$param04', param05='$param05', param06='$param06', param07='$param07', param08='$param08', param09='$param09', low_avail_limit='$low_avail_limit', vat='$vat' where productid='$productid'");



notice the param's.

Also edit include/func.php:

The clone function (func_clone_product($pid)):
You should see:

Code:

Code:
db_query("INSERT INTO $sql_tbl[products] (productcode, product, provider, brand, model, distribution, weight, categoryid, categoryid1, categoryid2, categoryid3, discount, descr, fulldescr, avail, forsale, add_date, image_x, image_y, shipping_freight, free_shipping, discount_avail, param00, param01, param02, param03, param04, param05, param06, param07, param08, param09, min_amount, dim_x, dim_y, dim_z, low_avail_limit, orderby, vat) VALUES ('".addslashes($product[productcode])."', '".addslashes($product[product])."', '".addslashes($product[provider])."', '".addslashes($product[brand])."', '".addslashes($product[model])."', '".addslashes($product[distribution])."', '$product[weight]', '$product[categoryid]', '$product[categoryid1]', '$product[categoryid2]', '$product[categoryid3]', '$product[discount]', '".addslashes($product[descr])."', '".addslashes($product[fulldescr])."', '$product[avail]', '$product[forsale]', '".time()."', '$product[image_x]', '$product[image_y]', '$product[shipping_freight]', '$product[free_shipping]', '$product[discount_avail]', '".addslashes($product[param00])."', '".addslashes($product[param01])."', '".addslashes($product[param02])."', '".addslashes($product[param03])."', '".addslashes($product[param04])."', '".addslashes($product[param05])."', '".addslashes($product[param06])."', '".addslashes($product[param07])."', '".addslashes($product[param08])."', '".addslashes($product[param09])."', '$product[min_amount]', '$product[dim_x]', '$product[dim_y]', '$product[dim_z]', '$product[low_avail_limit]', '$product[orderby]', '$product[vat]')");
Boomer said, "again note the param's. I'm looking for the INSERT instead of the update/clone functions, but so far I've not found them so if your inserting a new product, you may have to dig around to find where the INSERT mysql query is so that you can adjust it accordingly as well. "
Reply With Quote
  #5  
Old 04-09-2003, 12:23 AM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default Still

Ive spent many hours on this one here. Got it working to a point but not completely. Really need this feature. There must be somthing that I'm missing here. I did all the stuff from Boomers posts. But it wont update the data. If I go into the sql server I can change the data there and it will show up live. But if I use product_modify.tpl then the data dissapears again.
Reply With Quote
  #6  
Old 04-15-2003, 01:30 PM
 
moortown moortown is offline
 

Newbie
  
Join Date: Mar 2003
Posts: 2
 

Default Same Thing

I'm having the same problem. Can anybody help out with this?
Reply With Quote
  #7  
Old 04-16-2003, 06:05 AM
 
moortown moortown is offline
 

Newbie
  
Join Date: Mar 2003
Posts: 2
 

Default EUREKA! Extra Fields

I figured it out...

Do everything posted in this thread before, but wherever a param is listed that is 10 or above insert a 0 before the 10.

Example in product_modify.tpl:

{elseif %field.index% eq 10}{$product.param010|escape}

Hope this helps!
Reply With Quote
  #8  
Old 04-16-2003, 06:56 AM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default Cool

Will try what you suggest.

I kinda took a break from this mod since my last post.
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:10 PM.

   

 
X-Cart forums © 2001-2020