0

enter image description here[![enter image description here][2]][2]

How can I remove the attributes that appear for each product and add a new template which contains different styles and content?

3
  • docs.magento.com/user-guide/catalog/… Is it exactly what you need?
    – nhungo duc
    Jan 21 at 2:59
  • in magento the attribute call part is used here for example file vendor\magento\module-catalog\view\frontend\templates\product\list.phtml ``` <?= $block->getProductDetailsHtml($_product) ?> ```
    – nhungo duc
    Jan 21 at 3:02
  • I think not, I am using a theme to make these modifications, and what I want is to remove all the components that are there and add some with different styles. It should be noted that I want to do this on the home page. Jan 21 at 3:45

1 Answer 1

0

You need to overrite magentoRoot/vendor/magento/module-catalog/view/frontend/templates/product/list.phtml file.

For Theme

app/design/frontend/VednoreName/ModuleName/Magento_Catalog/layout

catalog_category_view.xml

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="category.products.list">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Magento_Catalog::product/list.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

For Module

app/code/VendoreName/ModuleName/view/frontend/layout

catalog_category_view.xml

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="category.products.list">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">VendoreName_ModuleName::product/list.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>
3
  • For Call Custom Block magento.stackexchange.com/questions/249055/…
    – Msquare
    Jan 21 at 4:17
  • How can I do that but from a theme ? And delete de others elements like wish lish, compare products, etc. Jan 21 at 4:33
  • Thank you very much, this helped me a lot. However, the changes I want to make are on the home page. When creating a new theme it does not show items on this page, so I made use of the page builder to show products and it is just that widget that I want to modify. Jan 21 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.