How to Move Related Products Above Product Tabs in Magento 2
In today’s E-commerce market, having a great product or service is simply not enough because the conversion rate for customers can only be increased by a visually appealing online store as well as a convenient purchase process.
Providing convenience to the customers while purchasing any product and pushing them towards conversion quickly is one of the most important aspects that directly affect the sales ratio.
Also, optimizing the store design to increase the average order value is a real thing!
For example, if you are cross-selling products in your Magento 2 store by displaying related products, you can move related products above product tabs in Magento 2.
By doing so, you decrease the irrelevant need for scrolling, increase the average order value, provide your customer a chance to purchase the product they may need, and eventually increase the sales of your Magento 2 store; using the below solution.
Method to Move Related Products Above Product Tabs in Magento 2
The default Magento 2 shows related products as shown below:
Add below code to existing Module or Theme layout file catalog_product_view.xml
1 |
<move element="product.info.details" destination="content.aside" after="catalog.product.related"/> |
OR you can also use this
1 |
<move element="catalog.product.related" destination="content" before="product.info.details"/> |
If a related product block gets overlapped or added into product info/product media content then just add CSS like mentioned below:
1 2 3 |
.block.related{ clear: both; } |
If you want to move upsell products above the product tab then use the below code.
1 |
<move element="product.info.details" destination="content.aside" after="product.info.upsell"/> |
The output will be display as shown below:
That’s easy, right?
Any confusion regarding this post is welcomed in the Comments section below.
I’d be happy to help.
Thank You.
Chandresh Chauhan
He has been with Meetanshi for more than three years now as a certified Magento developer. A silent guy whom you can always find solving clients' issues, is an avid reader too.
Prev
How to Update Total Using JS File in Magento 2
How to Use KnockoutJS Foreach in Magento 2
Next