Author Topic: Add to Cart Broken after Hosting Transfer  (Read 791 times)

Yellow Cherry

  • Beginner
  • *
  • Posts: 43
    • Yellow Cherry Digital
Add to Cart Broken after Hosting Transfer
« 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
Internet Marketing // Website Development

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27562
  • Always on vacation
    • Jenkin Hill Internet
Re: Add to Cart Broken after Hosting Transfer
« Reply #1 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.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.6.8.10197 on Joomla 3.9.13 PHP 7.0.33

Yellow Cherry

  • Beginner
  • *
  • Posts: 43
    • Yellow Cherry Digital
Re: Add to Cart Broken after Hosting Transfer
« Reply #2 on: October 25, 2018, 12:13:20 pm »
Great disabling the cookie alert module seems to have done the trick, thanks for your help
Internet Marketing // Website Development