Skip to content

Add ESI dynamic fragments for product actions and notifications - #103

Open
Codencode wants to merge 1 commit into
litespeedtech:masterfrom
Codencode:feature/dynamic-fragment-esi
Open

Add ESI dynamic fragments for product actions and notifications#103
Codencode wants to merge 1 commit into
litespeedtech:masterfrom
Codencode:feature/dynamic-fragment-esi

Conversation

@Codencode

Copy link
Copy Markdown
Contributor

This PR adds support for dynamic ESI fragments on the product page, specifically for:

  • the add-to-cart block;
  • product notifications.

The goal is to keep context-dependent product page sections dynamic even when the product page is served from full-page cache.

This should address the remaining issues reported in: #94

In particular, the problems that were not covered by the already merged PR: #96

Please note that this solution requires two generic theme hooks:

  • displayDynamicFragmentBefore
  • displayDynamicFragmentAfter

These hooks are being proposed for the Hummingbird theme here: PrestaShop/hummingbird#988, if accepted, I will propose the same hooks for the classic theme as well.

Without those hooks in the theme templates, the module cannot wrap the relevant product page fragments before the page output is cached.

@WuhuaChen, what do you think about this approach?

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.

1 participant