Page 1 of 2 12 LastLast
Results 1 to 10 of 73

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    11
    Plugin Contributions
    0

    Default Re: Display product attributes in two columns (side by side)

    Thanks Diva
    Havent tried it yet but just what I was looking for

  2. #2
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Display product attributes in two columns (side by side)

    You are very welcome.. Happy to share!

  3. #3
    Join Date
    Nov 2007
    Location
    Pennsauken, NJ
    Posts
    71
    Plugin Contributions
    0

    Default Re: Display product attributes in two columns (side by side)

    Sorry, but I need to revive this thread.

    I tried the above solution, but it didn't work.

    I have a listing of pizza toppings that I wanted to put into two columns. And below that I have a text box. All this solution did was make the text box appear to the right of the toppings. The toppings all remained in one column.

    Does anybody else have a way to address this?

    Chris

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

    Default Re: Display product attributes in two columns (side by side)

    I'm a Zen-Newbie, so don't shoot me.

    I recently created a Santa Letter item in my store, which featured 20 different background choices. I had setup background as a radio button item, but it would work for checkbox groups too. Since I had images for each, I had the option of setting the rows & columns.

    Not sure if it would help you. But pizza toppings could have images.

    Quote Originally Posted by innovafire View Post
    Sorry, but I need to revive this thread.

    I tried the above solution, but it didn't work.

    I have a listing of pizza toppings that I wanted to put into two columns. And below that I have a text box. All this solution did was make the text box appear to the right of the toppings. The toppings all remained in one column.

    Does anybody else have a way to address this?

    Chris
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Image1.jpg 
Views:	1024 
Size:	21.2 KB 
ID:	3149   Click image for larger version. 

Name:	Image3.jpg 
Views:	1396 
Size:	48.1 KB 
ID:	3150  

  5. #5
    Join Date
    Nov 2007
    Location
    Pennsauken, NJ
    Posts
    71
    Plugin Contributions
    0

    Default Re: Display product attributes in two columns (side by side)

    Yeah, they could. But I don't have images for them and don't want t go to the trouble. I'm really surprised that the option would be limited to making columns only out of image attributes.

    Anybody else got an idea on this?

  6. #6
    Join Date
    Nov 2007
    Location
    Pennsauken, NJ
    Posts
    71
    Plugin Contributions
    0

    Default Re: Display product attributes in two columns (side by side)

    OK, here's the code for that file that should have created the two colum attributes (from the ZIP file above). I'm only just learning PHP, so I'm hoping someone that knows better can spot what needs to be changed.

    <?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 $
    */
    ?>
    <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') {
    $output .= '<h3 class="attributesComments">'.$options_comment[$i].'</h3>';
    }

    $output .= '
    <div class="wrapperAttribsOptions">
    <h4 class="optionName back">'.$options_name[$i].':</h4>
    <br class="clearBoth" />
    <div class="back">' . $options_menu[$i].'</div>
    <br class="clearBoth" />
    </div>';

    if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') {
    $output .= '<div class="ProductInfoComments">'.$options_comment[$i].'</div>';
    }

    if ($options_attributes_image[$i] != '') {
    $output .= $options_attributes_image[$i];
    }

    $output .= '<br class="clearBoth" />';

    if ($i%2) {
    if($i==0){
    $left_col .= $output;
    } else {
    $right_col .= $output;
    }
    } else {
    $left_col .= $output;
    }
    $output ='';

    }

    ?>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr valign="top">
    <td width="50%"><?php echo $left_col; ?></td>
    <td width="50%"><?php echo $right_col; ?></td>
    </tr>
    </table>


    <?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="javascriptopupWindowPrice(\'' . 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>

  7. #7
    Join Date
    Feb 2007
    Location
    Sacramento, CA
    Posts
    64
    Plugin Contributions
    1

    Default Re: Display product attributes in two columns (side by side)

    I dropped this right in and it worked for me. Thanks a lot. :-)

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Display product attributes in two columns (side by side)

    Quote Originally Posted by jsksathiya View Post
    How to display 4 columns. Please help me!!!!!!!
    The code I shared in the original post is only for two columns, and I while I understand how it was done, I didn't write the code (it was done for me). So I can't really help with this. You might try posting this as a NEW question so you can get assistance with this.. Feel free to reference this post if someone needs an example of how this was accomplished with two columns.

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Display product attributes in two columns (side by side)

    Quote Originally Posted by solarflare View Post
    I'm a Zen-Newbie, so don't shoot me.

    I recently created a Santa Letter item in my store, which featured 20 different background choices. I had setup background as a radio button item, but it would work for checkbox groups too. Since I had images for each, I had the option of setting the rows & columns.

    Not sure if it would help you. But pizza toppings could have images.
    Quote Originally Posted by innovafire View Post
    Yeah, they could. But I don't have images for them and don't want t go to the trouble. I'm really surprised that the option would be limited to making columns only out of image attributes.

    Anybody else got an idea on this?
    I was re-reading this, and wanted to add a few additional comments. Each single product attribute consists of two parts:
    1. Option (Attribute) Name (i.e. Color)
    2. Option (Attribute) Value (i.e. Blue, Red, Green)

    My solution will place the attributes+it's associated values in two columns. (As you have already seen) It will not do anything about the layout of the attribute values.

    You are looking for a solution that takes and individual attribute and change the default display from this:

    Attribute (Color)
    --- Attribute Value (Green)
    --- Attribute Value (Blue)
    --- Attribute Value (Red)
    --- Attribute Value (Purple)

    And display it like this:
    Attribute Name (Color)
    --- Attribute Value (Green) ----- --- Attribute Value (Blue)
    --- Attribute Value (Red) -------- --- Attribute Value (Purple)

    or something similar...

    Solarflare is absolutely right. The way to achieve what you want is to use images for your attribute values. Once you have images for your attribute values, you can easily achieve what you want using the admin controls. If you don't want to use images, then you are looking at custome code.

    I'm not sure you're gonna find help on this forum to create the code you want. I sought an outside resource to help me with the code I attached to the O/P because I never saw anyone post a solution. You may have to do the same if you REALLY don't want to use images and the existing admin controls/features. From my searches, I got the impression that the general consensus is that this is not a desireable/needed feature since there is a way to do what you want by creating and associating images with your attribute (options) values.

    Good luck with your store!

  10. #10
    Join Date
    Jan 2010
    Posts
    16
    Plugin Contributions
    0

    Default Re: Display product attributes in two columns (side by side)

    Quote Originally Posted by solarflare View Post
    I'm a Zen-Newbie, so don't shoot me.

    I recently created a Santa Letter item in my store, which featured 20 different background choices. I had setup background as a radio button item, but it would work for checkbox groups too. Since I had images for each, I had the option of setting the rows & columns.

    Not sure if it would help you. But pizza toppings could have images.
    Is there a way to do this with display only images. I have wooden swords that have many different styles that I want to display side by side instead of just vertically, but just can't figure it out. You can see it at the link below.

    https://www.wholesalemartialartsequi...roducts_id=261

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 How to change product attribute image swatches to display side-by-side
    By Fjolsvith in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 4 Nov 2019, 09:27 PM
  2. All attributes are in a straight line, how to make it display side by side?
    By justwonder2 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 2 Dec 2012, 10:39 PM
  3. Display-only attributes: show side by side?
    By cosmocanuck in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 Mar 2011, 04:29 AM
  4. Display product attributes in two columns
    By DivaVocals in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Dec 2007, 04:44 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