Displaying 1 result from an estimated 1 matches for "cart_item_options".
2006 Feb 27
1
Nested hash from form params into create()?
...nds it to my
add_to_cart controller method. Params contains a product variation_id
and a list of chosen options (eg. color, size, etc).
Any help greatly appreciated.
Thanks,
Peter
params =
{
"commit"=>"Add To Cart",
"variation_id"=>"1",
"cart_item_options"=>{"6"=>{"option_id"=>"74"},
"7"=>{"option_id"=>"97"},
"5"=>{"option_id"=>"47"}}
}
## CONTROLLER ##
def add_to_cart
CartI...