Bad total_discount increment in force_recalculate_total in satchmo_store.shop.models

Create issue
Issue #1395 new
Benoit Clennett-Sirois created an issue

lineitem.discount ends up being added twice IF condition on line 956 is True.

Not 100% sure why, but that's what it is.

For example, if you intercept the satchmo_price_query signal and add some custom adjustments, and combine this with a Satchmo Discount, then the total_discount value ends up wrong.

A simple fix to that:

take out:

{{{

!python

938: total_discount += lineitem.discount 960: total_discount += linediscount }}}

And just after {{{

!python

972: fullprices.append(lineitem.line_item_price) }}} Add this: {{{

!python

        total_discount += lineitem.discount

}}}

Comments (2)

  1. Benoit Clennett-Sirois reporter

    Sorry I don't have a patch, I have my own fork and those aren't the only changes in the fork.

  2. Log in to comment