Add to cart not working VM 4.0.2 when popup disabled

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

Add to cart not working VM 4.0.2 when popup disabled

Postby online2000 » Mon Dec 12, 2022 5:50 pm

Po aktualizaci z VM 4.0.2. na novější se objevuje problém s vložením zboží do košíku.
Když je zapnuté "Přidat do košíku v popup okně" vše funguje jak má, ale pokud není zapnuté vkládání přes popup okno, tak se zboží do košíku nenačte.
Používám Joomla! 3.10.11. a com_onepage2.0.432
Je nějaké řešení tohoto problému?
Předem děkuji za radu.
online2000
 
Posts: 1
Joined: Fri Jan 07, 2022 11:10 pm

Re: Produkt se nepřidává do košíku po aktualizaci z VM 4.0.2.

Postby admin » Tue Dec 13, 2022 3:35 pm

Adding to cart does not work when add to cart popup is disabled in VM.



Hello, this issue is being resolved on VM4.0.10+ and a quick fix is to modify:

replace the function below in this file as printed here (it comments the setVar sections):

\components\com_virtuemart\router.php
Code: Select all

public function parse(&$segments) {
         require_once(JPATH_SITE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_virtuemart'.DIRECTORY_SEPARATOR.'router.php');
         $ret = virtuemartParseRoute($segments);
         $segments = array();
         $ret['option'] = 'com_virtuemart';
         $app = JFactory::getApplication();
         /*stan - parisng URLs breaks POST data
         foreach ($ret as $key=>$val) {
            $app->input->set($key, $val);
            if (class_exists('JRequest')) {
               JRequest::setVar($key, $val);
            }
            if (class_exists('vRequest')) {
               vRequest::setVar($key, $val);
            }
         }
         */
         return $ret;
      }



Tested on j4.

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