VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: Yellow Cherry on October 25, 2018, 11:32:20 AM

Title: Add to Cart Broken after Hosting Transfer
Post by: Yellow Cherry on October 25, 2018, 11:32:20 AM
We have recently transferred a website to a new hosting provider and the add to cart has broken, when you choose add to cart it redirects to the cart page but the product is not added to the cart. Although if you enter billing details and then return to shop it will let you add to cart then sometimes.
The only error that appears in console is:
Uncaught TypeError: jQuery(...).chosen is not a function
    at Object.Virtuemart.updateChosenDropdownLayout (shop.html:532)
    at HTMLDocument.<anonymous> (shop.html:536)
    at i (jquery.min.js?9dddf26d777b65ccebde2b8bf2a6488e:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?9dddf26d777b65ccebde2b8bf2a6488e:2)
    at Function.ready (jquery.min.js?9dddf26d777b65ccebde2b8bf2a6488e:2)
    at HTMLDocument.K (jquery.min.js?9dddf26d777b65ccebde2b8bf2a6488e:2)

We are on version 3.8.13. of Joomla and version VirtueMart 3.4.2 and PHP 7
the link to the website is thedreamhouse.co
Title: Re: Add to Cart Broken after Hosting Transfer
Post by: jenkinhill on October 25, 2018, 12:02:31 PM
You correctly load the VM jQuery v1.12.4 in the head, but then load an old jQ version which is likely to be incompatible with chosen.js:
<script type="text/javascript" src="https://www.thedreamhouse.co/modules/mod_cookiealert/js/jquery-1.7.2.min.js"></script>

Try removing that cookie alert module.
Title: Re: Add to Cart Broken after Hosting Transfer
Post by: Yellow Cherry on October 25, 2018, 12:13:20 PM
Great disabling the cookie alert module seems to have done the trick, thanks for your help