Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Orders
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2010 at 01:11 UTC
Updated:
11 Aug 2011 at 13:31 UTC
Jump to comment: Most recent file
Code present in the invoice .tpl.php files such as
if (is_array($product->data['attributes']) && count($product->data['attributes']) > 0) {
should be moved to a template preprocess function, and the results included directly as printable template variables, or set up in a suitable way for a subsequent theme() call to deal with; this would make it much easier for designers to create and modify store invoices without understanding PHP or worrying about breaking it.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 998542-preprocess-invoice.patch | 22.16 KB | longwave |
Comments
Comment #1
longwavePatch attached that moves the complicated parts out of the templates into the preprocess function and replaces 'echo' with 'print' and closing braces with endif/endforeach for better readability.
Comment #2
longwaveMade several commits that implement this. We could probably go further and split out product rendering into its own function, move attribute rendering into uc_attribute.module, etc. but this will do for now.