If you'd like your message of "product quantity updated" to be shown at the cart page (with our opc or without) you may want to do this core modification until it's fixed within VM core:
\components\com_virtuemart\controllers\cart.php
updated function:
- Code: Select all
public function updatecart($html=true){
$cart = VirtueMartCart::getCart();
$cart->_fromCart = true;
$cart->_redirected = false;
if(vRequest::get('cancel',0)){
$cart->_inConfirm = false;
}
if($cart->getInCheckOut()){
vRequest::setVar('checkout',true);
}
$cart->saveCartFieldsInCart();
$updated = $cart->updateProductCart();
$coupon_code = trim(vRequest::getString('coupon_code', ''));
if(!empty($coupon_code)){
$cart->prepareCartData();
$msg = $cart->setCouponCode($coupon_code);
if($msg) vmInfo($msg);
}
$cart->selected_shipto = vRequest::getVar('shipto', -1);
if(empty($cart->selected_shipto) or $cart->selected_shipto<1){
$cart->STsameAsBT = 1;
$cart->selected_shipto = 0;
} else {
$cart->STsameAsBT = 0;
}
$cart->setShipmentMethod(false,!$html);
$cart->setPaymentMethod(false,!$html);
if ($html) {
if ($updated)
JFactory::getApplication()->enqueueMessage(JText::_('COM_VIRTUEMART_PRODUCT_UPDATED_SUCCESSFULLY'));
else
JFactory::getApplication()->enqueueMessage(JText::_('COM_VIRTUEMART_PRODUCT_NOT_UPDATED_SUCCESSFULLY'), 'error');
$this->display();
} else {
$json = new stdClass();
ob_start();
$this->display ();
$json->msg = ob_get_clean();
echo json_encode($json);
jExit();
}
}
at the moment we do not plan to fix this from within opc because we believe it will soon get fixed in VM core.
best regards, stan, rupostel.com