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?

2

try to modify your template next way:

         {item_options}
             {if selected}<strong>{option_label}</strong> {option_name}: {option_value}{/if}
        {/item_options}
| improve this answer | |
  • 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 – doubleplusgood Mar 18 '13 at 17:18

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.