Post by gandofu » Tue Aug 15, 2017 4:02 pm

hi all
my opencart version is 2.3.0.2
How to show the original uploaded image size for Product Image Popup Size?
cause some picture width is big, some is small.
if all the popup size is the same, then some is too big and some is too small.
Anyone can help? thanks all!

Newbie

Posts

Joined
Tue Aug 15, 2017 3:58 pm

Post by IP_CAM » Tue Aug 15, 2017 8:13 pm

This Extension could probably solve your Problem, but
it may have to be rewritten a little, to match your Version as well.
Ernie
Automatic Image Popup Sizer
https://www.opencart.com/index.php?rout ... n_id=20777
---
or a VqMod like this be of help as well:

Code: Select all

<modification>
<id>Auto-Type OpenCart resize Image</id>
<version>1.0</version>
<vqmver>2.5.1</vqmver>
<author>qahar [echothemes.com]</author>
<file name="catalog/model/tool/image.php">
<operation>
<search position="replace"><![CDATA[$image->resize($width, $height);]]></search>
<add><![CDATA[
if ($type == 'a') {
if ($width/$height > $width_orig/$height_orig) {
$image->resize($width, $height, 'w');
} elseif ($width/$height < $width_orig/$height_orig) {
$image->resize($width, $height, 'h');
}
} else {
$image->resize($width, $height);
}
]]></add>
</operation>
</file>
</modification>

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: paulfeakins and 447 guests