0

I would like to update my customer order email and printable invoice so that each product line item looks like this:

1 x SHIRTRED | Red | Tshirt
  • 1 is the quantity ordered
  • SHIRTRED is the SKU
  • Red is the attribute option that was chosen
  • Tshirt is the product name

I have already updated my uc-order--customer.tpl.php code to look like this:

<b><?php print $product->qty; ?> x </b> <?php print $product->model; ?> | <?php print $product->title; ?> | <?php print $product->details; ?>

The attribute options are printed as a ul list, which causes them to wrap to the next line below the other info for this product. I would like to remove the ul li formatting from the product's attributes in the customer order email and the printable invoice so that the info can be on a single line/table row. I found this in uc_order.module:

$product->details .= theme('item_list', array('items' => $attributes));

Would I just change 'item_list' to something else in a template.php function? If so, what would I change it to? If not, how else can I accomplish this change?

Thanks!

0

Not exactly what I was asking for, but I did find a workaround that works for the most part. I copied the uc-order--customer.tpl.php file into my theme dir and added css for the ul to the head in that file. (display: inline-block and a few padding, margin, and list-style styles). The only issue now is the emailed order invoice. The CSS doesn't follow along into the email, so it's a bit of a mess. Open to any suggestions on how to handle that, or a better way overall.

EDITED TO ADD: I ended up copying the product line items from the uc-order--admin.tpl.php file. The attributes therein are not styled as a list, so it was a breeze to use that code.

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.