Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

    Idea or Suggestion Adding a seperator inbetween options

    Hey All,

    After finally getting to grips of how attributes work on Zen Cart (took me the best part of 2 years!!) I have a question.

    I have a client - a manufacturer of leather chairs. On his previous website, he listed all the leather he uses, lumped into categories.

    For instance:

    carrington leather
    - Bourbon
    - Espresso
    - Jet Black

    Pista Leather
    - Caramel
    - Cream
    - Foresta

    He would like this to be replicated on his website, but as product options, meaning he wants the customer to only be able to select one style of leather.

    Easily done, except I'm not sure how I can seperate each set of options out.

    I have a feeling I may have to add a dud option and just have to settle for a drop down box or something. However, the client would also like a swatch as well, which would make seperating those very hard also!


    I'm in a conundrum!

    Thanks,
    Tom

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Adding a seperator inbetween options

    Not sure this is an easy answer. Search for 'conditional attributes' on this forum. ( eg http://www.zen-cart.com/forum/showth...nal+attributes ) A lot of people want it but haven't seen an easy answer yet. I may be wrong....

  3. #3
    Join Date
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

    Default Re: Adding a seperator inbetween options

    I've managed to find a way, at least a temporary way. You need to use attribute images for this.

    Firstly, I create the attributes. This includes adding the seperator as an attribute as well.

    Secondly, I go into attributes.php and find a line looking like:

    PHP Code:
     $tmp_attributes_image .= '<div class="attribImg">' zen_image(DIR_WS_IMAGES $products_options->fields['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' '<br />' $products_options->fields['products_options_values_name'] : '') . '</div>' "\n"
    Next, I change it into this line:

    PHP Code:
    if (in_array($products_options->fields['products_options_values_id'],array(1,22,33,44,52,58,70))){
                            
    $tmp_attributes_image .= '<br clear="all" /><h1>' str_replace('--','',$products_options->fields['products_options_values_name']) . '</h1>';
                        }else{
                          
    $tmp_attributes_image .= '<div class="attribImg">' . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' '' $products_options->fields['products_options_values_name'] : '') . zen_image(DIR_WS_IMAGES $products_options->fields['attributes_image']) . '</div>' "\n";
                         } 
    The numbers in the array are the ids of the attributes.

    The first condition (if these attributes match the ids) is to display the attribute text, not image.

    Not the best of ways, but its helped me.

 

 

Similar Threads

  1. spacing inbetween product images in new products window
    By Koda in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 30 Mar 2011, 09:51 AM
  2. Incorporate a Word Press Blog inbetween the SideBoxes
    By maverick86 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Jan 2011, 11:18 PM
  3. Gap inbetween header and category boxes in IE
    By michellepchy in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 17 Nov 2010, 07:13 PM
  4. Gap inbetween category links
    By stvicious in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Nov 2007, 07:38 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR