Skip to Content
Menu
This question has been flagged
1390 Views

I created a transaction route which calls 

request.website.sale_reset()
return request.redirect('/test/success')

 then I have a route

@http.route(['/test/success'], type='http', auth="public", website=True, sitemap=False, save_session=False)
def shop_payment_confirmation(self, **post):
sale_order_id = request.session.get('sale_last_order_id')
if sale_order_id:
order = request.env['sale.order'].sudo().browse(sale_order_id)
return request.render("test.confirmation", {
'order': order,
})
else:
return request.redirect('/shop')

Everything is fine, however, the cart still showed the quantity. Then I tried to click on the cart and it said it was empty. So I guess the cart was actually cleared, but this is not a great user experience. I wonder why this is happening.


Avatar
Discard
Related Posts Replies Views Activity
2
Oct 25
2732
1
Sep 25
2744
3
Jul 25
4123
1
May 25
2211
4
May 25
3578