Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2009
    Location
    Highlands Ranch, Colorado
    Posts
    84
    Plugin Contributions
    0

    Default Center Box Graphic and Have Center Boxes side by side

    Hi, I have two things I need to do for a home page and don't know where to begin. I've been using ZC for a few weeks now, have the latest version. Web site is at: http://www.herdoos.com/shop

    1. I need a graphic linked to an existing product page. I tried using the Featured Prods box for that purpose, but I really need just a linked image that will take me to a specific page (don't want to be limited as to using a product's image, don't want the "Featured Products" and other text in this box).

    2. I need that linked image to be sitting to the right of the Monthly Specials box. Right now they are stacked vertically.

    This is what I want:


    This is what I have now:



    Can anyone help?
    _ _ _ _ _ _ _
    DebiWebi
    http://www.tejadadesign.com

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Center Box Graphic and Have Center Boxes side by side

    Add to your stylesheet_herdoos.css
    Code:
    #featuredProducts {width: 39%; float: right;}
    #specialsDefault{width: 59%; float: left;}

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Center Box Graphic and Have Center Boxes side by side

    Refinements:
    Code:
    #featuredProducts {width: 42%; float: right; border: none; margin-right: 15px;}
    
    #featuredProducts img {width: 304px; height: 200px; position: relative; top: -12px;}
    
    #featuredProducts h2, #featuredProducts br+a, #featuredProducts br+a+br {display: none;}
    
    #specialsDefault{width: 55%; float: left;}

  4. #4
    Join Date
    Aug 2009
    Location
    Highlands Ranch, Colorado
    Posts
    84
    Plugin Contributions
    0

    Default Re: Center Box Graphic and Have Center Boxes side by side

    Thank you, that worked perfectly!

    Next questions:

    1. Can I change the path in the Featured Prod box to take someone to the Category rather than one product?

    2. Can I also put a different photo in there, rather than a copy of what's on the product page?

    This box will be permanently set up, the client won't be changing their Featured Product.
    _ _ _ _ _ _ _
    DebiWebi
    http://www.tejadadesign.com

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Center Box Graphic and Have Center Boxes side by side

    I knew you would be needing some more customization, but was too tired to concentrate on it last night:) Since you will need to edit a file anyway, your best bet is to insert the image link directly rather than modify the featured functionality. I suggest adding to /includes/templates/your_template/templates/tpl_index_default.php, just before the "</div>" line at the bottom:
    PHP Code:
    <?php
      $show_display_category
    ->MoveNext();
    // !EOF
    ?>
    </div>
    Add a new div something like this:
    PHP Code:
    <div id="featuredLink">
      <?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG 'your_link_path">' zen_image($template->get_template_dir('your_link_image.jpg'DIR_WS_TEMPLATE$current_page_base,'images'). '/' 'your_link_image.jpg''Your Link Alt Text') . '</a>'?>
    </div>
    End result:
    PHP Code:
    <?php
      $show_display_category
    ->MoveNext();
    // !EOF
    ?>
    <div id="featuredLink">
      <?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG 'your_link_path">' zen_image($template->get_template_dir('your_link_image.jpg'DIR_WS_TEMPLATE$current_page_base,'images'). '/' 'your_link_image.jpg''Your Link Alt Text') . '</a>'?>
    </div>
    </div>
    Substitute the correct values for your_xxx, but keep quotes where they exist.
    Save the image in /includes/templates/your_template/images/.
    Style #featuredLink similar to #featuredProducts, though it will be simpler.

  6. #6
    Join Date
    Aug 2009
    Location
    Highlands Ranch, Colorado
    Posts
    84
    Plugin Contributions
    0

    Default Re: Center Box Graphic and Have Center Boxes side by side

    Thanks Glenn, I'll try that and come whining back to you if I can't figure it out!
    _ _ _ _ _ _ _
    DebiWebi
    http://www.tejadadesign.com

  7. #7
    Join Date
    Aug 2009
    Location
    Highlands Ranch, Colorado
    Posts
    84
    Plugin Contributions
    0

    Default Re: Center Box Graphic and Have Center Boxes side by side

    Okay, I think I did what you said but its not working: the new image is not replacing the product image and the link is going to the category rather than the product.

    This is what I put in tpl_index_default.php:

    <div id="featuredLink">
    <?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'http://herdoos.com/shop/index.php?main_page=index&cPath=8">' . zen_image($template->get_template_dir('http://www.herdoos.com/shop/images/hairnoodles-home.jpg', DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . 'http://www.herdoos.com/shop/images/hairnoodles-home.jpg', ' ') . '</a>'; ?>
    </div>

    I also have the image in my templates images folder but wasn't sure it was finding it, so also put the image in the main images folder and changed the link to it.

    I see at line 99 in tpl_index_default.php there's stuff about the Featured Products Center Box -- does this not need to be changed? Or any of the other files mentioned in that code?f

    BTW I took a look at your web site, nice stuff! I placed an order for a dragonfly pin with amethyst.
    _ _ _ _ _ _ _
    DebiWebi
    http://www.tejadadesign.com

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Center Box Graphic and Have Center Boxes side by side

    The HTTP_SERVER . DIR_WS_CATALOG gives the path to your site, so all you need to add is the internal part of the path.
    Likewise, you want only the image filename, as the rest of the path is specified by the code.
    PHP Code:
    <div id="featuredLink">
    <?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG 'index.php?main_page=index&cPath=8">' zen_image($template->get_template_dir('hairnoodles-home.jpg'DIR_WS_TEMPLATE$current_page_base,'images'). '/' 'hairnoodles-home.jpg'' ') . '</a>'?>
    </div>

  9. #9
    Join Date
    Aug 2009
    Location
    Highlands Ranch, Colorado
    Posts
    84
    Plugin Contributions
    0

    Default Re: Center Box Graphic and Have Center Boxes side by side

    Ah, thanks for the clarification on the paths. As you can tell I don't understand all the coding stuff.

    That worked perfectly and with a little CSS adjustment the page looks great.

    Thanks again!
    _ _ _ _ _ _ _
    DebiWebi
    http://www.tejadadesign.com

 

 

Similar Threads

  1. v150 Center Boxes causing Side Boxes to shift
    By SweetEmotions in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Nov 2014, 02:02 PM
  2. Is there a map/table that instructs how to change text and side&center box coloring
    By cyberbaffled in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 17 Nov 2013, 09:28 PM
  3. Left side boxes pop up in center
    By Sigp220 in forum General Questions
    Replies: 2
    Last Post: 22 Dec 2010, 09:00 PM
  4. Creating custom center and side boxes - help!
    By rick_random777 in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 2 Oct 2010, 01:14 PM
  5. Side box and center are overlapping
    By romijade in forum Basic Configuration
    Replies: 1
    Last Post: 25 Jan 2009, 03:13 AM

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