Ir al contenido
Menú
Se marcó esta pregunta
1389 Vistas

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
oct 25
2728
1
sept 25
2740
3
jul 25
4123
1
may 25
2210
4
may 25
3574