Please help me to solve this issue
I want to get data from a table in a channel, keep them in a combo box, select one row from data rows and see them in cart.
The issue
I cannot see my selection in cart. Cart is empty.
I have a table in channel “Tea & Herbs”.
It has four rows and three columns
I pull data from my “Tea & Herbs” Channel. I use data modifier.
————————————————————————————
| {option_value} | {option_label} | {price} |
————————————————————————————
| 1 | 25gm | $3.50 |
————————————————————————————
| 2 | 110gm | $10.50 |
————————————————————————————
| 3 | 1lb | $50.50 |
————————————————————————————
| 4 | 15p | $5.50 |
————————————————————————————
This is the code I use to pull data from above table
{exp:channel:entries}
{exp:cartthrob:add_to_cart_form entry_id="{entry_id}" return=""}
<select>
{retail_price}
<option {selected} value="{option_value">{option_name} {price}</option>
{/retail_price}
<input type="submit" value="Add to Cart">
</select>
{/exp:cartthrob:add_to_cart_form}
This is the out put
(Combo box and and button)
I want to select one choice out of four choices. Then I want to see my selection in cart at the same page.
This is the code I use
{exp:cartthrob:item_options row_id="{row_id}" }
{select}
<option {selected} value="{option_value}">{option_name} {price}</option>
{/select}
{/exp:cartthrob:item_options}
But nothing appears in the page.
Please guide me to find my choice in the cart.
Thank you very much
