limor01 Posted December 5, 2004 Posted December 5, 2004 Hello Dear Developers, After 2 years of using oscommerce and 30 times of trying to work with qtpro I have a suggestion (someone had probably thought about before me). All stock will be handled in stock.php using the same code that QTPRO uses but use only product_stock table even for regular products. stock.php in admin already handles the actual stock and attribute manipulation and it contains products_stock_id products_id products_stock_attributes products_stock_quantity changes needed in product_info.php put into a listbox in all records that fit the product_id with data as stock_id build a new listbox SELECT products_stock_id, products_stock_attributes WHERE products_id=XXX and products_stock_quantity>0. option_string = Translate_attributes_to_names(products_stock_attributes) for example if you are dealing with color/size attributes get one list box by the name "Size/Color" id(A) - XS green id(B) - XL blue id( c ) - SM red id(D) - SM blue for example if you are dealing with diameter/length/weight attributes get one list box by the name "Size/Color" id(A) - 32mm - 39cm- 32grams: id(B) - 31mm - 21cm- 12grams id (c )- 39mm - 39cm- 14grams id(D) - 35mm - 34cm- 17grams add hidden data for actual stock and check with javascript the quantity on hand with the quantity that the customer wants. on checkout_process.php decrement the stock according to products_stock_id 1. check if stock is still valid 2. UPDATE products_stock SET products_stock_quantity = products_stock_quantity - ($QUANTITY_ON_ORDER) WHERE products_stock_id=(A/B/C/D). Do i miss something? Cheers, D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.