Post by gila » Fri Mar 07, 2008 5:57 am

How can i have the category image in a different dimension from product images? thank you

New member

Posts

Joined
Fri Jan 25, 2008 4:33 am

Post by bruce » Fri Mar 07, 2008 4:48 pm

Yes, solution at the end of this...

Image width and image height are settings in the Image tab of the store Administration.
From the menu, Admin->Configuration->Setting then click on the Image tab.

The values apply to product and category images. You can turn off resizing but then the images ALL have to be uploaded in their final size.

However, in catalog\controller\category.php you will see the following

Code: Select all

        		foreach ($results as $result) {
          			$category_data[] = array(
            			'name'  => $result['name'],
            			'href'  => $url->href('category', FALSE, array('path' => ($request->get('path')) ? $request->get('path') . '_' . $result['category_id'] : $result['category_id'])),
            			'thumb' => $image->resize($result['filename'], $config->get('config_image_width'), $config->get('config_image_height'))
          			);
        		}
below it is something similar for products.

You can change the 'thumb' row to something like

Code: Select all

            			'thumb' => $image->resize($result['filename'], 150, 150)
where 150 represents the value that you want to use for category images.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm
Who is online

Users browsing this forum: No registered users and 4 guests