News:

Looking for documentation? Take a look on our wiki

Main Menu

Stock management problem (main product with childs products)

Started by toonetcreation, June 13, 2012, 10:45:12 AM

Previous topic - Next topic

toonetcreation

Hello,

I don't know if this is an issue or not, but when I add a product (with a stock level = 15 for example) + 3 childs products (1 for size S, 1 for size M, 1 for size L) with a specific stock level for each size, the main stock (level=15) does not decrease when a user place an order. Only the stock for each size decrease.

Someone has an idea to solve this problem?

Thanks in advance
Laurent

Willc

This file may will sove the problem.
Extract and replace:
administrator/components/com_virtuemart/models/product.php


Dont forget to backup your unmodified files before overwrite.



[attachment cleanup by admin]

toonetcreation

#2
Thank you for your help.
I have tried to replace this file and I have made a test with a new order.

Context:

- I have added 1 main product + 2 childs products

- child product A in stock = 8 + child product B in stock = 5, so main product total in stock = 13

Results:

- the main product stock level decrease correctly when a new order is placed -> OK

- I try to edit the main product (through the BACK END) in components -> VirtueMart -> Products -> "My main product" and when I save the changes (with save button or save & close button), the stock level in Product Status tab is systematically multiplied by itself-> why ?

- If I go to Custom fields tab (on the main product), I can see the current stock level for childs products (see attached file called stock_custom_fields.png). But If I go to the child product information page, in Product status tab, the stock level is not displayed and I can't change it (see attached file called stock_child_product.png). If I try to add a new number and if I save, a message is displayed that changes are successfully saved but the number into the In stock field disappears. I have to go to the main product information page then Custom fields tab to see the child product stock increasing -> why ?

[attachment cleanup by admin]

uschmi

Just the same problem for me: when adding a stock number and saving, the stock disappears...
Joomla 2.5.4 + VM 2.0.6 + modification above

toonetcreation