Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FancyBox not showing up at checkout #28556

Open
2 tasks done
doeselschnecke opened this issue May 20, 2022 · 10 comments
Open
2 tasks done

FancyBox not showing up at checkout #28556

doeselschnecke opened this issue May 20, 2022 · 10 comments
Labels
Checkout Feature Type: New Feature FO Category: Front Office Needs Specs Status: issue needs to be specified PR available Solution: issue is being addressed

Comments

@doeselschnecke
Copy link
Contributor

Prerequisites

Describe the bug and add screenshots

When clicking on terms during checkout at "I agree to the [terms of service] and [revocation terms] and will adhere to them unconditionally.", nothing happens.

Google Chrome shows me this warning, is it related to FancyBox not opening?

A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.
To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData.
Note that for performance reasons, only the first access to one of the properties is shown.

Expected behavior

FancyBox opening

Steps to reproduce

  1. Put an item in basket
  2. Go to checkout
  3. Fill out address etc
  4. In Step 4, click on terms of service

PrestaShop version(s) where the bug happened

1.7.8.6

PHP version(s) where the bug happened

7.4

If your bug is related to a module, specify its name and its version

No response

@doeselschnecke doeselschnecke added Bug Type: Bug New New issue not yet processed by QA labels May 20, 2022
@hibatallahAouadni
Copy link
Contributor

Hello @doeselschnecke

I didn't manage to reproduce your issue with PS1786, see the attached screen record below:

issue_28556.mp4

Please check and feedback.

Thanks!

@hibatallahAouadni hibatallahAouadni added Waiting for author Status: action required, waiting for author feedback FO Category: Front Office NMI Status: issue needs more information Checkout 1.7.8.6 Affects versions and removed New New issue not yet processed by QA labels May 20, 2022
@doeselschnecke
Copy link
Contributor Author

doeselschnecke commented May 20, 2022

Hello @doeselschnecke

I didn't manage to reproduce your issue with PS1786, see the attached screen record below:

issue_28556.mp4

Please check and feedback.

Thanks!

Thanks for the quick answer. However, you did not click on the terms to open FancyBox that used to show them.
Edit: I maybe could have been clearer. I did not mean checking the term box for agreeing, but clicking on the link to read the terms of service.

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label May 20, 2022
@doeselschnecke
Copy link
Contributor Author

doeselschnecke commented May 20, 2022

I have tried some things and realised the plugin "Legal Compliance" by PrestaShop, version 3.0.2 causes the issue.

Edit: I see. This module is outdated and not maintained any longer. It wasn't deleted while updating and I never got a hint to disable or remove it though.

Edit2: I disabled it for now, however very important compliance features are now missing, for example showing the right of withdrawal during checkout (super important in EU), missing shipping cost hint on product pages etc. The Official newer GDPR module does not have these features.

@prestonBot prestonBot added the PR available Solution: issue is being addressed label May 21, 2022
@matthieu-rolland
Copy link
Contributor

thank you @doeselschnecke for your contribution 👍

@PrestaShop/product-team what do you think ? @doeselschnecke 's PR looks like a needed addition

@HanaRebaiQA
Copy link

Hello @doeselschnecke

I was unable to reproduce your issue using the same steps mentioned above with PS1786 and php 7.4
The FancyBox is well displayed when clicking on terms of services link in checkout process

image

Terms.of.service.mp4

So, i'll close this issue.

Thank you!

@HanaRebaiQA HanaRebaiQA added Invalid Resolution: issue closed because invalid and removed NMI Status: issue needs more information labels May 23, 2022
@doeselschnecke
Copy link
Contributor Author

Hello @doeselschnecke

I was unable to reproduce your issue using the same steps mentioned above with PS1786 and php 7.4 The FancyBox is well displayed when clicking on terms of services link in checkout process

So, i'll close this issue.

Thank you!

Yes, the terms of services can be shown, indeed. It was ps_legalcompliance causing the issue that FancyBox doesn't work.

However, I looked for plugins on the marketplace and not even plugins for 70€ can show privacy policy and revocation terms or not break FancyBox (like the fork of ps_legalcompliance), hence I recommended the proposed Pull Request.

@MatShir MatShir reopened this May 23, 2022
@MatShir MatShir added Feature Type: New Feature and removed Invalid Resolution: issue closed because invalid labels May 23, 2022
@MatShir
Copy link
Contributor

