If OPC enabled, cart does not show, empty page

Please post your issues and questions about One Page Checkout for Virtuemart 2 to this forum.

If OPC enabled, cart does not show, empty page

Postby info@.....nl » Thu Sep 18, 2014 8:17 pm

Hope someone can help me out.

At this webshop: http://vergaderkoffers.nl I need the checkout page to show the total order amount ex VAT. This is not possible in the normal VM checkout so I installed OPC which I have running on many websites successfully.
When I enable OPC in this webshop however, the cart page is empty. I have therefore disabled OPC again.

The webshop runs on VM 2.6.10 OPC version 2.0.257.100914.

What could cause this problem?
info@.....nl
 
Posts: 4
Joined: Tue Feb 25, 2014 12:41 am

Re: If OPC enabled, cart does not show, empty page

Postby admin » Fri Sep 19, 2014 12:23 pm

hello, i just yesterday released a 258 version that fixes many issues epecially in 2.6.10 where new plugins were added which may cause conflicts or blank screens within checkout. i will send you the update by email as well.

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

Re: If OPC enabled, cart does not show, empty page

Postby info@.....nl » Fri Sep 19, 2014 8:32 pm

Hello Stan,
Thank you for sending me the update. Unfortunately this does not resolve the problem, still no checkout page after enabling OPC.
Regards Marloes
info@.....nl
 
Posts: 4
Joined: Tue Feb 25, 2014 12:41 am

Re: If OPC enabled, cart does not show, empty page

Postby admin » Tue Sep 23, 2014 12:51 pm

hello, this actually was a problem with jquery libraries between the widgetkit and virtuemart. opc does not need jquery, but the page didn't get loaded at all due to the javascript problems and the fading effect on your site.

the bug actually is somewhere in the widgetkit because it does not check for dependencies and does not load the libraries that it needs before any other extension.

the only way on how could i fix this, is to make sure that proper jquery libraries are loaded BEFORE wedgetkit, so i decided to use your:
/plugins/system/opc.php

and i've changed this code from:

Code: Select all
  public function onAfterRoute() {
   
if (self::_check())
     {
JHTMLOPC::script('opcping.js', 'components/com_onepage/assets/js/', false);
     }
// rest of the function here...


to
Code: Select all
public function onAfterRoute() {
   
   
   
     if (self::_check())
     {
       $app = JFactory::getApplication();
      $jq = $app->get('jquery', false);
      if (empty($jq))
       {
        JHTML::script('http://code.jquery.com/jquery-1.11.0.min.js');
        JHTML::script('http://code.jquery.com/jquery-migrate-1.2.1.min.js');
        $app->set('jquery', true);
        }
      
      $ui = $app->get('jquery-ui', false);
      if (empty($ui))
      {
      if (class_exists('vmJsApi'))
      vmJsApi::js ('jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16', '', TRUE);
      $app->set('jquery-ui', true);
      }
      $document = JFactory::getDocument();         
      $base = JURI::base();
      $jbase = str_replace('/administrator', '', $base);    
      if (substr($jbase, -1) !== '/') $jbase .= '/';

if (file_exists(JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'assets'.DS.'js'.DS.'jquery.noConflict.js'))
$document->addScript($jbase.'components/com_virtuemart/assets/js/jquery.noConflict.js');
else
if (file_exists(JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'assets'.DS.'js'.DS.'jquery.noconflict.js'))
$document->addScript($jbase.'components/com_virtuemart/assets/js/jquery.noconflict.js');
   
      
      JHTMLOPC::script('opcping.js', 'components/com_onepage/assets/js/', false);


// rest of the function here...
     }

    


i may add this as an option to opc "load the latest jquery library"

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

Re: If OPC enabled, cart does not show, empty page

Postby admin » Tue Sep 23, 2014 12:52 pm

the code above assumes you are NOT using https.

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


Return to One Page Checkout for Virtuemart 2