0

I have a Price Modifier for a product which has the usual option_value, option_name and price. I have added an additional column titled 'supplementary'.

This new column is correctly appearing within the Add to Cart form using the {supplementary} tag as follows;

{exp:cartthrob:multi_add_to_cart_form entry_id="{entry_id}"}

    {my_option}
    <input type="hidden" name="item_options[{count}][my_option]" value="{option_value}" />
    <input type="hidden" name="item_options[supplementary]" value="supplementary" /> 
    {option_name} {supplementary} {price}
    {/my_option}

{/exp:cartthrob:multi_add_to_cart_form}

However, I need this to also appear in the Basket/Cart with the selected option but it's not appearing with the following code;

{exp:cartthrob:item_options entry_id="{entry_id}" row_id="{row_id}"}
{option_label}: {option_value} {supplementary}
{/exp:cartthrob:item_options}

I was wondering if someone could tell me what I'm doing wrong? I've also tried using the following but to no avail;

{item_options:supplementary}

Thank you.

1

Fixed. After further trial and error I resolved my own question. Here's the answer in case anyone else gets stuck with something similar;

{exp:cartthrob:multi_add_to_cart_form entry_id="{entry_id}"}

    {my_option}
    <input type="hidden" name="item_options[{count}][my_option]" value="{option_value}" />
    <input type="hidden" name="item_options[{count}][additional_column]" value="{additional_column}" /> 
    {option_name} {additional_column} {price}
    {/my_option}

{/exp:cartthrob:multi_add_to_cart_form}

No need to add the additional column tag to Basket/Cart. It just outputs automatically with the following;

{exp:cartthrob:item_options entry_id="{entry_id}" row_id="{row_id}"}
{option_label}: {option_value}
{/exp:cartthrob:item_options}
|improve this answer|||||
  • Glad you got it sorted! You can accept your own answer to show this question as answered in the future. – mjr Mar 21 '13 at 18:49
  • Thanks. Just had to wait a few days to be able to answer my own question. :) – doubleplusgood Mar 27 '13 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.