News:

Support the VirtueMart project and become a member

Main Menu

Cart AJAX problems (SOLVED)

Started by osp, February 23, 2012, 12:15:13 PM

Previous topic - Next topic

osp

Installed 201N version, price update in product detail stopped working as like as add to cart and other AJAX functionalities.

Well I faced this prb 3 hours, checked everything (JSON parsers, eliminating redirect in multilanguage and so).

Finally, the reason is $.getJSON silent error (exactly parser error, you have to catch getJSON error in handler to see the error).
So something with jQuery version. I use google apis, so 1.6.4 version is loaded.

On my Joomla was also K2 was installed. K2 loaded 1.7 version and to get rid of AJAX problems, I had to uninstall K2 and thus jQ 1.7

I suppose your problems with AJAX can be of similar  reasons - another modules/components loads different jQuery. This is something not properly solved in Joomla, jQuery had to be unified for all modules I think...but this is different story...

In any case, this has nothign to do with MySQLi driver.

And I changed productdetails.php reclaculate method to

      $document->setMimeEncoding( 'application/json' );
      JResponse::setHeader('Cache-Control','no-cache');
      JResponse::setHeader('Expires','Mon, 6 Jul 2000 10:00:00 GMT');
      JResponse::setHeader('Content-Disposition','attachment;filename="recalculate.json"', true);
      JResponse::setHeader('Content-type','application/json; charset=UTF-8', true);

Cheers Ondra...