Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / how to I alter image size of specials in centre on main page?

how to I alter image size of specials in centre on main page?

Locked

Started by sushigal on 28 Oct 2010, 4:00 PM · Views: 963

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
28 Oct 2010, 4:00 PM
#1
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Post #1 by sushigal

I can't find which file to alter in order to change the image size of specials images in the center column on the main page.I've renamed the specials box to 'SPECIAL OFFERS' and you can see it seems to be using my product listing page images but it looks messy and id like to be sized the same as the box above which is out featured products which we've re-named 'great gift ideas'

Any ideas?

29 Oct 2010, 1:27 PM
#2
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Post #2 by sushigal

anybody? Really need to get this tidied up for the client. :frusty:

29 Oct 2010, 3:12 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #3 by ajeh

Currently, the Specials Centerbox in:
/includes/modules/specials_index.php

uses:

    'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . (int)$specials_index->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $specials_index->fields['products_image'], $specials_index->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a><br />' . $products_price);

You would need to make your size changes, in your templates and overrides, where you see the:
SMALL_IMAGE_WIDTH
SMALL_IMAGE_HEIGHT

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Nov 2010, 2:42 PM
#4
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Post #4 by sushigal

But some images may look distorted if i give them a set height and width, is there some code to add in so that they will constrain proportions, so if i set the width to 100 all heights will adjust accordingly?

Thanks

1 Nov 2010, 3:18 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #5 by ajeh

You can try setting the height to 100 and the width to 0 ... and see how that looks for you ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Nov 2010, 3:26 PM
#6
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Post #6 by sushigal

Ok, thank you so much for your help. I can't find a file called specials_index.php though. Any idea where this is?

Thanks

1 Nov 2010, 3:29 PM
#7
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Post #7 by sushigal

I've found the file :oops: Will give your suggestion a go. Thank you!

1 Nov 2010, 3:33 PM
#8
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Post #8 by sushigal

P.s also how would I edit the code to do this, would I do it like this;

SMALL_IMAGE_WIDTH 100, SMALL_IMAGE_HEIGHT 0)

I'm unsure. Thanks again inadvance for your help.

1 Nov 2010, 4:39 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #9 by ajeh

The constants:
SMALL_IMAGE_WIDTH
SMALL_IMAGE_HEIGHT

are values ...

You need to replace them with:
0
100

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Nov 2010, 4:47 PM
#10
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Post #10 by sushigal

Doh! Thank you. That's done it :clap: