Virtuemart 3.2.14-official fatal error found

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

Virtuemart 3.2.14-official fatal error found

Postby admin » Thu May 31, 2018 3:42 pm

within the very latest official vm3.2.14 there is a bug in cart helper file which can be seen when returning from paypal, or when paypal does IPN to your site. this could be related to any other plugin that returns from the payment gateway with order status information and clear the cart afterwards.

the conent of the error is
Code: Select all plg_system_fatal_catcher plugin detected a problem with your site.
Your site caused a blank screen upon a visit of this URL:


Error message data:
1 Class 'CouponHelper' not found in file: /components/com_virtuemart/helpers/cart.php line: 1300

timestamp: 2018-05-30T18:04:48+00:00

To disable these emails proceed to your Extensions -> Plug-in manager -> disable plg_system_fatal_catcher
It is very important that you fix all php fatal errors on your site. Resend this email to your developer.

#0 /components/com_virtuemart/helpers/cart.php(1281): VirtueMartCart::emptyCartValues(Object(VirtueMartCart))
#1 /plugins/vmpayment/paypal/paypal.php(717): VirtueMartCart->emptyCart()
#2 /libraries/joomla/event/event.php(70): plgVmPaymentPaypal->plgVmOnPaymentResponseReceived('<br />\n<table>\n...', 'Vielen Dank f\xC3\xBC...')
#3 /libraries/joomla/event/dispatcher.php(160): JEvent->update(Array)
#4 /components/com_virtuemart/controllers/vmplg.php(71): JEventDispatcher->trigger('plgvmonpaymentr...', Array)
#5 /components/com_virtuemart/controllers/vmplg.php(53): VirtueMartControllerVmplg->PaymentResponseReceived()
#6 /libraries/src/MVC/Controller/BaseController.php(710): VirtueMartControllerVmplg->pluginResponseReceived()
#7 /components/com_virtuemart/virtuemart.php(126): Joomla\CMS\MVC\Controller\BaseController->execute('pluginresponser...')
#8 /libraries/src/Component/ComponentHelper.php(382): require_once('/home/arjenw79/...')
#9 /libraries/src/Component/ComponentHelper.php(357): Joomla\CMS\Component\ComponentHelper::executeComponent('/home/arjenw79/...')
#10 /libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_virtuemart')
#11 /libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch()
#12 /libraries/src/Application/CMSApplication.php(195): Joomla\CMS\Application\SiteApplication->doExecute()
#13 /index.php(49): Joomla\CMS\Application\CMSApplication->execute()
#14 {main}

to fix the fatal error you need to updated you /components/com_virtuemart/helpers/cart.php

find this function and replace the content with:

Code: Select all
static public function emptyCartValues(&$cart, $session = true){

      //if we used a coupon, we must set it in final use now
      $couponCode = '';
         $couponCode = $cart->couponCode;
      } else if(!empty($cart->cartData['couponCode'])){
         $couponCode = $cart->cartData['couponCode'];
         if (!class_exists('CouponHelper')) {
            require(VMPATH_SITE . DS . 'helpers' . DS . 'coupon.php');
         CouponHelper::setInUseCoupon($couponCode, true, 1);

      //We delete the old stuff
      $cart->products = array();
      $cart->cartProductsData = array();
      $cart->cartData = array();
      $cart->cartPrices = array();
      $cart->cartfields = array();
      $cart->_inCheckOut = false;
      $cart->_dataValidated = false;
      $cart->_confirmDone = false;
      $cart->couponCode = '';
      $cart->order_language = '';
      $cart->virtuemart_shipmentmethod_id = 0; //OSP 2012-03-14
      $cart->virtuemart_paymentmethod_id = 0;
      $cart->_fromCart = false;
      $cart->_inConfirm = false;
      $cart->virtuemart_order_id = false;
      $cart->layout = VmConfig::get('cartlayout','default');

i hope this heps anybody.

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

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