Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Changing Product Info Layout

    Hi!
    I looked in the tutorials and forums and tried several things including relocating the Attributes Module --> section but I can't work out what I need to change.

    As it is the Add to Cart section looks like this (as this product has an attribute the customer much choose)

    [SCR]http://www.lemongrassmedia.com/zc_01.jpg[/SCR]

    I want the Attributes Options section to be allighned right so it has more chance of being seen than it is now.

    I have managed to align the Please Choose text right but can't align the rest.

    eg

    [SCR]http://www.lemongrassmedia.com/zc_02.jpg[/SCR]

    I'm guessing it's something in tpl_modules_attributes.php - here is what I have now

    Code:
    <?php
    
    /**
    
     * Module Template
    
     *
    
     * Template used to render attribute display/input fields
    
     *
    
     * @package templateSystem
    
     * @copyright Copyright 2003-2005 Zen Cart Development Team
    
     * @copyright Portions Copyright 2003 osCommerce
    
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    
     * @version $Id: tpl_modules_attributes.php 3208 2006-03-19 16:48:57Z birdbrain $
    
     */
    
    ?>
    <style type="text/css">
    #productAttributes {
    	text-align: right;
    }
    </style>
    
    
    <div id="productAttributes">
    
    <?php if ($zv_display_select_option > 0) { ?>
    
    <h3 id="attribsOptionsText"><?php echo TEXT_PRODUCT_OPTIONS; ?></h3>
    
    <?php } // show please select unless all are readonly ?>
    
    
    
    <?php
    
        for($i=0;$i<sizeof($options_name);$i++) {
    
    ?>
    
    <?php
    
      if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
    
    ?>
    
    <h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3>
    
    <?php
    
      }
    
    ?>
    
    <style type="text/css">
    #wrapperAttribsOptions {
    	text-align: right;
    }
    </style>
    <div class="wrapperAttribsOptions">
    
    <h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>
    
    <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>
    
    <br class="clearBoth" />
    
    </div>
    
    
    
    
    
    <?php if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') { ?>
    
        <div class="ProductInfoComments"><?php echo $options_comment[$i]; ?></div>
    
    <?php } ?>
    
    
    
    
    
    <?php
    
    if ($options_attributes_image[$i] != '') {
    
    ?>
    
    <?php echo $options_attributes_image[$i]; ?>
    
    <?php
    
    }
    
    ?>
    
    <br class="clearBoth" />
    
    <?php
    
        }
    
    ?>
    
    
    
    
    
    <?php
    
      if ($show_onetime_charges_description == 'true') {
    
    ?>
    
        <div class="wrapperAttribsOneTime"><?php echo TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION; ?></div>
    
    <?php } ?>
    
    
    
    
    
    <?php
    
      if ($show_attributes_qty_prices_description == 'true') {
    
    ?>
    
        <div class="wrapperAttribsQtyPrices"><?php echo zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK, 10, 10) . '&nbsp;' . '<a href="javascript:popupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ATTRIBUTES_QTY_PRICES, 'products_id=' . $_GET['products_id'] . '&products_tax_class_id=' . $products_tax_class_id) . '\')">' . TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK . '</a>'; ?></div>
    
    <?php } ?>
    
    </div>
    Can someone please point me in the right direction or change the code for me (my head hurts)
    Last edited by Kim; 27 Nov 2011 at 06:19 AM.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Changing Product Info Layout

    Why are you hard-coding css into a template PHP file?
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Re: Changing Product Info Layout

    Hi

    Hmm good question, I think I just did it to get it to work - well almost.

    I'm just trying to get the purchase option in the same area of the product page, rather than one justified left and the add to cart justified right

  4. #4
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: Changing Product Info Layout

    OK, first take css code out of your php file.

    Open you template>templates>tpl_modules_attributes.php and find this code:

    <div class="wrapperAttribsOptions">
    <h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>
    <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>
    <br class="clearBoth" />
    </div>

    and change to this

    <div class="wrapperAttribsOptions">
    <h4 class="forward"><?php echo $options_name[$i]; ?></h4>
    <div class="forward"><?php echo "\n" . $options_menu[$i]; ?></div>
    <br class="clearBoth" />
    </div>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Play with it long enough and you will break it.

  5. #5
    Join Date
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Re: Changing Product Info Layout

    Hi usernameone:

    Thanks for the help, it's almost what I need

    [SCR]http://www.lemongrassmedia.com/ti_03.jpg[/SCR]

    The `Select Flavour' and `Please Choose' are aligned incorrectly.

    I probably need to change another section in the same file and I tried but messed it up more !

    Then I thought is it possible to put it all in the Add to Cart bordered box - so it's all in the one section and almost no chance of the customer missing it?

    Thanks again for your help
    Ernie
    Last edited by Kim; 27 Nov 2011 at 06:19 AM.

  6. #6
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: Changing Product Info Layout

    To be able to help further a link to you site is needed. I don't know without looking.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Play with it long enough and you will break it.

  7. #7
    Join Date
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Re: Changing Product Info Layout

    Hi!

    Here is a link to the page where the Add to Cart is off alignment.

    http://goo.gl/FU4XF

    (I used a shortener to stop Google indexing the sitename in its results)

    Any help you can give is appreciated

    Ernie

  8. #8
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: Changing Product Info Layout

    Off alignment to where. It looks good to me
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Play with it long enough and you will break it.

  9. #9
    Join Date
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Re: Changing Product Info Layout

    Hi!

    Damn I don't deserve help I listed the wrong product link:

    http://goo.gl/SDlle

    Image of alignment of Options section on page:

    [SCR]http://www.lemongrassmedia.com/to1.jpg[/SCR]

    Thanks
    Ernie
    Last edited by Kim; 27 Nov 2011 at 06:20 AM.

  10. #10
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: Changing Product Info Layout

    Open your templates stylesheet.css and find the below code

    .forward, #shoppingCartDefault #PPECbutton{
    float: right;
    }

    Add this to it , #attribsOptionsText

    I haven't tested it so let me know if it works
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Play with it long enough and you will break it.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. tpl product info display: changing product info
    By rbecq in forum Setting Up Categories, Products, Attributes
    Replies: 15
    Last Post: 4 Dec 2012, 05:07 PM
  2. Product info layout
    By CheekyCockney in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 17 Jun 2011, 09:47 AM
  3. Adding a new Product Type Info Page Layout options :: Product - General
    By bn17311 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Aug 2010, 06:42 PM
  4. change price layout on product info and product listings
    By chrislum24 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Jun 2009, 12:13 PM
  5. changing product info layout
    By jford in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Nov 2006, 09:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg