. I am trying to use the same concept to have customers add item sizes as well as they add the items to the cart but i am missing something!
VIEW
CART VIEW</td></tr>
{{for id, qty in cart.items():}}{{p=db.product(id)}}
<tr id="boughtItems">
<td><span style="font-weight: bold;">{{=p.item}}</span></td>
<td><span style="font-weight: bold;">{{=MoneyFormat(p.price)}}</span></td>
<td><span id="{{='item%s'%p.id}}" style="font-weight: bold;">{{=qty}}</span></td>
<td><span style="font-weight: bold;">{{=MoneyFormat(qty*p.price)}}</span></td>
<td>
CONTROLLERdef cart_callback():
id = int(request.vars.id)
if request.vars.action == 'add':
session.cart[id]=session.cart.get(id,0)+1
if request.vars.action == 'sub':
session.cart[id]=max(0,session.cart.get(id,0)-1)
return str(session.cart[id])
Regards
Mostwanted
<select>
<option selected="selecred">Choose Size</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>