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: Aura > Cart Page > Format product price by the Dotshop object's locale code #64

Merged
merged 15 commits into from
Dec 20, 2024

Conversation

eihabkhan
Copy link
Member

@eihabkhan eihabkhan commented Oct 16, 2024

JIRA Ticket

Ticket: TH-174.

Prerequisites

  • Have Aura 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.

Note

Leave empty when you have nothing to say.

@eihabkhan eihabkhan self-assigned this Oct 16, 2024
@eihabkhan eihabkhan added the in progress Currently being developed. label Oct 16, 2024
@eihabkhan
Copy link
Member Author

cart.js needs to be refactored: https://youtu.be/mWMFTfaJaWM

@eihabkhan eihabkhan marked this pull request as ready for review October 21, 2024 14:37
@eihabkhan eihabkhan added Ready for review Requires a review from another developer. and removed in progress Currently being developed. labels Oct 21, 2024
@ibrilBadreddine
Copy link
Contributor

cart.js needs to be refactored: https://youtu.be/mWMFTfaJaWM

https://www.youtube.com/watch?v=PUhncAezGUQ

@eihabkhan eihabkhan added in progress Currently being developed. and removed Ready for review Requires a review from another developer. labels Dec 10, 2024
@eihabkhan eihabkhan marked this pull request as draft December 10, 2024 13:20
@eihabkhan eihabkhan assigned bj-anas and unassigned eihabkhan Dec 17, 2024
@bj-anas bj-anas marked this pull request as ready for review December 17, 2024 15:06
@bj-anas bj-anas added Ready for review Requires a review from another developer. and removed in progress Currently being developed. labels Dec 17, 2024
@bj-anas bj-anas changed the title TH-174-aura: Aura > Format prices in cart page TH-174: Aura > Cart Page > Format product price by the Dotshop object's locale code Dec 18, 2024
bj-anas added a commit that referenced this pull request Dec 20, 2024
Copy link
Contributor

@ibrilBadreddine ibrilBadreddine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

I tried QA with the add to cart feature on, but clicking any product card (home or collections) triggered this error:

add-to-cart.js -> directAddToCart function

Uncaught (in promise) ReferenceError: trackVariantQuantityOnCart is not defined

@bj-anas
Copy link
Contributor

bj-anas commented Dec 20, 2024

Warning

I tried QA with the add to cart feature on, but clicking any product card (home or collections) triggered this error:

add-to-cart.js -> directAddToCart function

Uncaught (in promise) ReferenceError: trackVariantQuantityOnCart is not defined

You have some problems with syncing files while you running the dev mode in your local machine

@ibrilBadreddine ibrilBadreddine added Reviewed PR has been reviewed and approved. and removed Ready for review Requires a review from another developer. labels Dec 20, 2024
@bj-anas bj-anas merged commit 7b92001 into master Dec 20, 2024
@bj-anas bj-anas deleted the TH-174-aura branch December 20, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed PR has been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants