hello, this is a bug in virtuemart, you may need to comment 2 lines in cart.php code:
\components\com_virtuemart\helpers\cart.php
original code:
- Code: Select all
public function updateProductCart() {
$quantities = vRequest::getInt('quantity');
if(empty($quantities)) return false;
$updated = false;
foreach($quantities as $key=>$quantity){
if (isset($this->cartProductsData[$key]) and !empty($quantity) and !isset($_POST['delete_'.$key])) {
if($quantity!=$this->cartProductsData[$key]['quantity']){
$this->cartProductsData[$key]['quantity'] = $quantity;
$updated = true;
vmInfo('COM_VIRTUEMART_PRODUCT_UPDATED_SUCCESSFULLY');
}
} else {
unset($this->cartProductsData[$key]);
vmInfo('COM_VIRTUEMART_PRODUCT_REMOVED_SUCCESSFULLY');
$updated = true;
}
}
$this->setCartIntoSession(true);
return $updated;
}
and change it to:
- Code: Select all
public function updateProductCart() {
$quantities = vRequest::getInt('quantity');
if(empty($quantities)) return false;
$updated = false;
foreach($quantities as $key=>$quantity){
if (isset($this->cartProductsData[$key]) and !empty($quantity) and !isset($_POST['delete_'.$key])) {
if($quantity!=$this->cartProductsData[$key]['quantity']){
$this->cartProductsData[$key]['quantity'] = $quantity;
$updated = true;
}
} else {
unset($this->cartProductsData[$key]);
$updated = true;
}
}
$this->setCartIntoSession(true);
return $updated;
}
it's not acceptable that virtuemart prints those messages from within cart helper file instead of the joomla's controller since the function can be used by any autoreload / load / gift or other plugins manipulating the cart.
we'll be considering not to use this function if the messages don't get removed from the core.
best regards, stan