PDA

View Full Version : help with showing stock on products_attribute.php



blackhawk
10-29-2009, 01:12 PM
does anyone know of a way we can add a stock column to products_attribute.php? I tried to replace the following....



$attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name";
with....



$attributes = "select * from ".TABLE_PRODUCTS_STOCK." ps, " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name";
But when i go to edit a particular attribute it jacks up my code by duplicating each attribute ID in edit mode. Should there be a UNION in my sql?

OR does someone know of a way to set the default attribute stock level to a value other than 0?
I tried modifying the database table, products_stock, for the field products_stock_quantity to something other than 0 as the default, but that didn't do it.

Any thoughts to this?