[Skip to main content](#vessel-content)

#   Different image for thumbnail than product image

##

- **[donzo](/forum/user/1409-donzo "View donzo's Profile")**
- [![donzo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1409-donzo "View donzo's Profile") Topic Author
- [ Offline](/forum/user/1409-donzo)

Less More

- Posts: 74
- Thank you received: 1
-
-

15 years 5 months ago [\#15893](#15893) by [donzo](/forum/user/1409-donzo "View donzo's Profile")  *[Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#15893 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")* was created by *[donzo](/forum/user/1409-donzo "View donzo's Profile")*

I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.

Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.

I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.

Any ideas ?

Thanks  [ ![&#91;img](http://www.hikashop.com/media/kunena/attachments/legacy/images/tumbs.jpg) ](http://www.hikashop.com/media/kunena/attachments/legacy/images/tumbs.jpg "&#91;img")

- [ ![tumbs.jpg](/forum/attachment/1071) ](/forum/attachment/1071 "tumbs.jpg") [ ](/forum/attachment/1071?download=1 "tumbs.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

15 years 5 months ago [\#15896](#15896) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#15896 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Hi,

In order to remove the first thumbnail in the product page, you have to edit the view via the menu Display-&gt;View.
The view is: product/show

Change: Code:

$image = reset($this-&gt;element-&gt;images);

To: Code:

reset($this-&gt;element-&gt;images); $image = next($this-&gt;element-&gt;images);

In order to select the second image as current thumbnail.

After that you have to modify the foreach which list all thumbnails Code:

if(count($this-&gt;element-&gt;images)&gt;1){ foreach($this-&gt;element-&gt;images as $image){

With: Code:

if(count($this-&gt;element-&gt;images)&gt;2){ $thumbs = $this-&gt;element-&gt;images; array_shift($thumbs); foreach($thumbs as $image){

And I think it will solve your problem.
Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[donzo](/forum/user/1409-donzo "View donzo's Profile")**
- [![donzo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1409-donzo "View donzo's Profile") Topic Author
- [ Offline](/forum/user/1409-donzo)

Less More

- Posts: 74
- Thank you received: 1
-
-

15 years 5 months ago [\#15898](#15898) by [donzo](/forum/user/1409-donzo "View donzo's Profile")  Replied by *[donzo](/forum/user/1409-donzo "View donzo's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#15898 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Really, really grateful.

Worked a treat, though I decided to remove all the mini thumbs in the end as it made no sense to have just one.

Brilliant, thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[donzo](/forum/user/1409-donzo "View donzo's Profile")**
- [![donzo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1409-donzo "View donzo's Profile") Topic Author
- [ Offline](/forum/user/1409-donzo)

Less More

- Posts: 74
- Thank you received: 1
-
-

15 years 5 months ago [\#15899](#15899) by [donzo](/forum/user/1409-donzo "View donzo's Profile")  Replied by *[donzo](/forum/user/1409-donzo "View donzo's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#15899 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Slight hitch...

As I have some variants, when one selects a different variant the image and thumbnails pop back to the default, ie first thumbnail visible and id="hikashop_small_image_div" showing all thumbs.

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

15 years 5 months ago -  15 years 2 months ago [\#15900](#15900) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#15900 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

For the variants, you need to add the line:
array_shift($variant-&gt;images);

after the line:
foreach($this-&gt;element-&gt;variants as $variant){

Last edit: 15 years 2 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[donzo](/forum/user/1409-donzo "View donzo's Profile")**
- [![donzo's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1409-donzo "View donzo's Profile") Topic Author
- [ Offline](/forum/user/1409-donzo)

Less More

- Posts: 74
- Thank you received: 1
-
-

15 years 5 months ago [\#15901](#15901) by [donzo](/forum/user/1409-donzo "View donzo's Profile")  Replied by *[donzo](/forum/user/1409-donzo "View donzo's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#15901 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

That didnt work for me, just displayed nothing for the variants.

But I did just repeat the code from the primary product you gave me into the variants area and that worked.

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sdce](/forum/user/4494-sdce "View sdce's Profile")**
- [![sdce's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4494-sdce "View sdce's Profile")
- [ Offline](/forum/user/4494-sdce)

Less More

- Posts: 18
- Thank you received: 0
-
-

14 years 11 months ago [\#29493](#29493) by [sdce](/forum/user/4494-sdce "View sdce's Profile")  Replied by *[sdce](/forum/user/4494-sdce "View sdce's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#29493 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

I modified the product/show file of my hikashop website, but I have a display issue with the main image on product pages.
The main image on the products page is not showing up. Could you please explain where I made an error.

I have made the following edits:

&lt;div id="hikashop_main_image_div" class="hikashop_main_image_div"&gt;
&lt;?php
if(!empty($this-&gt;element-&gt;images)){
reset($this-&gt;element-&gt;images);
$image = next($this);
if(!$this-&gt;config-&gt;get('images')){
echo '&lt;img src="'.$this-&gt;image-&gt;uploadFolder_url.$image-&gt;file_path.'" alt="'.$image-&gt;file_name.'" id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" /&gt;';
}else{
$height = $this-&gt;config-&gt;get('images_y');
$style='';
if(count($this-&gt;element-&gt;images)&gt;1){
if(!empty($height)){
$style=' style="height:'.($height+5).'px;"';
}
} ?&gt;
&lt;div class="hikashop_product_main_image_thumb" id="hikashop_main_image_thumb_div"&gt;
&lt;?php echo $this-&gt;image-&gt;display($image-&gt;file_path,true,$image-&gt;file_name,'id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_link"'); ?&gt;
&lt;/div&gt;
&lt;?php }
?&gt;
&lt;/div&gt;&lt;div id="hikashop_small_image_div" class="hikashop_small_image_div"&gt;&lt;?php
if(count($this-&gt;element-&gt;images)&gt;2){
$thumbs = $this-&gt;element-&gt;images;
array_shift($thumbs);
foreach($thumbs as $image){
echo $this-&gt;image-&gt;display($image-&gt;file_path,'hikashop_main_image',$image-&gt;file_name,'class="hikashop_child_image"','rel="SqueezeBox"');
}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

14 years 11 months ago [\#29510](#29510) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#29510 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

This line is definitely not correct: $image = next($this);
You probably wanted to write: $image = next($this-&gt;element-&gt;images);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sdce](/forum/user/4494-sdce "View sdce's Profile")**
- [![sdce's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4494-sdce "View sdce's Profile")
- [ Offline](/forum/user/4494-sdce)

Less More

- Posts: 18
- Thank you received: 0
-
-

14 years 11 months ago [\#29557](#29557) by [sdce](/forum/user/4494-sdce "View sdce's Profile")  Replied by *[sdce](/forum/user/4494-sdce "View sdce's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#29557 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Made the edits, but the thumbnail shows up a different size on load that actual. And when hover over gallery images the main image on the products page reverts to the original size. Could this be a CSS size error?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sdce](/forum/user/4494-sdce "View sdce's Profile")**
- [![sdce's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4494-sdce "View sdce's Profile")
- [ Offline](/forum/user/4494-sdce)

Less More

- Posts: 18
- Thank you received: 0
-
-

14 years 11 months ago -  14 years 11 months ago [\#29580](#29580) by [sdce](/forum/user/4494-sdce "View sdce's Profile")  Replied by *[sdce](/forum/user/4494-sdce "View sdce's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#29580 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

I attempted to resolve the issue by making all images the assigned size. This resolves the different image size on load of page, but I need the images to be a larger size.

Last edit: 14 years 11 months ago by [sdce](/forum/user/4494-sdce "View sdce's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

14 years 11 months ago [\#29610](#29610) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#29610 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

There is no need to change any code for the thumbnails size. There are parameters for that in the Files tab of the configuration (for the product page) and in the hikashop options page of your menus/modules for your listings.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sdce](/forum/user/4494-sdce "View sdce's Profile")**
- [![sdce's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4494-sdce "View sdce's Profile")
- [ Offline](/forum/user/4494-sdce)

Less More

- Posts: 18
- Thank you received: 0
-
-

14 years 11 months ago [\#29932](#29932) by [sdce](/forum/user/4494-sdce "View sdce's Profile")  Replied by *[sdce](/forum/user/4494-sdce "View sdce's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#29932 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Thank you! Problem is fixed!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")**
- [![artisanwebandprint's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")
- [ Offline](/forum/user/6555-artisanwebandprint)

Less More

- Posts: 158
- Thank you received: 6
-
-

14 years 5 months ago [\#49698](#49698) by [artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")  Replied by *[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#49698 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Hello,

Since I have variants, my code looked different than the example code above.

It started with this:

&lt;?php
$image = reset($variant-&gt;images);
$height = $this-&gt;config-&gt;get('product_image_y',$this-&gt;config-&gt;get('thumbnail_y'));
$width = $this-&gt;config-&gt;get('product_image_x',$this-&gt;config-&gt;get('thumbnail_x'));
if (!$this-&gt;config-&gt;get('thumbnail')) {
echo '&lt;img src="' . $this-&gt;image-&gt;uploadFolder_url . $image-&gt;file_path . '" alt="' . $image-&gt;file_name . '" id="hikashop_main_image_' . $variant_name . '" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" /&gt;';
} else {
$style = '';
if (count($variant-&gt;images) &gt; 1) {
if (!empty ($height)) {
$style = ' style="height:' . ($height +5) . 'px;"';
}
}
?&gt;

And I've changed it to this:
&lt;?php
$image = reset($variant-&gt;images);
$image = next($variant-&gt;images);
$height = $this-&gt;config-&gt;get('product_image_y',$this-&gt;config-&gt;get('thumbnail_y'));
$width = $this-&gt;config-&gt;get('product_image_x',$this-&gt;config-&gt;get('thumbnail_x'));
if (!$this-&gt;config-&gt;get('thumbnail')) {
echo '&lt;img src="' . $this-&gt;image-&gt;uploadFolder_url . $image-&gt;file_path . '" alt="' . $image-&gt;file_name . '" id="hikashop_main_image_' . $variant_name . '" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" /&gt;';
} else {
$style = '';
if (count($variant-&gt;images) &gt; 2) {
$variant = $this-&gt;element-&gt;images;
array_shift($variant-&gt;images);
foreach($this-&gt;element-&gt;variants as $variant);}{
if (!empty ($height)) {
$style = ' style="height:' . ($height +5) . 'px;"';
}
}
?&gt;

Unfortunately, the preview image is still showing up in the product page.

Thanks,

Dawn

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

14 years 5 months ago [\#49810](#49810) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#49810 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

For the variants, you need to add the line:
array_shift($variant-&gt;images);

after the line:
foreach($this-&gt;element-&gt;variants as $variant){

Not before that line.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")**
- [![artisanwebandprint's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")
- [ Offline](/forum/user/6555-artisanwebandprint)

Less More

- Posts: 158
- Thank you received: 6
-
-

14 years 5 months ago -  14 years 5 months ago [\#49860](#49860) by [artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")  Replied by *[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#49860 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Hello,

I've made the changes as you've noted and I still see the default thumbnail on the product page. The URL: [ king.artisanwebandprint.com/photography-...102-ancient-fig-tree](http://king.artisanwebandprint.com/photography-portfolio/mexico/Photographs/102-ancient-fig-tree)

Here's the updated code:

&lt;?php
$image = reset($variant-&gt;images);
$image = next($variant-&gt;images);
$height = $this-&gt;config-&gt;get('product_image_y',$this-&gt;config-&gt;get('thumbnail_y'));
$width = $this-&gt;config-&gt;get('product_image_x',$this-&gt;config-&gt;get('thumbnail_x'));
if (!$this-&gt;config-&gt;get('thumbnail')) {
echo '&lt;img src="' . $this-&gt;image-&gt;uploadFolder_url . $image-&gt;file_path . '" alt="' . $image-&gt;file_name . '" id="hikashop_main_image_' . $variant_name . '" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" /&gt;';
} else {
$style = '';
if (count($variant-&gt;images) &gt; 2) {
$variant = $this-&gt;element-&gt;images;
foreach($this-&gt;element-&gt;variants as $variant);{
array_shift($variant-&gt;images);}
if (!empty ($height)) {
$style = ' style="height:' . ($height +5) . 'px;"';
}
}
?&gt;

Last edit: 14 years 5 months ago by [artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

14 years 5 months ago [\#49929](#49929) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#49929 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Please make sure that you're doing your modifications for the correct template on your website and not for another one which you don't use.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")**
- [![artisanwebandprint's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")
- [ Offline](/forum/user/6555-artisanwebandprint)

Less More

- Posts: 158
- Thank you received: 6
-
-

14 years 5 months ago [\#50450](#50450) by [artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")  Replied by *[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#50450 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Hi,

I've sent the private login to determine why the code isn't working to removing the default thumbnail from the product page. To answer your question, yes I did modify the php for the appropriate template.

Dawn

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")**
- [![artisanwebandprint's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")
- [ Offline](/forum/user/6555-artisanwebandprint)

Less More

- Posts: 158
- Thank you received: 6
-
-

14 years 5 months ago [\#51671](#51671) by [artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")  Replied by *[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#51671 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Yes,

I ensured that I made the modifications to the right template. I sent a PM to Nicolas with the login information on May 20th, any luck?

king.artisanwebandprint.com

Thanks,

Dawn

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

14 years 5 months ago [\#51742](#51742) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#51742 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Your modifications were not correct. I've looked at them and fixed them.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")**
- [![artisanwebandprint's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")
- [ Offline](/forum/user/6555-artisanwebandprint)

Less More

- Posts: 158
- Thank you received: 6
-
-

14 years 5 months ago [\#51776](#51776) by [artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")  Replied by *[artisanwebandprint](/forum/user/6555-artisanwebandprint "View artisanwebandprint's Profile")* on topic *[Re: Different image for thumbnail than product image](/forum/4-how-to/15893-different-image-for-thumbnail-than-product-image#51776 "I really need to be able to have a different image for the thumbnail of a product when viewing the product listing, to the image you see when you go into product detail.  Ill explain. On the product listing I want to use a cropped in version of the image for design reasons, but once you are in the product I want to show the full, uncropped image. Now I can almost achieve this by uploading 2 images for each product, ensuring I upload the cropped thumbnail first, then this is used by default as the listing image, but really, once in the product itself I only want to show the larger uncropped image.  I could use some jquery to remove the first thumbail in the mini previews, but the main shot would still be on the cropped thumbnail.  Any ideas ?  Thanks")*

Thanks Nicolas!

I appreciate your assistance greatly. I haven't learned PHP so it's a bit confusing to know how to edit it when there are a number of different approaches (variable or not).

All the best,

Dawn

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE1ODkzLWRpZmZlcmVudC1pbWFnZS1mb3ItdGh1bWJuYWlsLXRoYW4tcHJvZHVjdC1pbWFnZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.184 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
