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

[Cache] Offer ids not correctly added to product page availability block identities #62

Closed
rbayet opened this issue Aug 12, 2021 · 0 comments
Assignees
Labels

Comments

@rbayet
Copy link
Contributor

rbayet commented Aug 12, 2021

Private method \Smile\RetailerOffer\Block\Catalog\Product\Retailer\Availability::getStoreOffers is called twice when displaying the availability block :

  • once to initialize the JS component
  • a second time to provide identities for the block

Unfortunately, the second time, the list of offers stored in $this->storeOffers is reset to an empty array.

This means that the block/page cache might not be cleared when a listed offer changes (availability, price or stock change).

@rbayet rbayet self-assigned this Aug 12, 2021
@rbayet rbayet added the bug label Aug 12, 2021
@rbayet rbayet changed the title Offer ids not correctly added to product page availability block identities [Cache] Offer ids not correctly added to product page availability block identities Aug 12, 2021
rbayet added a commit that referenced this issue Aug 12, 2021
…ties-missing-offers

Fixes #62 Correctly add offer ids to identities
@rbayet rbayet closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant