Product Quantity Updated Message Missing on Virtuemart 3

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Product Quantity Updated Message Missing on Virtuemart 3

Postby admin » Thu Feb 05, 2015 4:42 pm

Hello, VM3.0.4 (and around) removed a few messages that are shown at the cart page.

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
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Product Quantity Updated Message Missing on Virtuemart 3

Postby blackcomm.1@.....com » Thu Feb 05, 2015 7:41 pm

Thanks a lot, Stan

This is a good begining. Not a complete solution, but a begining.

When using this fix, when you reaches the maximum quantity, no about message informing is displayed. Appears a message with "CART UPDATED SUCCESSFULLY". This message should be "MAXIMUM QUANTITY REACHED". But is a good solution until VM Team solves this issue.

Thanks a lot!
-------------------------------
http://www.cuidadicos.es
blackcomm.1@.....com
 
Posts: 38
Joined: Thu Nov 21, 2013 12:31 am

Re: Product Quantity Updated Message Missing on Virtuemart 3

Postby admin » Fri Feb 06, 2015 12:35 pm

hello, you are right, but i didn't want to copy another function from VM and create a new logic for this, so i reported the bug to VM team and Max (vm team leader) said he already implemented positive messages into this part of the code, so once i get to the very latest vm build, i will let you know what's the core implementation of this.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x