Advertisement
Guest User

Untitled

a guest
May 28th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. $.post("/shop/cart/update",{product_id : productid, add_qty : 1, set_qty : 0})
  2.  
  3.     @http.route(['/shop/cart/update'], type='http', auth="public", methods=['POST'], website=True)
  4.     def cart_update(self, product_id, add_qty=1, set_qty=0, **kw):
  5.         cr, uid, context = request.cr, request.uid, request.context
  6.         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))
  7.         return request.redirect("/shop/cart")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement