Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Align Products from the bottom product name instead of images:

Align Products from the bottom product name instead of images:

Locked

Started by rlexyd on 17 May 2010, 11:42 AM · Views: 1,707

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
17 May 2010, 11:42 AM
#1
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Post #1 by rlexyd

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!

17 May 2010, 12:02 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Post #2 by kuroi

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)

17 May 2010, 11:59 PM
#3
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Post #3 by rlexyd

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!

26 May 2010, 9:46 AM
#4
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Post #4 by rlexyd

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!

4 Jun 2010, 9:51 AM
#5
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Post #5 by rlexyd

I could really use the advice anybody???

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

19 Aug 2010, 10:49 PM
#6
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Post #6 by rlexyd

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!

20 Aug 2010, 9:56 AM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Post #7 by kuroi

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

Find the following piece of code in there (around line 72)

    '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_WIDTH, IMAGE_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

    '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_WIDTH, IMAGE_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)

15 Sep 2010, 9:28 AM
#8
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Post #8 by rlexyd

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!

15 Sep 2010, 1:20 PM
#9
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,342
Plugin Contributions:
42

Post #9 by mprough

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

15 Sep 2010, 11:12 PM
#10
rlexyd avatar

rlexyd

Zen Follower

Join Date:
Nov 2006
Location:
Sydney, Australia
Posts:
507
Plugin Contributions:
0

Post #10 by rlexyd

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!

16 Sep 2010, 4:18 PM
#11
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,342
Plugin Contributions:
42

Post #11 by mprough

Have a link to your site?

~Melanie