Hi,
I want to know how to show product_in_stock in cart ?
I know how to show in category ($product->product_in_stock) & product details ($this->product->product_in_stock).
Greets!
assume would have to get the product model in the template and use one of the functions to return each prodid's parameters
They aren't there as standard - just the cart object
or a query on each prodid to get the stock
Quote from: GJC Web Design on July 31, 2014, 21:45:12 PM
assume would have to get the product model in the template and use one of the functions to return each prodid's parameters
They aren't there as standard - just the cart object
or a query on each prodid to get the stock
Thanks for your answer.
Yes I think you're right because cart object didn't gave me the correct value but I don't know how to get product model.
something like (haven't tried this)
$productModel = VmModel::getModel('Product');
then in the loop of the default_pricelist.php
$singleproduct = $productModel->getProductSingle ($virtuemart_product_id = $prow->cart_item_id, $front = TRUE, $quantity = 1,$customfields=TRUE,$virtuemart_shoppergroup_ids=0)
stock (maybe ) is $singleproduct->product_in_stock;
Quote from: GJC Web Design on July 31, 2014, 22:39:25 PM
something like (haven't tried this)
$productModel = VmModel::getModel('Product');
then in the loop of the default_pricelist.php
$singleproduct = $productModel->getProductSingle ($virtuemart_product_id = $prow->cart_item_id, $front = TRUE, $quantity = 1,$customfields=TRUE,$virtuemart_shoppergroup_ids=0)
stock (maybe ) is $singleproduct->product_in_stock;
Thanks for your help!! it works very good!!
Greets from Argentina.