MatShir commented May 23, 2022

Hi @doeselschnecke,
Could you specify the law involved and the country impacted? I will have a look on my side and see with the legal team to double-check before validating your feature

@HanaRebaiQA HanaRebaiQA added Waiting for author Status: action required, waiting for author feedback NMI Status: issue needs more information labels May 23, 2022
@doeselschnecke
Copy link
Contributor Author

doeselschnecke commented May 23, 2022

Hi @MatShir

As far as I know, EU's GDPR law requires ALL shop owners that ship to EU customers since 2018 that their customers agree to privacy policies. If you use PayPal for example, customers don't agree to them in an earlier step, so it is mandatory during Check 4 in Prestashop Checkout.

In older versions, ps_legalcompliance v.3.0.2 worked for this. I'm not sure if the changes in Core to PHP 7.4 or something else broke the FancyBox compatibility with the plugin, however it doesn't work nowadays.

I'm not sure with the revocation terms being mandatory world-wide. They are in many European countries (if you don't show them in Germany for example, customers would have infinite revocation rights). Afaik many EU countries require shop owners to show revocation terms.

Maybe this would be better in a plugin. I looked into this 70€ plugin and it doesn't have an option to change the checkout text either. Other paid plug-ins don't have many reviews or are outdated.

As a nerdy person, I dislike plug-ins and overrides and would propose to include a back-office setting to activate privacy policy and/or revocation terms during checkout and set the CMS pages there.

@prestashop-issue-bot prestashop-issue-bot bot removed the Waiting for author Status: action required, waiting for author feedback label May 23, 2022
@HanaRebaiQA HanaRebaiQA added Waiting for PM Status: action required, waiting for product feedback Needs Specs Status: issue needs to be specified labels May 23, 2022
@HanaRebaiQA HanaRebaiQA removed the NMI Status: issue needs more information label May 23, 2022
@doeselschnecke
Copy link
Contributor Author

doeselschnecke commented May 23, 2022

Proposal: we could make the checkbox during checkout adjustable in BO, so that every shop owner can make their own edits according to their local laws.

That would be a flexible solution and not difficult to implement either.

Edit: "not too difficult to implement" umm. I guess I was wrong. Dang, PrestaShop is written so inconvenient.

I tried adding a TinyMCE field to the Order settings, however because the Order Settings extends FrameworkBundleAdminController, I cannot put a Multi-Language field into it.

So, I tried creating a class in /Controller/Admin/Form/Admin/Configure/ShopParameters/OrderPreferences:
class LegalOptionsType extends TranslatorAwareType

However, adding something to the Backoffice is... a bit inconvenient. I added the new class to these files:
/Resources/config/routing/admin/configure/shop_parameters/order_preferences.yml
/Resources/config/services/bundle/form/form_handler.yml
/Resources/config/services/bundle/form/form_data_provider.yml
/Resources/config/services/bundle/form/form_type.yml
/Resources/config/services/adapter/data_configuration.yml
/Controller/Admin/Configure/ShopParameters/OrderPreferenceController.php
/vendor/composer/autoload_classmap
/vendor/composer/autoload_static

To add the LegalOptionsType class, we also need to create a Configuration class:
/src/Adapter/Order/LegalOptionsConfiguration.php (that's where data_configuration.yml points to)

So, after doing all this, I still don't see the text box in the order settings. I... kinda believe a module indeed be easier. Maybe it's possible to fix the FancyBox issue that the ps_legalcompliance module has.

@MatShir MatShir removed the Bug Type: Bug label May 23, 2022
@hibatallahAouadni hibatallahAouadni removed the 1.7.8.6 Affects versions label May 23, 2022
@Julievrz
Copy link
Contributor

Hi @doeselschnecke, Could you specify the law involved and the country impacted? I will have a look on my side and see with the legal team to double-check before validating your feature

@MatShir Could you please validate the wording with the Legal team too, please?

I just know that we had agreed on using "Terms of use" instead of "Terms of Service", but I don't know about "revocation services".

@RosaBenouamer RosaBenouamer removed the Waiting for PM Status: action required, waiting for product feedback label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Checkout Feature Type: New Feature FO Category: Front Office Needs Specs Status: issue needs to be specified PR available Solution: issue is being addressed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants