Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Thanks Kuroi, I think I get the basic ideas now:
1. first we need to get the attribute id by using the products_id, option name and value (we dont want to use option id here for a specific reason) from the orders_products_attributes table
2. then we need to check if the TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK exists (in case users are not using this mod), if it is we check if the stock info for that attribute is there. If not, we then assuming it is using the product stock instead.
3. the problem is with product associated with multiple attributes tho. Since my test site is not using any product with more than 1 attribute, I dont know how it is stored in TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK and orders_products_attributes tables.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Bookmarks