News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Stockable Plugin and stock quantity

Started by fgozar, August 29, 2014, 12:09:49 PM

Previous topic - Next topic

fgozar

Hi,
i'm using Joomla 2.5.22 and Vm 2.6.6 and I have a questions on stockable plugin and stock quantity of parent product and its childs variants.
How to set stock quantity for product and for its childs? how it work together?

My target is: Parent product is not orderable but only it child variant, so I set parent stock =0 and for each childs its stock quantity.
Problem: When add child to cart  quantity check is make on parent end not on child product

I am confused, I'm wrong using plugin or it's bug code?

I suppose that this behavior derived from:

FILE: car.php

private function checkForQuantities($product, &$quantity=0,&$errorMsg ='') {
...
// update the stock info from the database
$product_model = VmModel::getModel('product');
$product = $product_model->getProduct($product->virtuemart_product_id);
...
}



I can temporaly fix it commenting previous line, but I lost it next update.

Another questions is:
how plugin interact with stockandle parameter {disableadd, risetime, etc} relative at product and it child
My target is: Notify me when product(child) is out of stock

cborja

Hello , I have the same problem you described in :
http://forum.virtuemart.net/index.php?topic=125455.0

I have disclosed several weeks trying to fix the problem,  :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'( :'(

How did you find a solution ?

fgozar

Hi cborja,
I resolved implementing my personal vmcustom plugin (automatically generate all combination, with friendly interface to enable/disable variant, price and quantity )
and with some fix on VM core file.

1 Patch on addJs of cart.php to show right message.
2 Patch on checkForQuantities method of helper cart.php
3 Patch on plgVmOnAddToCart of vmcustom.php to check quantity e show appropriate message.

Then this is not clean solution becouse I must apply patch every update to VM.