Possible issue in CartItem._get_line_unitprice

Issue #1215 new
fylb created an issue

Hi there,
we have a price workflow that dynamically adds price detail changes on cart items.
It seems there is a little problem of price re-computation when details are added/updated.
In CartItem, we have:


def _get_line_unitprice(self, include_discount=True):
    # Get the qty discount price as the unit price for the line.
    # ....
    self.detail_price = self.get_detail_price()
    #send signal to possibly adjust the unitprice
    if include_discount:
        signals.satchmo_cartitem_price_query.send(self, cartitem=self)
    price = self.qty_price + self.detail_price


I think detail_price should be computed after the satchmo_cartitem_price_query, shouldn't it ?
Thanks for all the great work :)


Comments (0)

  1. Log in to comment