1. Chris Moffitt
  2. satchmo
  3. Issues
Issue #1441 resolved

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

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

https://bitbucket.org/chris1610/satchmo/src/0f59c03f5352/satchmo/apps/product/modules/configurable/models.py

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