Loaded Commerce Community

Banner


Board index » Loaded Commerce Support » General Support

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Help with Product Attributes alignment please.
PostPosted: Fri Jan 13, 2012 12:25 pm 
Offline
CRE Freak
User avatar

Joined: Sat Oct 21, 2006 12:00 am
Posts: 41
I am using v6.4.1a Pro and have quite a few color options for one of my product attributes. The left column is vertically aligning to the middle and I would like it to vertically align to the top so the text that says, "Hardware:
Please select your color choice" displays on the same line as the first color choice. Does anyone know where in the product_info.tpl.php file I would change the valign from the default middle to top?

Image

:D Thanks in advance to anyone who may be of help.


Top
 Profile  
 
 Post subject: Re: Help with Product Attributes alignment please.
PostPosted: Fri Jan 13, 2012 8:43 pm 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2404
Location: New Zealand
The problem with that is the way in which attributes are derived by cre and the fact that you seem to be using other attributes on the page as well.

So a simple fix would be - /includes/modules/product_info/product_attributes.php
Find this block:
Code:
foreach ($options_HTML as $op_data) {
                ?>
              <tr>
                <td class="main"><?php echo $op_data['label']; ?></td>
                <td class="main"><?php echo $op_data['HTML'];  ?></td>
              </tr>
<?php
                } //end of foreach

Replace with:
Code:
foreach ($options_HTML as $op_data) {
                ?>
              <tr>
                <td class="main" style="vertical-align:top;width:28%"><?php echo $op_data['label']; ?></td>
                <td class="main" style="padding-top:12px"><?php echo $op_data['HTML'];  ?></td>
              </tr>
<?php
                } //end of foreach

this will modify the radio list you show, but it'll change the text field attribute above it in ways you may not like.
So the width % is setting how wide the space you want the instruction to get, the padding-top is pushing the top radio choice down to line up with the instruction.

You could change those values to suit.
Anyway, give it a go.

Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
 Post subject: Re: Help with Product Attributes alignment please.
PostPosted: Fri Jan 13, 2012 9:18 pm 
Offline
CRE Freak
User avatar

Joined: Sat Oct 21, 2006 12:00 am
Posts: 41
Thank you so much, Simon! That did the trick. I played around with the percentage and at 45% all the attributes look great. I really appreciate your time on this. Have a lovely weekend. :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Board index » Loaded Commerce Support » General Support

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Wed May 23, 2012 8:43 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Forums Latest Activity

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy