Fix PDP widget placement to work on all themes (Luma + Hyva)#2
Open
ayeshanisar786 wants to merge 1 commit into
Open
Fix PDP widget placement to work on all themes (Luma + Hyva)#2ayeshanisar786 wants to merge 1 commit into
ayeshanisar786 wants to merge 1 commit into
Conversation
The "Click & Collect available" widget was parented to the product.info.main container with after="product.info.price". On Hyva-based themes product.info.main is a container and the price block lives inside the inner product.info block, so the `after` reference resolved to nothing and the widget orphaned to the very bottom of the product page. Reparent to the standard product.info.additional slot, which is a real rendered slot just after the add-to-cart area on Luma, vanilla Hyva, and custom Hyva child themes. No per-theme layout override needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The PDP "Click & Collect available" widget was parented to the
product.info.maincontainer withafter="product.info.price".On Hyva-based themes
product.info.mainis a container, and the price block lives inside the innerproduct.infoblock. Soafter="product.info.price"resolved to nothing and the widget orphaned to the very bottom of the product page (after related products). Stores were working around it with per-theme layout overrides (<move>+ explicitgetChildHtml).Fix
Reparent the block to the standard
product.info.additionalslot — a real, rendered slot just after the add-to-cart area on:Magento\Catalog\Block\Product\View\Additionalblock renders its children),product-info.phtmlright after add-to-cart),No per-theme layout override needed anymore — the widget lands in the buy box on every theme out of the box.
Verified
Applied and verified live on a production Hyva store (Keystation): the widget now renders immediately after the add-to-cart / pay buttons in the buy-box column, exactly once, with the previous theme
<move>/getChildHtmlworkaround removed.🤖 Generated with Claude Code