This project is on a tight deadline so I coded something that works just for me. It's not fleshed out enough to post all of the code, so if someone finds this thread and wants to know how to do something like this you'll have to modify the following files.
I think this would make a cool mod if someone has the time to write it out. If you plan on doing it let me know if I can help!
includes\classes\order.php
This is the page that displays order details in a confirmation email. Find the line starting with:
Code:
$this->products_ordered_attributes .= "\n\t"
.
This line is running inside of a loop and displays each attribute one by one. Every time the loop runs you'll need to check the attribute name. I used something like this to check for OPTION A in the name of the attribute:
Code:
if (stristr($attributes_values->fields['products_options_name'],'OPTION A')) {
Then I wrote my own logic. If the option name was repeating from the last time in the loop, strip out the name and write a comma instead.
includes\templates\template_default\templates\tpl_account_history_info_default.p hp
This is the code for the account history when a customer views what has been ordered before. Similar to above you'll need to check the option name through each instance of the loop.
Code:
echo '<li>' . $order->products[$i]['attributes'][$j]['option'] . TEXT_OPTION_DIVIDER . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])) . '</li>';
includes\templates\template_default\templates\tpl_checkout_confirmation_default. php
This page displays the checkout confirmation pages. Replace each attribute instance of the loop the same as before.
Code:
<li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); ?></li>
includes\templates\template_default\templates\tpl_shopping_cart_default.php
This is what shows when adding the product to the shopping cart. The code to hook into is:
Code:
<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>