Brainstorming for UC theming improvements in D6 version

Posts: 51
Joined: 10/20/2007

We've been doing a lot of Ubercart theming lately, and I wanted to open a brainstorming thread for both small and major things that would improve theming for UC.

Here are some of the issues we've noticed:
- inconsistent use of - and _ in id/class names
- use of markup for styling instead of spans/divs, eg.
<td class="cart-block-summary-total"><strong>Total:</strong> $913.71</td>
- using img tags for images inline instead of via CSS so they can be changed (*cough* icons in cart block *cough*)
- also another example of inline stuff that's hard to adjust, the (View cart) (Checkout) links in cart-block-summary-checkout
- lack of wrapper div around or additional class on each item such as displayed product fields or attributes -- for example, without busting it out in a template file, it's impossible to apply styling to or around all displayed product fields like weight, dimensions, etc.
- use of tables for, well, everything Smiling
- lack of identifying class for all UC elements, like tables and form buttons -- for example, if we wanted to apply a certain styling to all UC-related tables, like view cart, checkout, review cart, etc., or all of the submit buttons on cart/checkout pages, we'd have to list them all individually

Posts: 534
Joined: 08/13/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer

I deleted my post about the same subject, so I post my suggestions as comment here :

In the product listing, the column that contain the name of the product have an attribute width=100% in the td tag.

To do that : in the uc_product.module
replace :

<?php
$data
['name'][] = array('data' => l($node->title, 'node/'. $node->nid), 'width' => '100%');
?>

By :

<?php
$data
['name'][] = array('data' => l($node->title, 'node/'. $node->nid), 'class' => 'product-name');
?>

And then create the following rule in uc_product.css :

.product-name {
  width:100%
}

Posts: 925
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

I don't know whether this still applies to the D6 Form API, but it would be nice to remove all markup from the _form() functions. Specifically, eliminate #type=markup, #prefix, and #suffix properties by moving this stuff into form theme functions.

--

<tr>.

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Great thoughts here... I can add some of my own later, but I wanted to +1 especially TR's suggestion. I don't think I'd thought of that before, but this would be one stellar way to handle the various messages and things we add into checkout and settings forms. I'd like to pursue that further later if possible.

Also on the radar, though it probably won't happen for Uber Tuber is the addition of default .tpl.php files in modules. We should be able to make good use of this feature, but we might need someone to show us when/where. Smiling

Posts: 1293
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

I would like to suggest the theming of any type of output screen. For us, specifically, this means the "My Files" section which is included in the File Downloads module (uc_file). I've actually already done this successfully with my current build, so I'd be more than happy to supply a patch whenever the time is right Smiling

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com