Why default cross sell layout doesn't show anything?
I'm trying to show cross sell on product page anfd I'm using default logic:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title"xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
But it doesn't work.
catalog_product_view_xml :
<?xml version="1.0"?>
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="sidebar.additional">
<block class="SmartwavePortoBlockTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
</referenceContainer>
<referenceBlock name="product.info.review" remove="true"></referenceBlock>
<referenceBlock name="product.info.price" remove="true"></referenceBlock>
<move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
<move element="product.info.review" destination="product.info.main" before="product.info.price"/>
<move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
<!--<referenceBlock name="catalog.product.related" remove="true"/>-->
<move element="product.info.overview" destination="product.info.main" after="product.info.review"/>
<referenceContainer name="after.body.start">
<block class="MagentoCatalogBlockProductView" name="product_custom" template="Magento_Catalog::product/view/product_custom.phtml" before="-"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_config" after="-" template="Magento_Catalog::product/view/config.phtml"/>
</referenceContainer>
<referenceContainer name="columns.top">
<block class="MagentoCatalogBlockProductView" name="prev_next_products" template="Magento_Catalog::product/view/prev_next.phtml" before="-"/>
</referenceContainer>
<move element="prev_next_products" destination="product.info.main" before="-"/>
<move element="page.main.title" destination="product.info.main" before="-"/>
<referenceContainer name="product.info.social">
<block class="MagentoCatalogBlockProductView" name="g4b_product_property" template="product/view/g4b_product_property.phtml" />
<block class="SmartwavePortoBlockTemplate" name="product_view_addthis_links" after="-" template="Magento_Catalog::product/view/addthis.phtml"/>
</referenceContainer>
<referenceContainer name="content">
<block class="SmartwavePortoBlockRickSnippet" name="rich_snippet" template="Magento_Catalog::product/view/rich_snippet.phtml" before="-"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_main_custom_block" ifconfig="porto_settings/product/main_custom_block" before="product.info.main" template="Magento_Catalog::product/view/main_custom_block.phtml"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_main_custom_block2" after="-" template="Magento_Catalog::product/view/main_custom_block2.phtml"/>
<block class="SmartwavePortoBlockTemplate" name="product.clearer" after="product.info.media" template="Magento_Catalog::product/view/clearer.phtml"/>
</referenceContainer>
<move element="product_view_main_custom_block2" destination="product.info.main" after="product.info.overview"/>
<move element="product.info.main" destination="content" after="product.info.media"/>
<referenceContainer name="columns">
<block class="SmartwavePortoBlockTemplate" name="side_popup" after="-" template="Magento_Catalog::product/view/side_popup.phtml"/>
</referenceContainer>
<referenceBlock name="product.info.upsell" remove="true"/>
<referenceBlock name="product.info.details">
<block class="MagentoCatalogBlockProductView" name="g4b_product_plus.tab" as="g4b_product_plus" template="product/view/g4b_product_plus.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Advantages</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_features.tab" as="g4b_product_features" template="product/view/g4b_product_features.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Features</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_gommini.tab" as="g4b_product_gommini" template="product/view/g4b_product_gommini.phtml" group="detailed_info" >
<arguments>
<argument translate="false" name="title" xsi:type="string">Gommini</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_cad.tab" as="g4b_product_cad" template="product/view/g4b_product_cad.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Type/CAD Data</argument>
</arguments>
</block>
<block name="g4b_product_cad.tab" remove="true"/>
<block class="MagentoCatalogBlockProductProductListUpsell" template="Magento_Catalog::product/list/items.phtml" name="upsell.tab" as="upselltab" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Type/CAD Data</argument>
<argument name="type" xsi:type="string">upsell</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_accessories.tab" as="g4b_product_accessories" template="product/view/g4b_product_accessories.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
</arguments>
</block>
<block name="g4b_product_accessories.tab" remove="true"/>
<block class="MagentoCatalogBlockProductView" name="g4b_product_video.tab" as="g4b_product_video" template="product/view/g4b_product_video.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Video</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_download.tab" as="g4b_product_download" template="product/view/g4b_product_download.phtml" group="detailed_info" >
<arguments>
<argument translate="false" name="title" xsi:type="string">Download</argument>
</arguments>
</block>
<block name="reviews.tab" remove="true"></block>
<block name="g4b_product_gommini.tab" remove="true"></block>
</referenceBlock>
</body>
magento2 product magento2.2.6 cross-sells
add a comment |
I'm trying to show cross sell on product page anfd I'm using default logic:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title"xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
But it doesn't work.
catalog_product_view_xml :
<?xml version="1.0"?>
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="sidebar.additional">
<block class="SmartwavePortoBlockTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
</referenceContainer>
<referenceBlock name="product.info.review" remove="true"></referenceBlock>
<referenceBlock name="product.info.price" remove="true"></referenceBlock>
<move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
<move element="product.info.review" destination="product.info.main" before="product.info.price"/>
<move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
<!--<referenceBlock name="catalog.product.related" remove="true"/>-->
<move element="product.info.overview" destination="product.info.main" after="product.info.review"/>
<referenceContainer name="after.body.start">
<block class="MagentoCatalogBlockProductView" name="product_custom" template="Magento_Catalog::product/view/product_custom.phtml" before="-"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_config" after="-" template="Magento_Catalog::product/view/config.phtml"/>
</referenceContainer>
<referenceContainer name="columns.top">
<block class="MagentoCatalogBlockProductView" name="prev_next_products" template="Magento_Catalog::product/view/prev_next.phtml" before="-"/>
</referenceContainer>
<move element="prev_next_products" destination="product.info.main" before="-"/>
<move element="page.main.title" destination="product.info.main" before="-"/>
<referenceContainer name="product.info.social">
<block class="MagentoCatalogBlockProductView" name="g4b_product_property" template="product/view/g4b_product_property.phtml" />
<block class="SmartwavePortoBlockTemplate" name="product_view_addthis_links" after="-" template="Magento_Catalog::product/view/addthis.phtml"/>
</referenceContainer>
<referenceContainer name="content">
<block class="SmartwavePortoBlockRickSnippet" name="rich_snippet" template="Magento_Catalog::product/view/rich_snippet.phtml" before="-"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_main_custom_block" ifconfig="porto_settings/product/main_custom_block" before="product.info.main" template="Magento_Catalog::product/view/main_custom_block.phtml"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_main_custom_block2" after="-" template="Magento_Catalog::product/view/main_custom_block2.phtml"/>
<block class="SmartwavePortoBlockTemplate" name="product.clearer" after="product.info.media" template="Magento_Catalog::product/view/clearer.phtml"/>
</referenceContainer>
<move element="product_view_main_custom_block2" destination="product.info.main" after="product.info.overview"/>
<move element="product.info.main" destination="content" after="product.info.media"/>
<referenceContainer name="columns">
<block class="SmartwavePortoBlockTemplate" name="side_popup" after="-" template="Magento_Catalog::product/view/side_popup.phtml"/>
</referenceContainer>
<referenceBlock name="product.info.upsell" remove="true"/>
<referenceBlock name="product.info.details">
<block class="MagentoCatalogBlockProductView" name="g4b_product_plus.tab" as="g4b_product_plus" template="product/view/g4b_product_plus.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Advantages</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_features.tab" as="g4b_product_features" template="product/view/g4b_product_features.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Features</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_gommini.tab" as="g4b_product_gommini" template="product/view/g4b_product_gommini.phtml" group="detailed_info" >
<arguments>
<argument translate="false" name="title" xsi:type="string">Gommini</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_cad.tab" as="g4b_product_cad" template="product/view/g4b_product_cad.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Type/CAD Data</argument>
</arguments>
</block>
<block name="g4b_product_cad.tab" remove="true"/>
<block class="MagentoCatalogBlockProductProductListUpsell" template="Magento_Catalog::product/list/items.phtml" name="upsell.tab" as="upselltab" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Type/CAD Data</argument>
<argument name="type" xsi:type="string">upsell</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_accessories.tab" as="g4b_product_accessories" template="product/view/g4b_product_accessories.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
</arguments>
</block>
<block name="g4b_product_accessories.tab" remove="true"/>
<block class="MagentoCatalogBlockProductView" name="g4b_product_video.tab" as="g4b_product_video" template="product/view/g4b_product_video.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Video</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_download.tab" as="g4b_product_download" template="product/view/g4b_product_download.phtml" group="detailed_info" >
<arguments>
<argument translate="false" name="title" xsi:type="string">Download</argument>
</arguments>
</block>
<block name="reviews.tab" remove="true"></block>
<block name="g4b_product_gommini.tab" remove="true"></block>
</referenceBlock>
</body>
magento2 product magento2.2.6 cross-sells
add a comment |
I'm trying to show cross sell on product page anfd I'm using default logic:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title"xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
But it doesn't work.
catalog_product_view_xml :
<?xml version="1.0"?>
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="sidebar.additional">
<block class="SmartwavePortoBlockTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
</referenceContainer>
<referenceBlock name="product.info.review" remove="true"></referenceBlock>
<referenceBlock name="product.info.price" remove="true"></referenceBlock>
<move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
<move element="product.info.review" destination="product.info.main" before="product.info.price"/>
<move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
<!--<referenceBlock name="catalog.product.related" remove="true"/>-->
<move element="product.info.overview" destination="product.info.main" after="product.info.review"/>
<referenceContainer name="after.body.start">
<block class="MagentoCatalogBlockProductView" name="product_custom" template="Magento_Catalog::product/view/product_custom.phtml" before="-"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_config" after="-" template="Magento_Catalog::product/view/config.phtml"/>
</referenceContainer>
<referenceContainer name="columns.top">
<block class="MagentoCatalogBlockProductView" name="prev_next_products" template="Magento_Catalog::product/view/prev_next.phtml" before="-"/>
</referenceContainer>
<move element="prev_next_products" destination="product.info.main" before="-"/>
<move element="page.main.title" destination="product.info.main" before="-"/>
<referenceContainer name="product.info.social">
<block class="MagentoCatalogBlockProductView" name="g4b_product_property" template="product/view/g4b_product_property.phtml" />
<block class="SmartwavePortoBlockTemplate" name="product_view_addthis_links" after="-" template="Magento_Catalog::product/view/addthis.phtml"/>
</referenceContainer>
<referenceContainer name="content">
<block class="SmartwavePortoBlockRickSnippet" name="rich_snippet" template="Magento_Catalog::product/view/rich_snippet.phtml" before="-"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_main_custom_block" ifconfig="porto_settings/product/main_custom_block" before="product.info.main" template="Magento_Catalog::product/view/main_custom_block.phtml"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_main_custom_block2" after="-" template="Magento_Catalog::product/view/main_custom_block2.phtml"/>
<block class="SmartwavePortoBlockTemplate" name="product.clearer" after="product.info.media" template="Magento_Catalog::product/view/clearer.phtml"/>
</referenceContainer>
<move element="product_view_main_custom_block2" destination="product.info.main" after="product.info.overview"/>
<move element="product.info.main" destination="content" after="product.info.media"/>
<referenceContainer name="columns">
<block class="SmartwavePortoBlockTemplate" name="side_popup" after="-" template="Magento_Catalog::product/view/side_popup.phtml"/>
</referenceContainer>
<referenceBlock name="product.info.upsell" remove="true"/>
<referenceBlock name="product.info.details">
<block class="MagentoCatalogBlockProductView" name="g4b_product_plus.tab" as="g4b_product_plus" template="product/view/g4b_product_plus.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Advantages</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_features.tab" as="g4b_product_features" template="product/view/g4b_product_features.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Features</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_gommini.tab" as="g4b_product_gommini" template="product/view/g4b_product_gommini.phtml" group="detailed_info" >
<arguments>
<argument translate="false" name="title" xsi:type="string">Gommini</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_cad.tab" as="g4b_product_cad" template="product/view/g4b_product_cad.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Type/CAD Data</argument>
</arguments>
</block>
<block name="g4b_product_cad.tab" remove="true"/>
<block class="MagentoCatalogBlockProductProductListUpsell" template="Magento_Catalog::product/list/items.phtml" name="upsell.tab" as="upselltab" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Type/CAD Data</argument>
<argument name="type" xsi:type="string">upsell</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_accessories.tab" as="g4b_product_accessories" template="product/view/g4b_product_accessories.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
</arguments>
</block>
<block name="g4b_product_accessories.tab" remove="true"/>
<block class="MagentoCatalogBlockProductView" name="g4b_product_video.tab" as="g4b_product_video" template="product/view/g4b_product_video.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Video</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_download.tab" as="g4b_product_download" template="product/view/g4b_product_download.phtml" group="detailed_info" >
<arguments>
<argument translate="false" name="title" xsi:type="string">Download</argument>
</arguments>
</block>
<block name="reviews.tab" remove="true"></block>
<block name="g4b_product_gommini.tab" remove="true"></block>
</referenceBlock>
</body>
magento2 product magento2.2.6 cross-sells
I'm trying to show cross sell on product page anfd I'm using default logic:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title"xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
But it doesn't work.
catalog_product_view_xml :
<?xml version="1.0"?>
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="sidebar.additional">
<block class="SmartwavePortoBlockTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
</referenceContainer>
<referenceBlock name="product.info.review" remove="true"></referenceBlock>
<referenceBlock name="product.info.price" remove="true"></referenceBlock>
<move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
<move element="product.info.review" destination="product.info.main" before="product.info.price"/>
<move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
<!--<referenceBlock name="catalog.product.related" remove="true"/>-->
<move element="product.info.overview" destination="product.info.main" after="product.info.review"/>
<referenceContainer name="after.body.start">
<block class="MagentoCatalogBlockProductView" name="product_custom" template="Magento_Catalog::product/view/product_custom.phtml" before="-"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_config" after="-" template="Magento_Catalog::product/view/config.phtml"/>
</referenceContainer>
<referenceContainer name="columns.top">
<block class="MagentoCatalogBlockProductView" name="prev_next_products" template="Magento_Catalog::product/view/prev_next.phtml" before="-"/>
</referenceContainer>
<move element="prev_next_products" destination="product.info.main" before="-"/>
<move element="page.main.title" destination="product.info.main" before="-"/>
<referenceContainer name="product.info.social">
<block class="MagentoCatalogBlockProductView" name="g4b_product_property" template="product/view/g4b_product_property.phtml" />
<block class="SmartwavePortoBlockTemplate" name="product_view_addthis_links" after="-" template="Magento_Catalog::product/view/addthis.phtml"/>
</referenceContainer>
<referenceContainer name="content">
<block class="SmartwavePortoBlockRickSnippet" name="rich_snippet" template="Magento_Catalog::product/view/rich_snippet.phtml" before="-"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_main_custom_block" ifconfig="porto_settings/product/main_custom_block" before="product.info.main" template="Magento_Catalog::product/view/main_custom_block.phtml"/>
<block class="SmartwavePortoBlockTemplate" name="product_view_main_custom_block2" after="-" template="Magento_Catalog::product/view/main_custom_block2.phtml"/>
<block class="SmartwavePortoBlockTemplate" name="product.clearer" after="product.info.media" template="Magento_Catalog::product/view/clearer.phtml"/>
</referenceContainer>
<move element="product_view_main_custom_block2" destination="product.info.main" after="product.info.overview"/>
<move element="product.info.main" destination="content" after="product.info.media"/>
<referenceContainer name="columns">
<block class="SmartwavePortoBlockTemplate" name="side_popup" after="-" template="Magento_Catalog::product/view/side_popup.phtml"/>
</referenceContainer>
<referenceBlock name="product.info.upsell" remove="true"/>
<referenceBlock name="product.info.details">
<block class="MagentoCatalogBlockProductView" name="g4b_product_plus.tab" as="g4b_product_plus" template="product/view/g4b_product_plus.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Advantages</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_features.tab" as="g4b_product_features" template="product/view/g4b_product_features.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Features</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_gommini.tab" as="g4b_product_gommini" template="product/view/g4b_product_gommini.phtml" group="detailed_info" >
<arguments>
<argument translate="false" name="title" xsi:type="string">Gommini</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_cad.tab" as="g4b_product_cad" template="product/view/g4b_product_cad.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Type/CAD Data</argument>
</arguments>
</block>
<block name="g4b_product_cad.tab" remove="true"/>
<block class="MagentoCatalogBlockProductProductListUpsell" template="Magento_Catalog::product/list/items.phtml" name="upsell.tab" as="upselltab" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Type/CAD Data</argument>
<argument name="type" xsi:type="string">upsell</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_accessories.tab" as="g4b_product_accessories" template="product/view/g4b_product_accessories.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
</arguments>
</block>
<block name="g4b_product_accessories.tab" remove="true"/>
<block class="MagentoCatalogBlockProductView" name="g4b_product_video.tab" as="g4b_product_video" template="product/view/g4b_product_video.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Video</argument>
</arguments>
</block>
<block class="MagentoCatalogBlockProductView" name="g4b_product_download.tab" as="g4b_product_download" template="product/view/g4b_product_download.phtml" group="detailed_info" >
<arguments>
<argument translate="false" name="title" xsi:type="string">Download</argument>
</arguments>
</block>
<block name="reviews.tab" remove="true"></block>
<block name="g4b_product_gommini.tab" remove="true"></block>
</referenceBlock>
</body>
magento2 product magento2.2.6 cross-sells
magento2 product magento2.2.6 cross-sells
edited 19 mins ago
Teja Bhagavan Kollepara
3,01241949
3,01241949
asked Dec 10 '18 at 11:35
ortoDevortoDev
14
14
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Try this:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
nothing changed
– ortoDev
Dec 10 '18 at 13:02
Maybe it's caused by Crosssell.php ?
– ortoDev
Dec 10 '18 at 13:02
Have you tried after cache flush? Actually in your code I found like this:<argument translate="true" name="title"xsi:type="string">Accessories</argument>
But it should be like this :<argument translate="true" name="title" xsi:type="string">Accessories</argument>
– kunj
Dec 10 '18 at 13:12
nothing even with cache flushed
– ortoDev
Dec 10 '18 at 13:18
Ok, add below code invendor/autoload.php
you will have error if is there any error in code.ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
– kunj
Dec 10 '18 at 13:21
|
show 5 more comments
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f253048%2fwhy-default-cross-sell-layout-doesnt-show-anything%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try this:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
nothing changed
– ortoDev
Dec 10 '18 at 13:02
Maybe it's caused by Crosssell.php ?
– ortoDev
Dec 10 '18 at 13:02
Have you tried after cache flush? Actually in your code I found like this:<argument translate="true" name="title"xsi:type="string">Accessories</argument>
But it should be like this :<argument translate="true" name="title" xsi:type="string">Accessories</argument>
– kunj
Dec 10 '18 at 13:12
nothing even with cache flushed
– ortoDev
Dec 10 '18 at 13:18
Ok, add below code invendor/autoload.php
you will have error if is there any error in code.ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
– kunj
Dec 10 '18 at 13:21
|
show 5 more comments
Try this:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
nothing changed
– ortoDev
Dec 10 '18 at 13:02
Maybe it's caused by Crosssell.php ?
– ortoDev
Dec 10 '18 at 13:02
Have you tried after cache flush? Actually in your code I found like this:<argument translate="true" name="title"xsi:type="string">Accessories</argument>
But it should be like this :<argument translate="true" name="title" xsi:type="string">Accessories</argument>
– kunj
Dec 10 '18 at 13:12
nothing even with cache flushed
– ortoDev
Dec 10 '18 at 13:18
Ok, add below code invendor/autoload.php
you will have error if is there any error in code.ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
– kunj
Dec 10 '18 at 13:21
|
show 5 more comments
Try this:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
Try this:
<block class="MagentoCatalogBlockProductProductListCrosssell" name="catalog.product.crosssell" template="Magento_Catalog::product/list/items.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Accessories</argument>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
<block class="MagentoCatalogBlockProductProductListItemContainer" name="related.product.addto" as="addto">
<block class="MagentoCatalogBlockProductProductListItemAddToCompare"
name="related.product.addto.compare" as="compare"
template="Magento_Catalog::product/list/addto/compare.phtml"/>
</block>
</block>
answered Dec 10 '18 at 12:05
kunjkunj
2,6702523
2,6702523
nothing changed
– ortoDev
Dec 10 '18 at 13:02
Maybe it's caused by Crosssell.php ?
– ortoDev
Dec 10 '18 at 13:02
Have you tried after cache flush? Actually in your code I found like this:<argument translate="true" name="title"xsi:type="string">Accessories</argument>
But it should be like this :<argument translate="true" name="title" xsi:type="string">Accessories</argument>
– kunj
Dec 10 '18 at 13:12
nothing even with cache flushed
– ortoDev
Dec 10 '18 at 13:18
Ok, add below code invendor/autoload.php
you will have error if is there any error in code.ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
– kunj
Dec 10 '18 at 13:21
|
show 5 more comments
nothing changed
– ortoDev
Dec 10 '18 at 13:02
Maybe it's caused by Crosssell.php ?
– ortoDev
Dec 10 '18 at 13:02
Have you tried after cache flush? Actually in your code I found like this:<argument translate="true" name="title"xsi:type="string">Accessories</argument>
But it should be like this :<argument translate="true" name="title" xsi:type="string">Accessories</argument>
– kunj
Dec 10 '18 at 13:12
nothing even with cache flushed
– ortoDev
Dec 10 '18 at 13:18
Ok, add below code invendor/autoload.php
you will have error if is there any error in code.ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
– kunj
Dec 10 '18 at 13:21
nothing changed
– ortoDev
Dec 10 '18 at 13:02
nothing changed
– ortoDev
Dec 10 '18 at 13:02
Maybe it's caused by Crosssell.php ?
– ortoDev
Dec 10 '18 at 13:02
Maybe it's caused by Crosssell.php ?
– ortoDev
Dec 10 '18 at 13:02
Have you tried after cache flush? Actually in your code I found like this:
<argument translate="true" name="title"xsi:type="string">Accessories</argument>
But it should be like this : <argument translate="true" name="title" xsi:type="string">Accessories</argument>
– kunj
Dec 10 '18 at 13:12
Have you tried after cache flush? Actually in your code I found like this:
<argument translate="true" name="title"xsi:type="string">Accessories</argument>
But it should be like this : <argument translate="true" name="title" xsi:type="string">Accessories</argument>
– kunj
Dec 10 '18 at 13:12
nothing even with cache flushed
– ortoDev
Dec 10 '18 at 13:18
nothing even with cache flushed
– ortoDev
Dec 10 '18 at 13:18
Ok, add below code in
vendor/autoload.php
you will have error if is there any error in code. ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
– kunj
Dec 10 '18 at 13:21
Ok, add below code in
vendor/autoload.php
you will have error if is there any error in code. ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
– kunj
Dec 10 '18 at 13:21
|
show 5 more comments
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f253048%2fwhy-default-cross-sell-layout-doesnt-show-anything%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown