Remove price from category page in magento 2
-
15-03-2021 - |
Pregunta
In magento2 - I want to remove price from category page ( product listing ) in magento enterprise version.
Solución
app/design/frontend/vendor/themename/Magento_Catalog/templates/product/list.phtml
<?php //echo $block->getProductPrice($_product) ?>
comment this line...
Note : if you not find file above path than copy from
vendor/magento/module-catalog/view/frontend/templates/product/list.phtml
to
app/design/frontend/vendor/themename/Magento_Catalog/templates/product/list.phtml
Otros consejos
We use a different solution with applying a CSS-style:
div.products.wrapper.grid.products-grid div.price-box.price-final_price, /*pricing in categories*/
{
display: none !important;
}
We use this way to avoid problems with the updated list.phtml
file by further Magento updates and in our case hiding price is only a "nice to have" but not business-critical.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange