Post by alanbernard » Sun Jun 27, 2010 6:50 pm

Hi guys,

In the home page, the image being called is the thumb, like so. <img src="<?php echo $products[$j]['thumb']; ?>

Upon clicking on it, we go to the product page. I want to use one of the alternate images as the main image, may I know what is the code to call alternate images?

Thanks peeps!

Newbie

Posts

Joined
Thu Jun 10, 2010 1:58 pm

Post by JAY6390 » Sun Jun 27, 2010 7:32 pm

Hi Alan. Go here in your admin panel
Image
And change Product List Size: to the size you want, and they will change :)
please disregard the "edit these to similar sizes if applicable" as well, that was to help someone else in another thread with a similar problem

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by alanbernard » Sun Jun 27, 2010 10:31 pm

Thanks Jay, I think I did not quite put the question well, I apologize. I was actually wondering if there was a call to the alternate images. For the thumbs I know it's <?php echo $thumb; ?> and was wondering what it would be for the alternate images? Reason why is because I would like to call it to replace the current thumb image.

Newbie

Posts

Joined
Thu Jun 10, 2010 1:58 pm

Post by Xsecrets » Sun Jun 27, 2010 11:11 pm

the additional images are in an array called $images which contains all the additional thumb and popup. Look at the additional images tab section for a better idea.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by alanbernard » Sun Jun 27, 2010 11:16 pm

Ok thanks mate, I'll give it a go.

Newbie

Posts

Joined
Thu Jun 10, 2010 1:58 pm

Post by JAY6390 » Mon Jun 28, 2010 12:19 am

You can assign an image of any size in the controller. You'll need to have the originals url (which you can get from each product). If you take a look at the controllers of things like the bestsellers module (/catalog/controller/module/bestseller.php) and look for the image cache lines, they should give you a better understanding of how it all works

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by alanbernard » Mon Jun 28, 2010 12:45 am

JAY6390 wrote:You can assign an image of any size in the controller. You'll need to have the originals url (which you can get from each product). If you take a look at the controllers of things like the bestsellers module (/catalog/controller/module/bestseller.php) and look for the image cache lines, they should give you a better understanding of how it all works
Thanks dude, I've kind of cheated on this one. I increased the size of the thumbnails and removed the original image link. Ha.

Newbie

Posts

Joined
Thu Jun 10, 2010 1:58 pm
Who is online

Users browsing this forum: No registered users and 4 guests