Sure.
Note that I only use the lowest specific price for a product. I dont use the getUnitPrice() function, so deleted it.
I only show the lowest price in the product-list view.
So this example is suitable for me, but should help you .
Product.php (in override/classes)
class Product extends ProductCore { public static function getMinSpecificPrice($id_product) { $query = ' SELECT price, from_quantity FROM '._DB_PREFIX_.'specific_price WHERE id_product = '.$id_product.' AND price = ( SELECT MIN(price) FROM '._DB_PREFIX_.'specific_price WHERE id_product = '.$id_product.' ); '; $lowestPrice = Db::getInstance()->executeS($query); if ($lowestPrice && !empty($lowestPrice)) { return Tools::displayPrice($lowestPrice[0]['price']); } } //end of function } //end of class override
and for the product-listgrid.tpl (located at: themes/theme_folder/templates/catalog/_partials/miniatures/product-listgrid.tpl)
or product.tpl located at: (themes/classic/templates/catalog/_partials/miniatures/product.tpl).
search for: product_price_and_shipping and add the code.
<!-- search for this --> {block name='product_price_and_shipping'} <!-- add this code to your template file --> {* assign lowest price when product has specific price *} {assign var=specificPrice value=Product::getMinSpecificPrice($product.id_product)} {if $product.show_price} <div class="product-price-and-shipping"> {if $specificPrice} <span itemprop="price" class="price">from: {$specificPrice} </span> {else} <span class="price">{$product.price}</span> {/if} </div> {/if}