ProductVariation._get_fullPrice() uses wrong order in price list.

Create issue
Issue #1441 resolved
Dag Königrör created an issue

The sale or discount price of product variations are wrong if you have multiple valid prices (eg in order to show strike prices).

See ProductVariation._get_fullPrice() from line 288

The mistake happens in line 296: {{{ #!python

return qty_discounts.order_by('-quantity')[0].dynamic_price }}}

where the desc order of quantity removes the asc order of prices. So the order_by-statement must be extended:

{{{ #!python

return qty_discounts.order_by('-quantity', 'price')[0].dynamic_price }}}

Now the lowest price will be shown as sale/discount price and if you have another valid price which is grater than this price you can use it as strike price.

Comments (1)

  1. Log in to comment