PascalVG Posted September 7, 2013 Share Posted September 7, 2013 Hi all, Small question. Does anyone know by any chance where they store the product combination quantities. They combine it in the ps_stock_available->quantity, but where are the separate values stored? Probably overlook them somewhere... Example, what I mean: http://i.imgur.com/ic2UyRl.jpg Thx, pascal Link to comment Share on other sites More sharing options...
El Patron Posted September 7, 2013 Share Posted September 7, 2013 check ps_product_attribute it has the quantity per product attribute 1 Link to comment Share on other sites More sharing options...
PascalVG Posted September 7, 2013 Author Share Posted September 7, 2013 Hi El Patron, Thanks for quick reply. That's indeed what I expected, but they are all 0 ... Link to comment Share on other sites More sharing options...
El Patron Posted September 7, 2013 Share Posted September 7, 2013 Hi El Patron, Thanks for quick reply. That's indeed what I expected, but they are all 0 ... sounds like that is not what you were hoping for. are you using native ps, i.e. no 3rd party module for combinations? be careful, combinations will drive you insane... Link to comment Share on other sites More sharing options...
PascalVG Posted September 7, 2013 Author Share Posted September 7, 2013 Yep, test site with default/standard 1.5.4.1. (It was actually to help someone with a trigger to check if product quantity >0. If not, deactivate the product. Normally ps_stock_available will do, but was wondering if stock for separate combinations would need enhancement of the sql statement...) pascal Link to comment Share on other sites More sharing options...
PascalVG Posted September 7, 2013 Author Share Posted September 7, 2013 Yes, I also saw Vekia's tutorial about it: http://mypresta.eu/en/art/tips-and-tricks/how-to-disable-out-of-stock-product.html But didn't really see the combinations-adjustment in it. Then again, maybe it shouldn't disable as long as there's ANY combination still available... probably not... Anyway, was wondering where they keep those values in the database. For some strange reason not in ps_product_attribute, as I also expected it to be :-( Link to comment Share on other sites More sharing options...
PascalVG Posted September 7, 2013 Author Share Posted September 7, 2013 Yep, doesn't take that into account. (Although I expect that when people want to disable the product when out of stock, that they don't have the "allow orders when out of stock" option set to ON anyway, as this contradicts the purpose...) But indeed, it's a very basic maintenance trigger, not for every one sufficient. Thanks for your input! pascal Link to comment Share on other sites More sharing options...
fletsky Posted February 14, 2016 Share Posted February 14, 2016 (edited) Hello,I know it's pretty old post, but i stumbled at the same problem today.Since some answers are deleted from this topic i would like to ask if someone know which table contain individual combination quantities. As mentioned before the "ps_stock_available" contains sum of all combinations and "ps_product_attribute" shows always 0 even if the qty is higher. Waiting for your answer guys. Im sorry again it is in "ps_stock_available" it just didn't show up or i just sorted wrong. Edited February 14, 2016 by fletsky (see edit history) Link to comment Share on other sites More sharing options...
leozao Posted April 3, 2019 Share Posted April 3, 2019 Hello, I have the same problem, i don't find in what table PS is keeping the quantity per combination. Has there anybody an answer for this ? Thank you, Link to comment Share on other sites More sharing options...
leozao Posted April 3, 2019 Share Posted April 3, 2019 yes, it seems to be in ps_stock_available ... Link to comment Share on other sites More sharing options...
taradda13 Posted January 2, 2021 Share Posted January 2, 2021 On 4/3/2019 at 9:58 PM, leozao said: yes, it seems to be in ps_stock_available ... all quantities are within this table. for products with combinations you have to match. the first line of the product indicates the total quantities. from the second line on, there are the quantities of each combination, I suggest you do a JOIN to get the text / name of the combination of the ID Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now