#1 by goosey
Hi all, I'm new to oTree and I'm trying to modify the Shop (online grocery app) example code featured on the oTree website's demos page. I would like to provide the player with a fixed amount of money (say $500) they can spend in the shop, and enforce this limit by not allowing the player to add any more items if the total price of their cart is going to go above $500. I tried to set a max value for the total_price variable but it's not being enforced in the way I want it to be. Any help would be appreciated! Thanks!