Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.post("/shop/cart/update",{product_id : productid, add_qty : 1, set_qty : 0})
- @http.route(['/shop/cart/update'], type='http', auth="public", methods=['POST'], website=True)
- def cart_update(self, product_id, add_qty=1, set_qty=0, **kw):
- cr, uid, context = request.cr, request.uid, request.context
- request.website.sale_get_order(force_create=1)._cart_update(product_id=int(product_id), add_qty=float(add_qty), set_qty=float(set_qty))
- return request.redirect("/shop/cart")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement