Skip to content

[Backport] Fix cache issue for currencies with no symbol #15781

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

Conversation

dmytro-ch
Copy link
Contributor

Original PR: #13894

Description

Using getCurrencySymbol() leads to a bug for currencies where there is no currency symbol - cache ends up being non-unique. Using currency code for caching is a more foolproof way.

The issue has been partially fixed by #13894. (\Magento\ConfigurableProduct\Block\Product\View\Type\Configurable)

Manual testing scenarios

  1. Test the Catalog Category View page (including configurable products)
  2. Test the Catalog Product List widget

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team magento-engcom-team added this to the Release: 2.1.15 milestone Jun 5, 2018
@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-1847 has been created to process this Pull Request

@rogyar rogyar removed their assignment Jun 5, 2018
@sidolov
Copy link
Contributor

sidolov commented Jun 8, 2018

Hi @dmytro-ch , we found an issue in current implementation:

Price for configurable product isn't displayed correct on Product Detail Page.

Steps to reproduce:

Set Magento to use the following currency setup:
Base currency - USD
Default display currency - USD
Allowed currencies - Czech Republic Koruna, Danish Krone, US Dollar
Stores -> Currency rates should be set to the following:
USD/CZK rate: 20.8110
USD/DKK rate: 6.0967
Create configurable product with 1 product attached to it.
Set the price on the attached virtual product to $1 USD.
Visit configurable product page - you should see the default price of $1.
Select DKK in the currency-select box.

Expected result:
The price should change to 6.10.

Actual result:
Price DKK37.19 is displayed.

Notice. If you select the only product-option available, the price should change to 6.10.

@orlangur
Copy link
Contributor

orlangur commented Jun 8, 2018

@sidolov as this PR is just a backport, did mentioned case worked fine on 2.2?

@sidolov
Copy link
Contributor

sidolov commented Jun 11, 2018

@orlangur , yes, this case works on 2.2. Looks like in 2.2 release line additional fix was delivered in the scope of another task.

@dmytro-ch
Copy link
Contributor Author

Hi @sidolov, thank you for the detailed way to reproduce.

I could also reproduce the issue in 2.1-develop branch.
Looks like the price for the configurable product is being calculated twice when there is no product option selected on product view page.
The related issue is #10150. Should it be reopened?

Thanks.

@orlangur
Copy link
Contributor

Ping @sidolov :)

@sidolov
Copy link
Contributor

sidolov commented Jul 3, 2018

Hi @dmytro-ch , I think if issue not reproducing in latest releases we should leave it closed. For 2.1 version the better way will be to found a complete fix for all cases, but it may be difficult to find it

@orlangur
Copy link
Contributor

Closing due to inactivity. Feel free to reach me out anytime later if you wish to continue work on this pull request and it will be reopened.

@orlangur orlangur closed this Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants