Seperate Thumbnail Image Uploads
I have see a few people on the forum looking for a way to have a different image view from the thumbnail upload. Well I have something that might help them accomplish this.
In your <xcart_dir>/skin1/custom/main/product.tpl file, find the following part of code: Code:
<TD valign="top" align="left" rowspan="2" width="100"> Code:
<TD valign="top" align="left" rowspan="2"> This mod will make it so that on the product preview page instead of displaying the thumbnail again it will display the detailed image you upload. This will also create a small problem, your detailed image will be displayed on the page twice. To stop that from happening do this. In your <xcart_dir>/skin1/modules/Detailed_Product_Images/product_images.tpl file replace the following: Code:
{section name=image loop=$images} Code:
{section name=image loop=$images start=1} Witch will make it skip over the first added detailed image and only display images added after the first. If you decide not to upload a second detailed image the detailed image box will still appear with no content and you fix that by doing this. In your <xcart_dir>/skin1/modules/Detailed_Product_Images/product_images.tpl file replace the following: Code:
{if $images ne ""} Code:
{if $images ne "" and count($images) ne 1} If done correctly when uploading a new product you can upload the thumbnail, then upload a detailed image to be displayed is the products main view, and you still have the ability to add more detailed images that will appear in the correct place. I use this mod on my site now check it out the site is not compleat so theres only one product under logo templates. http://www.pixellab.biz Hope you all enjoy this as much as I did! :lol: **MODERATOR EDIT - I have updated the code per the fix listed later in this post. Enjoy! - Padraic** |
sweet! been looking for a way to do this for awhile, i will give it a try soon. very nice deonya!
|
Quote:
Glad to help! |
Deonya,
Thank you for providing this viable solution to the many workarounds. I have modified the tpls's with the code, but it receives a parse error when implementing: Code:
{if $images ne ""} Code:
{if $images ne "" and count($images) 1} Quote:
Ideas? Many thanks for your assistance. - Mike |
Anyone know what the correct syntax of:
Code:
{if $images ne "" and count($images) 1} I would love to be able to not have a blank detailed image box when there isn't a second one (per this post). Thanks, Mike.// |
Very nice im going to try this , this mroning.
|
Bizzare, still just seems to show the thumbnail image, even though there is a detailed image uploaded (4.0.5)
|
Works fine in all of my 4.x installs. Although without the image count code, you'll get a blank "Detailed Image" box when there is not a 2nd detailed image.
If you don't see anything, I suspect: 1. You product image is still scaling down to the desired thumbnail size or you only have 1 detailed image. You'll need three images for Deonya's code to be effective. mike.// |
K i'll try again.
Need to make it work with boomers tab mod as well |
Quote:
Deonya - Thanks! Works great! One small error in the code is that last part that Mike noted above. The correct syntax of the last line should be Code:
{if $images ne "" and count($images) ne 1} (The last 'ne' was left out. :) ) Thanks again Deonya! |
All times are GMT -8. The time now is 03:01 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.