-
- spyderco

-
Total Posts: 22
Joined: 2008-04-11
|
Hello,
I would change the image size of the product’s images, when the customer browse a category. By default the size of the image is 165*165px.
If i change the image attribute in the css file the image is pixelized.
How i can do that ?
Thx.
|
| |
-
- Posted: April 30 2008
-
| top
-
|
 |
 |
 |
|
|
-
- Dustin

-
Total Posts: 160
Joined: 2008-03-13
Columbus, OH
|
spyderco - 30 April 2008 03:52 AM Hello,
I would change the image size of the product’s images, when the customer browse a category. By default the size of the image is 165*165px.
If i change the image attribute in the css file the image is pixelized.
How i can do that ?
Thx.
Changing Front Image Size
loc: /magento/app/design/frontend/default/default/template/catalog/product/list.phtml
line: 45
orig: <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>
line: 93
orig: <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>
|
| |
-
- Posted: April 30 2008
-
| top
| # 1
-
|
 |
 |
 |
|
|
-
- spyderco

-
Total Posts: 22
Joined: 2008-04-11
|
Thx
|
| |
-
- Posted: April 30 2008
-
| top
| # 2
-
|
 |
 |
 |
|
|
-
- Hobie Brown

-
Total Posts: 5
Joined: 2010-05-04
|
Hello
Is this possible to do “on the fly” within different categories? Some products require less space than others and it would be good to be able to list more items on some categories than other.
|
| |
-
- Posted: May 11 2010
-
| top
| # 3
-
|
 |
 |
 |
|
|
-
- ericscott

-
Total Posts: 57
Joined: 2008-05-14
|
Dustin - 30 April 2008 04:41 AM spyderco - 30 April 2008 03:52 AM Hello,
I would change the image size of the product’s images, when the customer browse a category. By default the size of the image is 165*165px.
If i change the image attribute in the css file the image is pixelized.
How i can do that ?
Thx.
Changing Front Image Size
loc: /magento/app/design/frontend/default/default/template/catalog/product/list.phtml
line: 45
orig: <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>
line: 93
orig: <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>
This was exactly what I was looking for!!! Thanks!!!
|
| |
-
- Posted: August 11 2010
-
| top
| # 4
-
|
 |
 |
 |
|
|
-
- vbwebsites

-
Total Posts: 93
Joined: 2009-01-12
Virginia
|
what if you want to resize to for instance 560 wide by no set height / proportioned? My items are cues, original is like 2000 wide by 150
I am using this now:
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image'); ?>" width="540" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
For some reason, i am locked at 540 wide… How can i change that to be 560 without losing clarity (not stretch but resize at 560)?
|
| |
-
- Posted: October 27 2010
-
| top
| # 5
-
|
 |
 |
 |
|
|
-
- Surf Web Design

-
Total Posts: 27
Joined: 2011-07-28
Calgary, Alberta, Canada
|
Magento 1.7 catagory images squashed , so to fix that: go to:
magento/app/design/frontend/default/default/template/easycatalogimg/subcatagories.phtml
change line 77 from:
<img src="<?php echo $imageUrl ?>” <?php echo !empty($height) ? ' height="' . $height . '"' : ''; echo !empty($width) ? ' width="' . $width . '"' : '' ?> alt="<?php echo $this->htmlEscape($_category->getName()) ?>” />
to
<img src="<?php echo $imageUrl ?>” <?php echo !empty($height) ? ' height="' . $height . '"' : ''; ?> alt="<?php echo $this->htmlEscape($_category->getName()) ?>” />
Go to magneto back end to cache management and flush image and magento cache. Then test it out.
|
| |
-
- Posted: June 1 2012
-
| top
| # 6
-
|
 |
 |
 |
|
|
-
- qinwubi

-
Total Posts: 6
Joined: 2011-11-01
|
I’m using the galaeverbuy theme from galathemes.com. Did the exactly the same fix but nothing changed at all from the frontend. I cleared
cache, image cache, and even recompiled the code (yes compilation is enabled in my case).
ver 1.6.1
Any suggestion?
ericscott - 10 August 2010 07:50 PM Dustin - 30 April 2008 04:41 AM spyderco - 30 April 2008 03:52 AM Hello,
I would change the image size of the product’s images, when the customer browse a category. By default the size of the image is 165*165px.
If i change the image attribute in the css file the image is pixelized.
How i can do that ?
Thx.
Changing Front Image Size
loc: /magento/app/design/frontend/default/default/template/catalog/product/list.phtml
line: 45
orig: <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>
line: 93
orig: <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>” width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/>
This was exactly what I was looking for!!! Thanks!!!
|
| |
-
- Posted: September 13 2012
-
| top
| # 7
-
|
 |
 |
 |
|
|