VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: oneyozfest182 on January 04, 2017, 18:00:01 pm

Title: "Add To Cart" redirects to empty cart :(
Post by: oneyozfest182 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/ (http://shop.britaliaoptical.com/)
Title: Re: "Add To Cart" redirects to empty cart :(
Post by: jenkinhill on January 04, 2017, 18:13:43 pm
And the URL is ????

Thats a very old verion of PHP.
Title: Re: "Add To Cart" redirects to empty cart :(
Post by: oneyozfest182 on January 04, 2017, 18:19:06 pm
Doh! I knew I'd forget something.  :P Fixed!
Title: Re: "Add To Cart" redirects to empty cart :(
Post by: oneyozfest182 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... :(
Title: Re: "Add To Cart" redirects to empty cart :(
Post by: jenkinhill on January 04, 2017, 23:34:32 pm
Looks like JavaScript issues. eg you are not loading VirtueMart's vmsite.js
Title: Re: "Add To Cart" redirects to empty cart :(
Post by: oneyozfest182 on January 05, 2017, 15:09:01 pm
Is there a way I can revert to using Virtuemart's vmsite.js ? :(
Title: Re: "Add To Cart" redirects to empty cart :(
Post by: Jumbo! 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>
Title: Re: "Add To Cart" redirects to empty cart :(
Post by: oneyozfest182 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
Title: Re: "Add To Cart" redirects to empty cart :(
Post by: Jumbo! 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.