Jump to content

In which table do they put the combination Qty's?


PascalVG

Recommended Posts

Hi El Patron,

Thanks for quick reply.

 

That's indeed what I expected, but they are all 0 ...  :unsure:

 

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

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

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

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

  • 2 years later...

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 by fletsky (see edit history)
Link to comment
Share on other sites

  • 3 years later...
  • 1 year later...
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...