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

Format PDP price to have only two decimal places #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

esteban-serfe
Copy link

Description

To comply with the financial regulatory measures was requested to have the amount be shown only with two decimal places on the PDP content. In certaincircustances the price can have infinite amount of decimal places based on the rules of the discunt rules.

How To Reproduce

Steps to reproduce the behavior:

  1. Set a product with price $69.99
  2. Enter to the PDP page
  3. Open the code inspector and search <div id="als_pdp"
  4. The tag data-amount has more than 2 decimals.

Expected behavior

The price should be shown with 2 decimal places only.

Additional information

  • Tested on Magento 2.3 & 2.4.
  • Version 3.0.10 of this module.

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

Successfully merging this pull request may close these issues.

1 participant