-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
special price & tier price are coming in base currency #26121
Comments
Accept my apologies. This issue will be delayed. The reason: there is already created tasks for improving that can be found by label "magento-core" (i.e magento/graphql-ce#566). I strongly recommend to update the issue by adding:
|
/* Steps to reproduce */
/* Expected and actual results */
|
@lenaorobei, it is reproducible with the latest 2.3-develop. Steps to reproduce
Run query products but set the proper header.
Run query products without headers |
Hi @mkum73. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @mkum73 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @TomashKhamlai. Thank you for working on this issue.
|
Could you please help us with additional details about this issue?
|
Hi @pmarjan. Thank you for working on this issue.
|
Adjust to take customer group (via setting customerGroupId) into consideration.
Edits, Support by api-functional tests, Address static tests
Address static tests - session 2
Refactor to pass new optional parameter to @api class constructor
Refactor TierPriceBuilder
Revert Pricing Price TierPrice
Adjust unit and integration tests
Move price transform to PriceTiers
Adjustments to api-functional test
Adjustments to api-functional test
Adjustments to api-functional test
Hi @mkum73. Thank you for your report.
The fix will be available with the upcoming 2.4.1 release. |
In Graphql fetch data for special price & tier prices in products query. The values come always in base currency.
Preconditions (*)
Magento based on '2.4-develop' branch
Have a product created with name "Beginner's Yoga" (or refer to the same named product that becomes available with sample data) and set the following prices
a. price: 6
b. Advanced pricing > special price: 5
c. Advanced Pricing > Catalog and Tier Price, for all websites and all groups, fixed type price,
- for qty 2 price 4
- for qty 3 price 3
Add new store view with code "eur_view"
Navigate to Store -> Settings -> Configuration -> General -> Currency Setup and allow EURO in Allowed Currencies and Save Configuration
Change the Scope to the second Eur View and set Default Display Currency to Euro
Ensure there are currency rates available (e.g. on frontend catalog if the store view is switched price would change from 6 to 4.24 -> indicating that the USD -> EUR rate is 1.415)
Steps to reproduce (*)
Set header "Store = default" and execute this query
query{ products(search: "Beginner's Yoga"){ total_count items { name price_range { minimum_price { regular_price { currency value } final_price { currency value } } } special_price price_tiers { final_price { currency value } quantity } sku } } }
Prices now are expected in Default Store view in USD, response should look like
{ "name": "Beginner's Yoga", "price_range": { "minimum_price": { "regular_price": { "currency": "USD", "value": 6 }, "final_price": { "currency": "USD", "value": 5 } } }, "special_price": 5, "price_tiers": [ { "final_price": { "currency": "USD", "value": 4 }, "quantity": 2 }, { "final_price": { "currency": "USD", "value": 3 }, "quantity": 3 } ], "sku": "240-LV04" }
Set header "Store = eur_view" and execute the query again
Prices now are expected in Eur View in EUR currency, response should look like
{ "name": "Beginner's Yoga", "price_range": { "minimum_price": { "regular_price": { "currency": "EUR", "value": 4.24 }, "final_price": { "currency": "EUR", "value": 3.53 } } }, "special_price": 5, "price_tiers": [ { "final_price": { "currency": "EUR", "value": 4 }, "quantity": 2 }, { "final_price": { "currency": "EUR", "value": 3 }, "quantity": 3 } ], "sku": "240-LV04" }
Observe how the
regular_price.minimum_price
andregular_price.final_price
have changed its value, but not thespecial_price
or the values respectively for theprice_tiers
Expected result (*)
special_price
should display values corrected by the USD->EUR rate (E.g. something like 3.53)price_tiers.final_price.value
should display values corrected by the USD->EUR rateActual result (*)
special_price
still displays 5price_tiers.final_price.value
is still displayed in USD and displays 4 for qty 2, and 3 for qty 3The text was updated successfully, but these errors were encountered: