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

Non-Functional Apple Pay Button on Fly-Out Basket #19

Open
rostyslav-nazymko opened this issue Dec 19, 2024 · 0 comments
Open

Non-Functional Apple Pay Button on Fly-Out Basket #19

rostyslav-nazymko opened this issue Dec 19, 2024 · 0 comments

Comments

@rostyslav-nazymko
Copy link

Spotted a bug with Mollie_HyvaCompatibility module related to "Apple Pay" button in minicart.

Template

vendor/mollie/magento2-hyva-compatibility/src/Mollie_HyvaCompatibility/view/frontend/templates/Mollie_Payment/applepay/minicart/applepay-button.phtml

Component name:

initMollieApplePayMinicart()

Problem:

Button is not clickable and non-functional in minicart right after adding product to cart (cart was empty before)

Error in console:

Alpine Expression Error: "" is not a valid amount.

This because of FPC is caches the page including a JS component which is loading dynamic content:
const amount = "<?= $escaper->escapeJs($block->getBaseGrandTotal()); ?>";
As basket were empty, the amount value is "" by default and being cached.

Solution: The total would need to be retrieved from the section data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant