X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Extra Fields (https://forum.x-cart.com/showthread.php?t=2149)

John7 04-03-2003 11:06 PM

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

B00MER 04-03-2003 11:44 PM

http://forum.x-cart.com/viewtopic.php?t=1356&highlight=extrafields

John7 04-04-2003 08:18 AM

Thanks
 
Thanks

I searched and searched the forums but for some reason I coulndnt find a post about this subject. Thanks for the link

John7 04-05-2003 10:06 AM

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. "

John7 04-09-2003 12:23 AM

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.

moortown 04-15-2003 01:30 PM

Same Thing
 
I'm having the same problem. Can anybody help out with this?

moortown 04-16-2003 06:05 AM

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!

John7 04-16-2003 06:56 AM

Cool
 
Will try what you suggest.

I kinda took a break from this mod since my last post.


All times are GMT -8. The time now is 01:41 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.