开发者

Opencart thumbnail size

I've just started to work with opencart so I don't very much. I want to change the thumbnail size of my products to a bigger size. So, I've researched on Google and an answer came up. Go to Syst开发者_JS百科em>Settings, Edit Store and under the Image tab, choose the size I want. The thing is, that is not working and I don't know why. For example, on Best Sellers or on Featured Products, the thumbnail size is always the same, 80x80.

Any help?

Tiago Castro


In OpenCart 1.5.4 it's System > Settings > Edit > Image in the Admin panel.


Most of the modules use the "thumb" size for the home page position but have static image sizes coded for the left/right columns.

You have two options... Either switch the template to pull the thumbnail size: Edit /catalog/view/theme//module/.tpl

(replace with your theme if you have one and with bestseller.tpl and/or featured.tpl)

replace $product['image'] with $product['thumb']

Although then your thumbnails may be oversized for your left/right columns...


The other option is to edit the controller and specify the size...

Edit /catalog/controller/module/.php (again either bestseller.php or featured.php)

In 1.4.9.x around line 67-68 you will find:

$this->data['products'][] = array(    // From line 58
....
....
// Line 67
'image'         => $this->model_tool_image->resize($image, 38, 38),
'thumb'         => $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),

Just decide if you want to hardcode the new image size (in this example it is 38x38) or link the 'image' size to the thumbnail size.....

if you are hardcoding it, just c hange the "38, 38"...

If you want to link it to the thumbnail size, just copy the value from 'thumb'


In Admin panel, go to extensions>Features>Edit, in edit mode change 80x80 to anything you like, I assume you want it equal to the rest of the images, if so edit it to match. Repeat for Latest module.


No need to edit any code. Go to:

Extensions -> Modules ->Latest

and you can edit the image size from there.


extensions>features>edit also helped me to increase the size of image in thumbnail. thanks a lot.....


extensions>Features>Edit helped me, I just had to put the same image size that i put in System > Settings > Edit > Image (in Product Image Thumb Size).

I am using the version 1.5.6


For New Opencart version 2.3.0.2 , might help for new versions

you can go to Extensions > Extensions > choose Themes from the 'Choose the extension' type selector and then click > Edit on your theme, to view the Images section and change your image sizes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