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

TH-174: Harmony > Cart Page > Format product price by the Dotshop object's locale code #122

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bj-anas
Copy link
Contributor

@bj-anas bj-anas commented Dec 18, 2024

JIRA Ticket

Ticket: TH-174.

Prerequisites

  • Have Harmony active

QA Steps

Multi Currency OFF

  • From the multi currency settings in seller area, turn off multi currency and enable precision
  • Go to your store's general settings /admin/settings/general#details
  • Change the store language to English - United States
  • Change the store currency to Moroccan Dirhams
  • Change the currency symbol to MAD
  • Go to your product page
  • Add it to the cart
  • Add another product to your cart
  • From the cart drawer, click on "Checkout" to go to the cart page
  • The prices below should be correctly formatted:

Screenshot 2024-10-21 at 3 34 43 PM

  • Go back to your store, change the language to French - France
  • Go back to storefront / cart page, hit refresh
  • The price should be formatted accordingly and the currency symbol should be on the right
  • Go back to your store, this time change the currency symbol to a random currency symbol (ex: Wiwi)
  • Go back to storefront, hit refresh, and open the cart
  • The price should be formatted accordingly and the currency symbol should still be on the right

Multi Currency ON

  • From the multi currency settings in seller area, turn on multi currency and enable precision
  • Turn on your VPN
  • Go to your product's page in storefront
  • Add it to the cart
  • Make sure that:
    • The price for each item in the cart is formatted based on your VPN's country + your browser's language
    • The price is converted to your VPN's country currency
    • The currency symbol displayed is the VPN's country currency symbol
    • The subtotal is also formatted accordingly
  • Go to your browser's language settings, If you're using Chrome just click ⌘ + ,
  • Search for language
Screenshot 2024-10-08 at 8 43 12 AM
  • Click the three dots next to any language and move it to the top to make it your language of choice
  • Go back to your storefront, hit refresh and open your cart
  • The price value(s) and subtotal should be formatted based on your VPN + your browser's language

Note

Note that if your IP address while using VPN is in UK, and you have Arabic as the browser language, then you might see a flash where the price is displayed in indic numerals at first then Arabic numbers ١٢٣.٩٩ ' -> 123.99`. This is likely an issue with how PHP handles ar-GB vs how javaScript handles it. Will tackle this issue in a separate PR.

@bj-anas bj-anas added the Ready for review Requires a review from another developer. label Dec 18, 2024
@bj-anas bj-anas self-assigned this Dec 18, 2024
@bj-anas bj-anas changed the title TH-174: Harmony > New themes > Cart Page > Format product price by the Dotshop object's locale code TH-174: Harmony > Cart Page > Format product price by the Dotshop object's locale code Dec 18, 2024
@bj-anas bj-anas changed the title TH-174: Harmony > Cart Page > Format product price by the Dotshop object's locale code TH-174: Harmony > Cart Page > Format product price by the Dotshop object's locale code Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for review Requires a review from another developer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant