PDA

View Full Version : Easy Populate & QTpro



michael_s
02-05-2008, 08:12 PM
In my case when I tried to add a new stock-tracked attribute I would get an error regarding the # of fields in the products_stock table. This is due to the modifications to the table that the original instructions ask you to do.

In order to resolve this you need to do a search for the word "insert" in the file /admin/stock.php

Once you find it replace

tep_db_query("insert into " . TABLE_PRODUCTS_STOCK . " values (0," . (int)$VARS['product_id'] . ",'$val'," . (int)$VARS['quantity'] . ")");


WITH:

tep_db_query("insert into " . TABLE_PRODUCTS_STOCK . " (
`products_stock_id` ,
`products_id` ,
`products_stock_attributes` ,
`products_stock_quantity` ,
`st_item_number`
)values (0," . (int)$VARS['product_id'] . ",'$val'," . (int)$VARS['quantity'] . "," . (int)$VARS['product_id'] . ")");
}


More... (http://addons.oscommerce.com/info/5411)