News:

Support the VirtueMart project and become a member

Main Menu

Add to Cart Broken after Hosting Transfer

Started by Yellow Cherry, October 25, 2018, 11:32:20 AM

Previous topic - Next topic

Yellow Cherry

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
Internet Marketing // Website Development

jenkinhill

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.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Yellow Cherry

Great disabling the cookie alert module seems to have done the trick, thanks for your help
Internet Marketing // Website Development