1

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
  • Can anyone tell me if this is a bug possibly fixed in versions since 2.0.2 or if this is just the way Magento 2 behaves? Commented Jun 27, 2016 at 10:04

1 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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