VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: janjoomla on November 28, 2014, 22:02:35 PM

Title: Problems updating shopping cart.
Post by: janjoomla on November 28, 2014, 22:02:35 PM
Hello,

I experience some problems when adding or deleting items to or from the shopping cart. Mostly it seems that the cart will update after a CTRL-F5 (refresh)of the page. For example: when i add a product, the modal popup screens appears and the product is added to the cart. When i choose continue shopping, the cart is empty again. After a refresh the product is shown in the cart. Increasing the quantity in the cart doesn't work either. I've installed the Jquery Easy plugin. Disabled cache, using standard template (Beez 20) etc. I'm running out of options at this moment  :(. Anyone a suggestion?

Versions:

VM 2.6.12.2
Joomla 2.5.27

It's a dutch site: www.vuurwerkhoogkerk.nl
Title: Re: Problems updating shopping cart.
Post by: jenkinhill on November 29, 2014, 00:14:50 AM
Something is very wrong. In the checkout/cart page I cannot see the VM css or JavaScript files loading except for those concering fancybox.
Also with Beez you should not need to use jQueryEasy, as you also have anothe js file loading from a plugin:
<script src="http://www.vuurwerkhoogkerk.nl/plugins/vmpayment/buckaroo/js/jquery-latest.min.js" type="text/javascript"></script>

For VM's js you should see the following loaded:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/fullvm/components/com_virtuemart/assets/js/jquery.noconflict.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/fullvm/components/com_virtuemart/assets/js/vmsite.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/fullvm/components/com_virtuemart/assets/js/chosen.jquery.min.js?vmver=Revision: 8558" type="text/javascript"></script>
  <script src="/fullvm/components/com_virtuemart/assets/js/fancybox/jquery.fancybox-1.3.4.pack.js?vmver=Revision: 8558" type="text/javascript"></script>

It is almost as if you have turned off VM scripts & css in VM configuration/templates.
Title: Re: Problems updating shopping cart.
Post by: janjoomla on November 29, 2014, 09:40:55 AM
jenkinhill,

Thanks for the reply.

To avoid any mismatches, i did an fresh/clean installation of Joomla/VM in a subdomain: www.vmtest.vuurwerkhoogkerk.nl. I used the Virtuemart2.6.12.2_Joomla_2.5.27-Stable-Full_Package for that from de Virtuemart download area.
It seems that  the proper scripts are loaded. I still have the identical problems in this fresh site. Could it be a Hosting problem? Maybe something with Varnish Cache? My hosting provider is flexwebhosting.nl.
Title: Re: Problems updating shopping cart.
Post by: GJC Web Design on November 29, 2014, 11:01:30 AM
It certainally sounds like a caching issue... have never seen this behaviour on any VM installs before
Title: Re: Problems updating shopping cart.
Post by: janjoomla on November 29, 2014, 12:36:35 PM
Anyone familiar with possible workarounds to avoid/test caching problems?
Title: Re: Problems updating shopping cart.
Post by: GJC Web Design on November 29, 2014, 12:51:35 PM
Hard to make a work around if the caching is at the host .. can't you just ask them to turn it off?
Title: Re: Problems updating shopping cart.
Post by: janjoomla on November 29, 2014, 13:17:36 PM
Good point. I'm already in discussion with them. Unfortunately they don't have weekend support. Thanks for the suggestion.
Title: Re: Problems updating shopping cart.
Post by: jenkinhill on November 29, 2014, 13:21:02 PM
Joomla does not work properly with Varnish without making some core code changes. There are various solutions to make it work, but unless you have a very heavy & busy site there is no point in using that cache system.  See http://bit.ly/1zFzZG7


Title: Re: Problems updating shopping cart.
Post by: janjoomla on December 01, 2014, 18:59:44 PM
Fyi,

The problem is solved. It was indeed the Varnish webaccelerator which causes the problems. After disabling the varnish cache for the specific domain, VM acts normal again. (This was done by the Hosting Provider).
Joomla/VM and Varnish can work together, but as Jenkinjhill already mentioned, it needs a little customization.

Thanks for the reply's.