Author Topic: "Add To Cart" redirects to empty cart :(  (Read 491 times)

oneyozfest182

  • Beginner
  • *
  • Posts: 23
  • A beginner
"Add To Cart" redirects to empty cart :(
« on: January 04, 2017, 18:00:01 pm »
I am using a custom theme and some extensions, but the issue happens even with those extensions disabled and using the default protostar template. Any help us appreciated :(

Quote
SITE INFORMATION
 OS Linux b
 PHP 5.3.29
 MySQLi 5.6.32-78.0-log
 Caching ON - Conservative caching
 GZip Compression Yes
 Joomla! Version 3.6.5
 VirtueMart 3.0.18

You can test by logging in with the following credentials:

Quote
Account Number (Username): PRI001
Password: britalia1

http://shop.britaliaoptical.com/

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 25570
  • Always on vacation
    • Jenkin Hill Internet
Re: "Add To Cart" redirects to empty cart :(
« Reply #1 on: January 04, 2017, 18:13:43 pm »
And the URL is ????

Thats a very old verion of PHP.
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.0 on Joomla 3.6.5 PHP 7.0.12

Testing VM3.2.1 on J!3.6.5 and J!3.7B3

oneyozfest182

  • Beginner
  • *
  • Posts: 23
  • A beginner
Re: "Add To Cart" redirects to empty cart :(
« Reply #2 on: January 04, 2017, 18:19:06 pm »
Doh! I knew I'd forget something.  :P Fixed!

oneyozfest182

  • Beginner
  • *
  • Posts: 23
  • A beginner
Re: "Add To Cart" redirects to empty cart :(
« Reply #3 on: January 04, 2017, 18:45:22 pm »
I also noticed that, though I have the "Display modal popup upon 'Add to cart'" checked, when I add to cart it just redirects me to the cart page instead of showing any popup... :(

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 25570
  • Always on vacation
    • Jenkin Hill Internet
Re: "Add To Cart" redirects to empty cart :(
« Reply #4 on: January 04, 2017, 23:34:32 pm »
Looks like JavaScript issues. eg you are not loading VirtueMart's vmsite.js
Kelvyn

Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

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

Currently using VM3.2.0 on Joomla 3.6.5 PHP 7.0.12

Testing VM3.2.1 on J!3.6.5 and J!3.7B3

oneyozfest182

  • Beginner
  • *
  • Posts: 23
  • A beginner
Re: "Add To Cart" redirects to empty cart :(
« Reply #5 on: January 05, 2017, 15:09:01 pm »
Is there a way I can revert to using Virtuemart's vmsite.js ? :(

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 537
  • Software Developer {PHP, JavaScript, jQuery, ...}
    • www.virtueplanet.com
  • VirtueMart Version: 3.2.0
Re: "Add To Cart" redirects to empty cart :(
« Reply #6 on: January 05, 2017, 18:19:21 pm »
Enable "Using the product Scripts" and "Using the Script ajax Countries/Regions" options in VirtueMart Configuration under Template tab.

Also remove the following script from your template. It is generating unnecessary errors.

Code: [Select]
<script>
    var vid = document.getElementById("vid");
    vid.addEventListener("timeupdate", function () {
        if(this.currentTime >= 8.0) {
            this.currentTime = 0.0;
        }
    });
</script>

oneyozfest182

  • Beginner
  • *
  • Posts: 23
  • A beginner
Re: "Add To Cart" redirects to empty cart :(
« Reply #7 on: January 05, 2017, 22:53:40 pm »
Enable "Using the product Scripts" and "Using the Script ajax Countries/Regions" options in VirtueMart Configuration under Template tab.

YOU'RE MY SAVIOR! :P

Also remove the following script from your template. It is generating unnecessary errors.

Code: [Select]
<script>
    var vid = document.getElementById("vid");
    vid.addEventListener("timeupdate", function () {
        if(this.currentTime >= 8.0) {
            this.currentTime = 0.0;
        }
    });
</script>

Where would I go abouts finding that?  :-X

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 537
  • Software Developer {PHP, JavaScript, jQuery, ...}
    • www.virtueplanet.com
  • VirtueMart Version: 3.2.0
Re: "Add To Cart" redirects to empty cart :(
« Reply #8 on: January 06, 2017, 07:08:32 am »
Also remove the following script from your template. It is generating unnecessary errors.

Code: [Select]
<script>
    var vid = document.getElementById("vid");
    vid.addEventListener("timeupdate", function () {
        if(this.currentTime >= 8.0) {
            this.currentTime = 0.0;
        }
    });
</script>

Where would I go abouts finding that?  :-X

I think that is in your template's index.php file. Check at the bottom of the file just before the body closing tag.