Not sure if this is a simple setting or something I am missing but it is really bugging me. Say I have a configurable product that has different prices for each variation of £10, £20 and £30. When looking in the category view it just shows £10 next to the product. Rather than "from £10". Is there a way of adding that for products that have more than one price? Thanks.
1 Answer
I asked a similar question yesterday and it got closed (for some reason). So I saw your question as related and decided to answer it.
It's not a complete solution yet, but this will help you add "Price from:" next to configurable products. Further logic can and should be added so the text only shows if there are simple products with different prices associated to the configurable.
This is what I did (Magento 2.2):
Copy
/vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml
to
/app/design/frontend/{Vendor}/{Theme}/Magento_ConfigurableProduct/templates/product/price/final_price.phtml
And add 'display_label' => __('Price from:'),
to this block od code:
<?php else: ?>
<?php echo $block->renderAmount($finalPriceModel->getAmount(), [
'display_label' => __('Price from:'),
'price_id' => $block->getPriceId('product-price-' . $idSuffix),
'price_type' => 'finalPrice',
'include_container' => true,
'schema' => $schema
]); ?>
<?php endif; ?>
You can check my complete solution here: Add "Price from" to configurable products which contain different price simple products - Magento 2