Issue: Products With Required Variants With Wide Price Range

For selling things with required varients where each variant has a separate SKU and price (sometimes larger size is more expensive) you either have to set the parent product price to $0 or to the lowest priced variant.

If you set it to $0, it shows "contact us for price" which is not good.

If you set it to the lowest priced variant and the highest priced variant is say twice as expensive (say lowest variant total is $50 and highest is $100), then it is very misleading to customers what the price is when they only see the lowest price on grid/list view before going to the product detail page.

Ideally, on products with required variants, the price should show a range from the cheapest to most expensive variant: $50-$100.


If you have only 1 option for a product we can offer you the following solution:

1. Create the "app/addons/my_changes/init.php" file with the following content:


2. Create the "app/addons/my_changes/func.php" file with the following content:

function fn_my_changes_gather_additional_product_data_post(&$product, $auth, $params)
if (empty($product[‘price’]) && !empty($product[‘product_options’])) {
$price_from = 0;
$price_to = 0;
$option = reset($product[‘product_options’]);
if (!empty($option[‘variants’])) {
foreach ($option[‘variants’] as $variant_id => $variant) {
if ($variant[‘modifier_type’] == ‘A’ && !empty($variant[‘modifier’])) {
$price = $variant[‘modifier’];
if (empty($price_from)) {
$price_from = $price;
if (empty($price_to)) {
$price_to = $price;
if ($price > $price_to) {
$price_to = $price;
if ($price < $price_from) {
$price_from = $price;
$product[‘price_from’] = $price_from;
$product[‘price_to’] = $price_to;

3. Create the "design/themes/[theme]/templates/addons/my_changes/hooks/products/prices_block.override.tpl" file with the following content:

{if !$details_page && !$product.price && $product.price_from && $product.price_to}
    {include file="common/price.tpl" value=$product.price_from class="ty-price-num"} - {include file="common/price.tpl" value=$product.price_to class="ty-price-num"}

If you have more than 1 option for a product, more serious modification is requied. Please, contact us by e-mail:

Best regards,