1

I'm trying to get Item Options to show in Cartthrob's order email. I'm using the code from the documentation but it doesn't seem to work;

{exp:cartthrob:order_items order_id="{entry_id}" }
    <tr class="{item:switch="odd|even"}">
        <td><span style="font-size:12px;">{item:entry_id}</span></td>
        <td><span style="font-size:12px;">
            {item:title}
                <p>
                    <span style="font-size:9px;">
                {item_options}
                     <strong>{option_label}</strong> {option_name}: {option_value}
                {/item_options}
                </span>
                </p>
            {if is_package}
                <p>
                    <span style="font-size:9px;">
                {packages}
                    {sub:title}<br /> 
                {/packages}
                </span>
                </p>
            {/if}
            </span></td>
        <td align="right"><span style="font-size:12px;">{item:quantity}</span></td>
        <td align="center">&nbsp;</td>
        <td align="right"><span style="font-size:12px;">{item:price}<br />(w/ tax: {item:price_plus_tax})</span></td>
        <td align="right">
            <span style="font-size:12px;">
                {item:subtotal}<br />(w/ tax: {item:subtotal_plus_tax})
            </span>
        </td>
        <td align="right">
            {if item:product_download_url}
            <span style="font-size:12px;"><a href="{exp:cartthrob:get_download_link field='product_download_url' entry_id='{item:entry_id}'}">Download</a></span>
            {/if}
        </td>
    </tr>
{/exp:cartthrob:order_items}

The item options are definitely captured because when I view the order entry it shows all the selected options.

Has anyone else had this trouble?

1 Answer 1

2

try to modify your template next way:

         {item_options}
             {if selected}<strong>{option_label}</strong> {option_name}: {option_value}{/if}
        {/item_options}
1
  • Hmm, weird. It works now. Heh. Maybe it's 'cause I'm on an older version. Got a question for you though to follow up about a database error with MX Google Map on the eec.ms forum. :P Commented Mar 18, 2013 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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