Add user group data in order confirmation email

Hi,



Just wondering if someone could point me in the right direction - I'm attempting to include usergroup data in the subject of the order confirmation emails that get sent to the orders department so Wholesale orders can be easily separated from regular consumer orders. Has anyone been successful in pulling up the right variable in order_notification.tpl? Something similar to using either


{if $user_data.usergroups[$usergroup.usergroup_id] == "10"}Wholesale{/if}



or


{if $smarty.session.auth.usergroup_Ids && $smarty.session.auth.usergroup_Ids|in_array:10}Wholesale{/if}



… however neither of these solutions return the correct results.



Any pointers would be greatly appreciated.



Thanks!

Trouble is that users can belong to more than one group. Also, pricing and related group info is on items, not the order. I don't believe group info is stored with the items after the price has been determined.

Thanks for the response tbirnseth - still getting my head around what information is available in each section. In the meantime I've flagged “Wholesale” orders by calling up the order quantities to be greater than our average consumers orders - it's a quick and dirty fix but until I can find a better solution it will have to suffice.