Hello, I am running virtuemart 3.0.0 on a joomla 2.5.27 and is the first time I create an online store... so far so good but now I have this issue is when a product is in cart and I want to increase the number of units to buy, lets say from 1 to 2 the quantity stay the same and give this error:
warning: Invalid argument supplied for foreach() in /home/content/xx/xxx/html/xxxx/components/com_virtuemart/helpers/cart.php on line 720
on this line I have this and really dont know what to do here:
foreach($quantities as $key=>$quantity){
if (isset($this->cartProductsData[$key]) and !empty($quantity) and !isset($_POST['delete_'.$key])) {
if($quantity!=$this->cartProductsData[$key]['quantity']){
$productModel = VmModel::getModel('product');
$product = $productModel -> getProduct($this->cartProductsData[$key]['virtuemart_product_id'], $quantity);
if ($this->checkForQuantities($product, $quantity)) {
$this->cartProductsData[$key]['quantity'] = $quantity;
$updated = true;
}
}
} else {
//Todo when quantity is 0, the product should be removed, maybe necessary to gather in array and execute delete func
unset($this->cartProductsData[$key]);
$updated = true;
}
}
Any help much appreciate!
Please try 3.0.2 ( http://dev.virtuemart.net/projects/virtuemart/files )
thank you