How Add after/before positioning in pre existing xml block
How to upsell block move before product.info.details block
<block class="Magento\Catalog\Block\Product\ProductList\Upsell" name="product.upsellslider" template="Magento_Catalog::product/list/upsell.phtml"> <arguments> <argument name="type" xsi:type="string">upsell</argument> </arguments> </block>
Asked
Active
Viewed 1,101 times
1
Ravindrasinh Zala
- 2,125
- 3
- 14
- 46
2 Answers
1
put below line after product.info.details
<move element="<blockName>" destination="<DestinationName>" after="product.info.details"/>
You have to put above line after product.info.details block/container will be generated else it will not find that block.
Ronak Chauhan
- 6,183
- 2
- 28
- 65
1
Now add your upsell block before="product.info.details"
<block class="Magento\Catalog\Block\Product\ProductList\Upsell" name="product.upsellslider" before="product.info.details" template="Magento_Catalog::product/list/upsell.phtml">
<arguments>
<argument name="type" xsi:type="string">upsell</argument>
</arguments>
</block>
Ravindrasinh Zala
- 2,125
- 3
- 14
- 46