Issue
I'm trying to show cross sell products into a product.info.details tab
Here's interested part of my code in catalog_product_view.xml:
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\ProductList\Crosssell" template="Magento_Catalog::product/list/items.phtml" name="crosssell.tab" as="crossselltab" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Cross sell</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
</block>
</referenceBlock>
But it doesn't show me anything.
Solved
Solved with this code:
<block class="Magento\Checkout\Block\Cart\Crosssell" template="Magento_Catalog::product/list/items.phtml" name="crosssell.tab" as="crossselltab" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Cross sell</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
</block>
Solution
Solved with this code:
<block class="Magento\Checkout\Block\Cart\Crosssell" template="Magento_Catalog::product/list/items.phtml" name="crosssell.tab" as="crossselltab" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Cross sell</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
</block>
Answered By - user10264453 Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.