Hello,
I have an e-shop with clothes. I have created parent products (eg dress) and children products for the different sizes.
I am connecting them with the multi variant custom field.
My problem is that when a child gets ordered, the parent stock is not updated.
eg. The parent has in stock 6 and every child has 2 (3 children). If one of the children is ordered, its stock get decreased but the parent stock is not affected.
I want the parent stock to change every time a child's stock changes. I need it this way because my client wants to check her inventory and know how many products are available.
Versions
Joomla! 3.9.24
VirtueMart 3.6.10 10211
php 7.3
Thank you in advance.
You would need a plugin to do this...
would need to be written as I know of none available
Confirm
But because we have import products online from 3 supliers and synchronize stock with ERP online too, then we don't have plugin, but custom solution with OPC from Rupostel call by CLI cron :)
Hello,
Unfortunatelly we can't afford buying a plugin right now, but I am thinking of a workaround.
I am thinking of changing the sql query that updates the child stock to also update the parent stock. Could someone tell me where I can find the sql query that updates the product stock when an item is bought?
Thanks again