Skip to content

Conversation

@bartoszherba
Copy link
Collaborator

@bartoszherba bartoszherba commented Oct 11, 2022

How Has This Been Tested?

  1. Visit M2 integration app.
  2. Clear cache.
  3. Open any category page.
  4. Open any product detail page.
  5. Go back using native, browser back button.
  6. Switch to different category.

or simply jump between Gear and Man categories.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bartoszherba bartoszherba requested a review from Frodigo as a code owner October 11, 2022 08:09
@bartoszherba bartoszherba requested review from a team and removed request for Frodigo October 11, 2022 08:09
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bartoszherba bartoszherba self-assigned this Oct 12, 2022
...product,
price_range: priceData.items.find((item) => item.sku === product.sku)?.price_range,
}));
products.value = products.value.map((product) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe mapping could be better if handled in the server-side instead of this kind.

But if it's really needed perhaps, we could extract them to a helper function or something similar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It can't be done on the server because it must bypass the cache including Redis or CDN, that is why it is executed in the onMounted hook otherwise, prices will be cached.

@bartoszherba bartoszherba merged commit 7d564e2 into release/1.1.0 Oct 12, 2022
@bartoszherba bartoszherba deleted the IN-386-product-list-page-items-on-product-list-page-are-displayed-as-having-price-0 branch October 12, 2022 07:47
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.

3 participants