Thread: Extra Fields
View Single Post
  #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