Вопрос

I need to display related products below the description(bottom of the page) but in theme it is coming right side of the page(we are using Porto theme). Could anyone please tell me how to display related products bottom of the page ?

For reference please find the attached image.

enter image description here Any help will be appreciated. Thanks in advance.

Это было полезно?

Решение

If you are using other theme or your custom theme, you could customize the related products position by layout file.

In the directory app\design\frontend\Vendor\Your_theme_name\Magento_Catalog\layout\, create the file catalog_product_view.xml, in it write the codes like below, then related products will show in bottom part of product view page.

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="catalog.product.related" destination="block-name-where-you-want-to-place-it" />
    </body>
</page>

In the <move>, you could add after | before attribute to assign the element's position relative to siblings. If the attribute is omitted, the element is placed after all siblings.

I hope this will help

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top