Skip to content

Fix PDP widget placement to work on all themes (Luma + Hyva)#2

Open
ayeshanisar786 wants to merge 1 commit into
mainfrom
fix/pdp-widget-portable-placement
Open

Fix PDP widget placement to work on all themes (Luma + Hyva)#2
ayeshanisar786 wants to merge 1 commit into
mainfrom
fix/pdp-widget-portable-placement

Conversation

@ayeshanisar786

Copy link
Copy Markdown
Contributor

Problem

The PDP "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 after="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> + explicit getChildHtml).

Fix

Reparent the block to the standard product.info.additional slot — a real, rendered slot just after the add-to-cart area on:

  • Luma (the Magento\Catalog\Block\Product\View\Additional block renders its children),
  • vanilla Hyva (rendered at product-info.phtml right after add-to-cart),
  • custom Hyva child themes (same slot, e.g. Keystation renders it in the buy box).

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>/getChildHtml workaround removed.

🤖 Generated with Claude Code

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>
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