跳至內容
選單
此問題已被標幟
1398 瀏覽次數

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.


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
10月 25
2771
1
9月 25
2777
3
7月 25
4149
1
5月 25
2242
4
5月 25
3596