![]() |
Use thumbnail as detailed if detailed image is not available
How can I use thumbnail as detailed image if detailed image is not available?
I have some detailed images. |
You mean you want to just repeat the thumbnail below the product description again?
|
not exactly, what i mean is this
on the detailed product page, if there is a detailed image show it, if not show thumbnail |
Any help?
|
check custom mods forum for stuff like this, done plenty of times
|
Hi Shan,
Do you have a link to any of those topics, I have searched all over but still can't find any ? |
a quick search of custome mods forum gives this in the first few results
http://forum.x-cart.com/viewtopic.php?t=21397&highlight=detailed+image search for detailed AND images in custom mods forum |
Hi Shan,
Thanks a lot, i read the topic but I think this is what the mod is for Quote:
This is to use the thumbnail on the detailed product page. and then use the detailed image as a first detailed image. What i am looking for is this I have some deatiled images for some products and only the thumbnails for others on my detailed page, I want an if clause like this If detailed image is available show the detailed image else show the thumbnail for this product. |
just find the code that shows the thumbnail in product.tpl and wrap this round it
Code:
{if $images} see skin1/modules/detailed_images folder for files that control showing detailed images |
Hi Shan,
I used this code and I am getting the no image available image instead of the thumbnail where there is no detailed image {if $images} {include file="modules/Detailed_Product_Images/product_images.tpl" } {else} {include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url} {/if} |
try this.
this checks for a detailed image and if it finds one shows the first . if it dont it shows the thumbnail instead. Code:
|
Oops got this
Fatal error: Smarty error: [in customer/main/product.tpl line 23]: syntax error: mismatched tag {/if}. expected {/section} (opened line 18). (Smarty_Compiler.class in /home/httpd/vhosts/xxxxxxxxx/httpdocs/Smarty-2.6.3/Smarty.class.php on line 1082 actually this one was okay but shows the no image available instead of the thumbnail, how do I correct that {if $images} {include file="modules/Detailed_Product_Images/product_images.tpl" } {else} {include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url} {/if} |
Any help please,
I have the no image available image showing, where there is no detailed image, what I want to show if there is no detailed image is the thumbnail |
I tried this
{if $active_modules.Detailed_Product_Images ne ""} {include file="modules/Detailed_Product_Images/product_images.tpl" } {else} {include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"} {/if} but it is not showing any thumbnail if no detail is available I need it to show if detailed image is available show detailed image else thumbnail end if |
All times are GMT -8. The time now is 04:22 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.