Skip to content


Subversion checkout URL

You can clone with
Download ZIP


changing shipping price in admin #158

vladyslav2 opened this Issue · 3 comments

2 participants


If you change shipping price through admin order total price did not changed, so need to recount in manually.

I believe we need to add something like this in BaseOrder:

    def save(self, force_insert=False, force_update=False, using=None):
        self.order_subtotal = Decimal(0.00)
        for item in self.items.all():
        self.order_subtotal += item.line_total

        self.order_total = self.order_subtotal
        for i in self.extraorderpricefield_set.all():
            self.order_total += i.value

        return super(BaseOrder, self).save(force_insert, force_update, using)

PS i'm new in git, so tell me please, if i have some useful code, i should not paste it in issue, just make a pull requests ? Thank you.


and if you're change item price - order total price still will be the same.

maybe it's better to use pre_save signal, to take all data from POST.


Sorry but I don't think it's a good idea to do all this work in the save() method of Order. Seems like too much overhead for such a feature. Maybe if you come up with a better solution, but for now, I'm closing.

@alesdotio alesdotio closed this

I too think that is it not a good solution.
But i have no idea what to do with this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.