X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Detailed Product Image Mod (https://forum.x-cart.com/showthread.php?t=13905)

ccakins 05-10-2005 07:57 AM

Detailed Product Image Mod
 
xcart version 4.0.11

I had a need to list detailed images horizontally rather than vertically, display the alt text under each image, and I had to get the images to break at a certain size.

The code below is a modified product_images.tpl. Based on image size (mine being 100 X 100 pixals) you can modify the {if $count==5} line to however many images you wished displayed horizontally.

Modified code is in green

{if $images ne ""}
{capture name=dialog}
<DIV align="center">

<table border="0" width="100" id="table1" cellspacing="0" cellpadding="0">
<tr>

{section name=image loop=$images}
{if $images[image].avail eq "Y"}

{assign var="count" value="`$count+1`"}

{if $images[image].tmbn_url}
[img]{$images[image].tmbn_url}[/img]
{$images[image].alt|escape}
{else}

<td>
<p align="center">

[img]{$xcart_web_dir}/product_image.php?imageid={$images[image].imageid}[/img]
{$images[image].alt|escape}
</td>

{if $count==5}
{assign var="count" value="0"}
</tr>
<tr>
{/if}
[/color]
{/if}

{/if}


{/section}
</DIV>

</tr>
</table>

{/capture}
{if $smarty.capture.dialog ne ""}
{include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra="width=100%"}
{/if}
{/if}

sparcx 01-10-2008 08:54 AM

Re: Detailed Product Image Mod
 
Hi,

Can somebody change this code for use with 4.1.9 ?

Thanks

Selim


All times are GMT -8. The time now is 10:45 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.