Skip to content

Commit 7429610

Browse files
committed
MC-17387: Fatal error appears when adding bundle product to Cart from Wish list page
- Added required blocks viewmodels
1 parent 1e58f70 commit 7429610

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_bundle.xml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
<block class="Magento\Wishlist\Block\Item\Configure" name="view.addto.wishlist.bundle"
2424
template="Magento_Wishlist::item/configure/addto/wishlist.phtml" />
2525
<block class="Magento\Catalog\Block\Product\View\AddTo\Compare" name="view.addto.compare.bundle" after="view.addto.wishlist"
26-
template="Magento_Catalog::product/view/addto/compare.phtml" />
26+
template="Magento_Catalog::product/view/addto/compare.phtml">
27+
<arguments>
28+
<argument name="addToCompareViewModel" xsi:type="object">Magento\Catalog\ViewModel\Product\Checker\AddToCompareAvailability</argument>
29+
</arguments>
30+
</block>
2731
</block>
2832
</block>
2933
</referenceBlock>
@@ -33,10 +37,22 @@
3337
<container name="product.info.bundle.options.top" as="product_info_bundle_options_top">
3438
<block class="Magento\Catalog\Block\Product\View" name="bundle.back.button" as="backButton" before="-" template="Magento_Bundle::catalog/product/view/backbutton.phtml"/>
3539
</container>
36-
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Select" name="product.info.bundle.options.select" as="select"/>
40+
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Select" name="product.info.bundle.options.select" as="select">
41+
<arguments>
42+
<argument name="tier_price_renderer" xsi:type="object">\Magento\Bundle\Block\DataProviders\OptionPriceRenderer</argument>
43+
</arguments>
44+
</block>
3745
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Multi" name="product.info.bundle.options.multi" as="multi"/>
38-
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio" name="product.info.bundle.options.radio" as="radio"/>
39-
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Checkbox" name="product.info.bundle.options.checkbox" as="checkbox"/>
46+
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio" name="product.info.bundle.options.radio" as="radio">
47+
<arguments>
48+
<argument name="tier_price_renderer" xsi:type="object">\Magento\Bundle\Block\DataProviders\OptionPriceRenderer</argument>
49+
</arguments>
50+
</block>
51+
<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Checkbox" name="product.info.bundle.options.checkbox" as="checkbox">
52+
<arguments>
53+
<argument name="tier_price_renderer" xsi:type="object">\Magento\Bundle\Block\DataProviders\OptionPriceRenderer</argument>
54+
</arguments>
55+
</block>
4056
</block>
4157
</referenceBlock>
4258
<move element="product.price.tier" destination="product.info.options.wrapper.bottom" before="-" />

0 commit comments

Comments
 (0)