VirtueMart Forum

VirtueMart 2 + 3 + 4 => 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 :(

QuoteSITE 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:

QuoteAccount 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.

<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
Quote from: 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.

YOU'RE MY SAVIOR! :P

Quote from: Jumbo! on January 05, 2017, 18:19:21 PMAlso remove the following script from your template. It is generating unnecessary errors.

<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
Quote from: oneyozfest182 on January 05, 2017, 22:53:40 PM
Quote from: Jumbo! on January 05, 2017, 18:19:21 PMAlso remove the following script from your template. It is generating unnecessary errors.

<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.