Google logo
4.9 on Google
Get a free Magento audit

Recommendations on page speed, accessibility issues, and real user experience data

Skip to main article

How to get Price Ranges for Configurable Bundle Products

In this example, we are retrieving the bundle product itself through an observer In Magento 2.

How to get Price Ranges for Configurable Bundle Products
10 mins

Develo is a leading Magento agency and eCommerce web development company based in Birmingham, in the UK, serving clients globally since 2010.

If you need to know how to get price ranges for configurable bundle products in Magento 2 when indexing into Algolia - then this article is for you.

In this example, we are retrieving the bundle product itself through an observer. But however you get a reference to the product, as long as it's an instance of Magento\Catalog\Model\Product, then the below code will work.

Firstly you will need to use some existing Magento classes and add them to your constructor function:


And then the code to retrieve the min and max prices for the bundle and create the price range string looks like:

You then have your price range string ($formattedPriceRange)

If you enjoyed this article, read our other Learn articles to see more from our Magento developers or browse the site to see what else we do with Adobe Commerce, PunchOut Catalog and more.

Last updated: April 15, 2024

Do you need support from our Magento certified professionals?