Author Topic: Add to cart not working if user does not accept cookies (eu-privacy directive)  (Read 3657 times)

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
I'm dealing with the EU Privacy Directory compliance in my site, and decided to use a third party plugin to let the user choose to accept or deny cookies.
I have installed the plugin, solved some conflicts and now it works smoothly, except for the "add to cart" function!
The plugin I use does not let the site put any kind of cookie on the customer side until he explicitally accept them.
It means that NO COOKIES are set at all on (this to be fully compliant to the European Directive: no cookies can be set until the user accept them in explicit way) the customer browser BOTH in the case he waits to place the cookie acceptance decision (not clicking on the ACCEPT or the DENY button, but navigating the site) AND in the case he refused to accept cookies.
If I'm not wrong, there is no way to have the "add to cart" process working without setting cookies: is this true?
Is there a way to solve this important problem?
Being fully compliant to the Europen Directive is imperative, and VM should work also without putting cookies on the client side.
Waiting for your kindly reply very ASAP
Best regards

(Joomla 3.4.3 - VM 3.0.9.4)

J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10017
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
You may give us the link to the extension, so we can try with it
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
I've sent you a PM with the link.
Thank you in advance.
Regards
Stefano
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10017
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Hmmm, for me it works. Maybe connected to your payment/shipment plugin?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
I have only the Standard vmplugin activated, and only the "By weight, ZIP and countries" vmshipment
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4179
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Hi SteP[IT],
The law is completly stupid !
At the moment you add user info in database, cookies, localstorage or anything else, you have to add the message.
This mean on a shop, if the user don't accept the cookies then you have to reject all possible action.
This is not only the browser cookies as many mean! And saving a product to cart(in a cookie or not) is not compliant with the EU directive

For info;
http://extensions.virtuemart.net/ not legal
http://shop.st42.fr not legal
http://www.amazon.fr/ not legal
90% shops are illegal in EU

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
For Milbo:

It seems that the problem arised when I wrongly turned on the Mootools option inside that plugin (instead of using jQuery), my fault
Thank you for wasting your time addressing me to a coffee cup to wake me up :)
Regards


for Studio 42:

The law may be stupid, but you must deal with it: right now in my Country (Italy) you may be charged by $$ penalty if you do NOT place that EU notice on your website, so you must do it also if you think it's stupid or not :)
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4179
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Add a notice: This site cannot work without cookies, please leave if you don't agree.
I think the user are not stupid.
A shop have to save the datas.

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
I live in Italy, not in the USA or in a more advanced Country.... I must deal with non-tech-aware people, many of them not discerning between a lamp and a smartphone :)
I'm not reach as Amazon, so I do not intend to spend money for penalties, well knowing that I must at least show them I comply with rules.
The question that rules are effective or not is not in my target :)
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4179
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
I think as this was a good idea, at end, this only frustrate the users.
Another problem, is if you use 3 party plugins, services, you don't know if this services use cookies,storage(eg google) or not.
This mean that all site(99%) have to display the cookie message to be compliant with the EU directive.

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Hello

Can you check what cookies do you have?
ON chrome, if you click rigth, and use "view page info" then you have the cookies stored

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
When setting the EU Privacy plugin OFF, I can see 2 cookies:

4a152e3638e35a2ab1dd5a8abb6fdbe7 (content: it-IT)
7ef1704505c7cfd4cbb09f31d5aeda5e (content: 71pbv7vccb7qnc8oikp84sfc35)

When setting the plugin ON, a I see only 1 cookie:
4a152e3638e35a2ab1dd5a8abb6fdbe7 (content: it-IT)

I have also noted that, when turning on the plugin, this line disappear from the page header:

Code: [Select]
  <script src="/components/com_virtuemart/assets/js/vmkeepalive.js?vmver=8872" type="text/javascript" defer="defer" async="async"></script>
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
Cheking the same behaviour in Firefox v 39, both the cookies are correctly set when the plugin is ON or OFF
This same thing (2 cookies correctly set) happens in my non-chome smartphone browser (android), both with plugin ON or OFF

It seems to be restricted to chrome....
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

SteP[IT]

  • Jr. Member
  • **
  • Posts: 199
  • Independent Websites Builder
    • MMC Edizioni - Italian Publisher (First Class PaperBooks)
  • VirtueMart Version: 3.4.3
Further testing, I made this:

1) loaded the product page turning on the privacy plugin.
2) saved that page locally
3) loaded the saved file in Firefox 39, and added the product to the cart: IT WORKED
4) loaded the same file in Chrome, and added the product to the cart: IT DID NOT WORK

It seems to be restricted to some odd chrome problem: the same configuration works normally on my android non-chrome browser....

J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10017
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Code: [Select]
if (!class_exists('VirtueMartCart')) require(VMPATH_SITE . DS . 'helpers' . DS . 'cart.php');
$cart = VirtueMartCart::getCart();
if(!empty($cart->cartProductsData)){
vmJsApi::keepAlive(1,4);
}

I wonder if it is connected to this lines.

Hmm odd problem, with FF and Chrome. Sounds like the plugin does not work correctly on FF, right?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/