Based on the online example, POS Online Store, I want to add a button to
add to cart in the SQLFORM.grid. So if my grid goes like this:
def store():
fields = [db.product.name,db.product.product_code,db.product.
productcategory,db.product.description,db.product.price]
orderby =db.product.name
links = [lambda row: A('+',_href=URL("default","cart",args=[row.id]))]
powerusers = auth.has_membership('managers')
grid=SQLFORM.grid(db.product,fields=fields,orderby=orderby,deletable=
powerusers,editable=powerusers,paginate=10,links=links)
return dict(grid=grid)
Where and how can I add a button to the grid that would add the product to
the shopping cart??? the shopping cart is basically the same as Massimo's
POS Online Store example.
Links this way works but its not adding anything, it is just a link to
another page, I want to add the product to the cart.
Thanks