Author Topic: Add to Cart not working with Edge & VM 3.0.18  (Read 5221 times)

Otto0815

  • Jr. Member
  • **
  • Posts: 193
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #15 on: March 02, 2017, 09:19:01 am »
Many Thanks to Studio42......it has been my fault... :-\ :-\

Your tip with the Async loading did it; at sometime i must have installed an plug in wich load javascript async or defer....that's been the culprit
Found it only because i could not find something like this in the mobilemenu files.....

 :-\ :-\

ThijsGaublomme

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #16 on: November 22, 2017, 21:33:35 pm »
Hello,

I'm not sure if this topic is still active or not.
If I need to post a new topic, please tell me.

I have the same problem as above.

In internet explorer, firefox, google chrome my cart is updated correctly and I can continue without error.
In Edge, safari (IOS) on Ipad and Iphone my cart is empty, nothing is loaded.

I tried to follow the steps above but cannot find the correct files to change.
Could someone look into it please?

The default error reporting is on.
There is one error on the page, caused by php 7.1. but is not a problem in explorer, firefox or chrome.

Website: https://www.toolwebshop.be
You can add this product to the cart if you like to test : https://www.toolwebshop.be/schaafmachines/schaaf

Thank you for your reply!

Kind regards,

Thijs

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4075
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #17 on: November 22, 2017, 22:31:21 pm »
Hello,

I'm not sure if this topic is still active or not.
If I need to post a new topic, please tell me.

I have the same problem as above.

In internet explorer, firefox, google chrome my cart is updated correctly and I can continue without error.
In Edge, safari (IOS) on Ipad and Iphone my cart is empty, nothing is loaded.

I tried to follow the steps above but cannot find the correct files to change.
Could someone look into it please?

The default error reporting is on.
There is one error on the page, caused by php 7.1. but is not a problem in explorer, firefox or chrome.
Disable PHP error reporting can solve the problem, if you have a error reporting and do an ajax call(for eg on add to cart) this get printed in the server response and the json object is not valid.
But you have other little problems(i only checked the product details page)  as 404 for 2 image file missing. You should copy the files or change the CSS to not load this files.
Regards,
Patrick

ThijsGaublomme

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #18 on: November 23, 2017, 18:51:16 pm »
Hello,

Thank you for your reply.

I've turned off the php error reporting.
I had enabled it to find the error in Edge and Safari, but turning it off again didn't help with the cart.

In Edge and Safari the cart is not updated and a big 0 is shown.
The other browsers have no problem with that.

(I can't imagine missing images have anything to do with this...)

https://ibb.co/crTVk6

Any idea what it might be?

Thank you.


Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4075
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #19 on: November 23, 2017, 21:46:14 pm »
The big 0 is a php error. But the main problem is th value send by Edge

Quote
   Itemid: 752
   option: com_virtuemart
   pid: 102
   pname: Schaaf
   quantity%5B%5D: 1
   view: cart
   virtuemart_product_id%5B%5D: 102
   virtuemart_product_id%5B%5D: 102
This mean that virtuemart_product_id is set 2 times and Vm chekc the quantity for the second, but it's empty.
I checked with my own shop and dont have the problem, but this is certainly because virtuemart_product_id  is set 2 times in your form.
In IE 11, i have the samebut not the  problem, but perhaps it not parse the same way values to html.

I tested the form using jQuery('.product.js-recalculate').serialize();
Edge :
"quantity%5B%5D=1&virtuemart_product_id%5B%5D=102&option=com_virtuemart&view=cart&virtuemart_product_id%5B%5D=102&pname=Schaaf&pid=102&Itemid=752"
Chrome :
"quantity%5B%5D=1&virtuemart_product_id%5B%5D=102&option=com_virtuemart&view=cart&virtuemart_product_id%5B%5D=102&pname=Schaaf&pid=102&Itemid=752"
So i think that the bug is in  javascript that parse the data to addJs ajax request.
Have you an overide of the javascript in your template ?
Using https://www.toolwebshop.be/schaafmachines/schaaf?template=protostar do not permit to render Joomla core template, so it's not possible to check if this is from Virtuemart or your template

ThijsGaublomme

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #20 on: November 24, 2017, 19:20:23 pm »
Hi,

I've checked with the protostar template to not have any other template bothering me.
Also disabled the one page checkout plugin, disabled ajax, java and other stuff in virtuemart configuration.

It's no use.
In chrome, firefox all keeps working fine but in safari and edge the cart is still empty.

It's very strange the ID is set 2 times and some browsers can handle this.

Any idea how I could overide this problem? Or any other cause or solution?

Thank you for your help.


Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4075
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #21 on: November 24, 2017, 21:26:24 pm »
Update Virtuemart, i think the problem is the Vm core javascript. if it not work with protostar, i know that they had in some release many little problems with this script, so perhaps you have a bugged release

ThijsGaublomme

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #22 on: November 24, 2017, 22:29:10 pm »
How can I update virtuemart????

Now I'm at version VirtueMart 3.2.2. , thought this was the last one...

ThijsGaublomme

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #23 on: November 24, 2017, 23:00:30 pm »
Updated VM. Now version 3.2.6, found how to ;)

Still the same problem, even with protostar template.
Only empty in edge/safari. Other browsers are correct.

I hope I won't have to reïnstall everything... It took me months to update 5000 products and I have to add 3000 more products...

I left protostar template active so you can check yourself.
Thank you for your expertise in this matter.


Kind regards.

ThijsGaublomme

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: Add to Cart not working with Edge & VM 3.0.18
« Reply #24 on: November 26, 2017, 09:25:06 am »
Hello,

The problem has been solved.
The coockie domain caused the problem in some browsers.

We have managed to resolve the issue by commenting two lines in your confirgation.php file:
Code:
public $cookie_domain = 'toolwebshop.be';
public $cookie_path = 'www.toolwebshop.be/coockie

Before commenting the lines, we've tried to alter them:
Code:
public $cookie_domain = 'https://toolwebshop.be';
public $cookie_path = 'https://toolwebshop.be/coockies';

Unfortunatelly this did not help.