Skip to content

fix: compare button not showing on product detail page in Shopware 6.7#94

Open
bdgraue wants to merge 2 commits into
FriendsOfShopware:mainfrom
bdgraue:fix/detail-page-compare-button
Open

fix: compare button not showing on product detail page in Shopware 6.7#94
bdgraue wants to merge 2 commits into
FriendsOfShopware:mainfrom
bdgraue:fix/detail-page-compare-button

Conversation

@bdgraue

@bdgraue bdgraue commented Mar 9, 2026

Copy link
Copy Markdown

Problem

The compare button does not appear on the product detail page in Shopware 6.7.

Cause

The template buy-widget.html.twig extends @Storefront/storefront/page/product-detail/buy-widget.html.twig
with block page_product_detail_buy_container — neither the file nor the block exist in Shopware 6.7.

The correct file is @Storefront/storefront/component/buy-widget/buy-widget.html.twig
with block buy_widget_buy_container.

Fix

  • Updated sw_extends path to component/buy-widget/buy-widget.html.twig
  • Updated block name to buy_widget_buy_container
  • Changed page.product to product (directly available in the buy-widget component context)
  • Removed unused navigationTree and categoryTree parameters

The core template moved from page/product-detail/buy-widget.html.twig
  to component/buy-widget/buy-widget.html.twig in Shopware 6.7.
  The original template is kept for backwards compatibility.
@bdgraue bdgraue force-pushed the fix/detail-page-compare-button branch from ab8a1fb to 53a9721 Compare March 9, 2026 11:43
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