@@ -234,13 +234,19 @@ protected virtual ProductOverviewModel.ProductPriceModel PrepareProductOverviewP
234234 Product minPriceProduct = null ;
235235 foreach ( var associatedProduct in associatedProducts )
236236 {
237- //calculate for the maximum quantity (in case if we have tier prices)
238- var tmpPrice = _priceCalculationService . GetFinalPrice ( associatedProduct ,
239- _workContext . CurrentCustomer , decimal . Zero , true , int . MaxValue ) ;
240- if ( ! minPossiblePrice . HasValue || tmpPrice < minPossiblePrice . Value )
237+ var tmpMinPossiblePrice = _priceCalculationService . GetFinalPrice ( associatedProduct , _workContext . CurrentCustomer ) ;
238+
239+ if ( associatedProduct . HasTierPrices )
240+ {
241+ //calculate price for the maximum quantity if we have tier prices, and choose minimal
242+ tmpMinPossiblePrice = Math . Min ( tmpMinPossiblePrice ,
243+ _priceCalculationService . GetFinalPrice ( associatedProduct , _workContext . CurrentCustomer , quantity : int . MaxValue ) ) ;
244+ }
245+
246+ if ( ! minPossiblePrice . HasValue || tmpMinPossiblePrice < minPossiblePrice . Value )
241247 {
242248 minPriceProduct = associatedProduct ;
243- minPossiblePrice = tmpPrice ;
249+ minPossiblePrice = tmpMinPossiblePrice ;
244250 }
245251 }
246252 if ( minPriceProduct != null && ! minPriceProduct . CustomerEntersPrice )
@@ -330,10 +336,14 @@ protected virtual ProductOverviewModel.ProductPriceModel PrepareProductOverviewP
330336 else
331337 {
332338 //prices
339+ var minPossiblePrice = _priceCalculationService . GetFinalPrice ( product , _workContext . CurrentCustomer ) ;
333340
334- //calculate for the maximum quantity (in case if we have tier prices)
335- decimal minPossiblePrice = _priceCalculationService . GetFinalPrice ( product ,
336- _workContext . CurrentCustomer , decimal . Zero , true , int . MaxValue ) ;
341+ if ( product . HasTierPrices )
342+ {
343+ //calculate price for the maximum quantity if we have tier prices, and choose minimal
344+ minPossiblePrice = Math . Min ( minPossiblePrice ,
345+ _priceCalculationService . GetFinalPrice ( product , _workContext . CurrentCustomer , quantity : int . MaxValue ) ) ;
346+ }
337347
338348 decimal taxRate ;
339349 decimal oldPriceBase = _taxService . GetProductPrice ( product , product . OldPrice , out taxRate ) ;
0 commit comments