Page 1 of 3 123 LastLast
Results 1 to 10 of 73

Hybrid View

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

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

    I've seen a few posts here asking about this or something similar. I got some help from a few sources to get this working for me.. I thought I'd share my solution in case anyone else is looking for something similar. You need to set up the appropriate override for the tpl_modules_attributes.php file (includes/templates/YOUR_TEMPLATE/templates)

    Product attributes by default appear in a vertical format based on the sort order for each attribute. For a few attributes, this is cool, but for more than a few attributes, it can make the product pages a little unwielding.. I needed to have attributes appear in two columns side by side. I wanted to keep this simple.. I figured that using the existing sort order features would allow me to use the admin controls to place the attributes where I wanted them to appear and the order they should appear in. Even numbered attributes appear in the left column, while odd numbered attributes appear on the right. (by number I mean the sort order number)

    There is only one caveat.. I had a friend helping me, and I didn't want to bug him too much.. His orginal solution got me part way there, but didn't split the odd and even sort order numbers the way I wanted.. I figured out how to get his orginal solution to split the attributes between odd and even sort order numbers in two columns.. However, I couldn't figure our how to get attributes with sort order "1" to appear correctly.. (This attribute always appeared in the left column with the even numbered attributes) So I worked around this by having my attibute sort order start with "2" (so now I am skipping/not using "1" or "0" as a sort order), and it solves the problem.. Even sort order numbers appear on the left, and odd sort order numbers appear on the right. Oh I also have the form field appear below the label just to make the final layout a little neater looking.

    Hope someone else finds this useful..

    Display product attributes in two columns (display attributes side by side)
    Attached Files Attached Files

  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)

    One additional caveat.. The attributes will appear in the shopping cart in a vertical list with the even numbered attributes followed by the odd numbered attributes... For me this is fine.. Just wanted to let anyone using this know just in case.. I may one day look into adding a two column attribute display in the shopping cart too..

    Attributes layout horizontal
    Attributes layout two columns

    Attributes layout side by side
    Attributes layout pairs

  3. #3
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

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

    Not sure how useful this coding will be but your sharing is appreciated.

    Who knows, maybe somebody will run with it and create a "must have" module.

  4. #4
    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)

    It's very useful IMO when you have product with over 10 attributes. My client didn't like the way the product pages looked with 10+ attributes lined up in a vertical stack. (and I tended to agree with her)

    Many folks seem happy with the attributes layout as is (perhaps you are one of those satisfied folks), but IMO, for products with lots of attributes, the vertical stack looks a bit uninviting.. I shared my solution because in looking for a solution to this layout issue here on this forum, I found other people looking for somthing similar.. I'm sure it will be useful for someone who is looking to to what I was trying to do..

  5. #5
    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

  6. #6
    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!

  7. #7
    Join Date
    May 2008
    Posts
    11
    Plugin Contributions
    0

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

    Thank you! just what I needed!

  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 AgA View Post
    how can i add another column? i tried messing around with the code but i had no success. also i would like the atribute value to be on on the same row with the atribute name...
    I wish I could help.. I didn't make this modification, a programmer friend of mine did this for me.. I just decided to share it with the community..

    Quote Originally Posted by roy(irishtaxi) View Post
    Thank you! just what I needed!
    You are very welcome.. Glad it worked for you..

  9. #9
    Join Date
    May 2008
    Location
    Foxburg, PA
    Posts
    13
    Plugin Contributions
    0

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

    Hi All,

    Forgive me if my understanding of the requirement here is incorrect but the ability to specify number of columns for attribute images comes with Zen Cart (I use 1.3.8a).

    This has already been discussed in this post.

    Regards,
    Vab

  10. #10
    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 need to read through this post again.. Your understanding of the requirement here is indeed incorrect.. I have explained what this mod does and what the before and after result looks like including sample sites so that it's clear.. This mod is not about the attribute IMAGES. I am very much aware that the ability to specify columns for attribute IMAGES is built in.. This mod is about the ATTRIBUTES themselves as a distinct entity..

    As you may be aware, attributes only appear in one vertical stack. You add one and it appears... You add more, and they appear one right below the last.. This mod puts them in two columns side by side.. Nothing more.. Nothing less..

 

 
Page 1 of 3 123 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