Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    red flag Align Products from the bottom product name instead of images:

    Hi All,

    I got an interesting request. It's probably not going to get answered, but I might as well give it a shot :)

    I know Zen-Cart align from page products via the images, for example if you had 3 featured products on the front page, all with the same size image, they would align perfectly next to each other!!

    My problem is I have products with wide or high images, and the website looks really crap as they don't align at all!!

    My question is..

    1) Is there a way to force zen-cart to align the products via the item title instead of the image (as that would look a lot neater).

    Some of you will probably say why don't I try to make all images the same size... I rather not as they won't turn out right. I try my best to upload proportional size photos but I have a lot which are wider and cannot be altered or will loose their look!

    I hope there is a Fix or workaround for this :)

    Best Regards,
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Align Products from the bottom product name instead of images:

    One way (and there are others) would be to edit the features products box template to wrap a div around the product image and then use CSS to give that div a fixed height. Then everything below it would start at the same height.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Align Products from the bottom product name instead of images:

    Hi Kuroi,

    Thank you for that :)

    Could you Please explain what i need to do? I can follow directions very well but I am not that experienced with these things.
    Also, you mentioned Featured products box, I want this to be also done with all products, new products and specials?

    Awaiting your further response.

    Best Regards,
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  4. #4
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Align Products from the bottom product name instead of images:

    Not sure what happened to Kuroi, but can anyone else help.
    He suggested to do something but did not explain what exactly needs to be done!

    Hope someone can help :)

    Best Regards,
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  5. #5
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Align Products from the bottom product name instead of images:

    I could really use the advice anybody???
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  6. #6
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Align Products from the bottom product name instead of images:

    I'm sure someone knows how to fix this issue?
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Align Products from the bottom product name instead of images:

    Create an override file for your includes/modules/featured_products.php file.

    Find the following piece of code in there (around line 72)
    PHP Code:
        'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<a href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTHIMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<a href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">' $featured_products->fields['products_name'] . '</a><br />' $products_price); 
    and change it to
    PHP Code:
        'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<div class="listingBoxProductImage"><a href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTHIMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<a href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">' $featured_products->fields['products_name'] . '</a></div><br />' $products_price); 
    Note the insertion of the opening and closing div tags.

    Repeat for the specials_index.php and new_products.php module files.

    Finally add something like this to your stylesheet (altering the height to suit your site)
    .listingBoxProductImage {height: 100px}
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Align Products from the bottom product name instead of images:

    Hi Kuroi,

    THANK YOU for your help :)

    I did as you said but that only aligned the top part which is already aligned by Zen-Cart.

    I wanted to align the Text at the bottom.

    I have images that are not heigh enough, so even if I changed the height in the div to 200px it still algning the text from the bottom.

    Please have a look at this image to see the issue.
    http://img709.imageshack.us/img709/7374/11893469.jpg

    The image are algning from the top but not the bottom.

    Regards,
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  9. #9
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,009
    Plugin Contributions
    61

    Default Re: Align Products from the bottom product name instead of images:

    Nope, piece of cake....

    In the image settings in your admin use a ! following the height. This will stretch the canvas size to be uniform for all images in the specific configuration and align them.

    EG: 200!

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  10. #10
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Align Products from the bottom product name instead of images:

    Hi Melanie,

    I did as you said and added a ! after the image height in admin/configuration/images/small images height --> 150!
    It didn't make any difference?

    Did I do it correctly or did I miss something?

    Best Regards,
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to edit the ADD on the bottom of products to # of boxes instead?
    By Blackwaterphil in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Jan 2010, 04:08 PM
  2. Help with making products align left instead of centered in the listings...
    By BenhamCollectibles in forum General Questions
    Replies: 17
    Last Post: 5 Dec 2009, 06:03 PM
  3. 4 Random Products from same category at the bottom of Product Info page
    By dara108 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Jan 2009, 10:58 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