How to move related products at very bottom of product page?
-
09-03-2021 - |
Domanda
I want to display the related products at very bottom of the product page. How can I move it?
Can anyone please explain me?
Soluzione
By default Related products show in content.aside
container, which is render after content
container.
Both content.aside
and content
comes in main
container, So you can move related product after main
container.
You can use page.bottom.container
for moving, use following code in
app/design/frontend/{Package}/{theme}/Magento_Catalog/layout/catalog_product_view.xml
<?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="page.bottom.container" />
</body>
</page>
Hope above will help!
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange