X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding Mouseovers\ALT to detailed images? (https://forum.x-cart.com/showthread.php?t=16769)

foxtrot 09-21-2005 01:39 PM

Adding Mouseovers\ALT to detailed images?
 
Hi. Im a professional php programmer (very little experience with smarty)

I need to add mouseovers to the detailed product images of a customers website. The employee before me created the site, and supposivly added the mousovers/alt text. but they recently "disappeared" for the customer. The admin side has Alternative Text Fields for the Detailed images, but when viewed from the customer front end, the source code shows the alt text as "Click to Close Window".

I do use xcart personally, so I do have some familarity, I just cant find for the life of me any setting, language variable, .tpl or php file that will fix this.

Any way to enable alt text or perhaps add a title tag (for better browser compatability) to the images that sources from the "Alternative Text" sourced on the admin backend?

shan 09-21-2005 02:32 PM

sounds like its been setup with a popup window.

see the default detailed_image template to see how the alt tags are added

foxtrot 09-22-2005 11:56 AM

By all means it looks like it should work (at least from my point of view)
But again my experience is with php, not smarty.

The code: (product_images.tpl)
Quote:

{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $images ne ""}
{capture name=dialog}
<DIV align="center">
{section name=image loop=$images}
{if $images[image].avail eq "Y"}
{if $images[image].tmbn_url}
[img]{$images[image].tmbn_url}[/img]
{else}
[img]{$xcart_web_dir}/product_image.php?imageid={$images[image].imageid}[/img]
{/if}




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


(detailed_popup_js.tpl)

Quote:

{***
# Detailed Images Popup
# Version 2.1
# http://www.cart-lab.com
# info@cart-lab.com
# (C)opyright 2003-2004 CartLab, all rights reserved.
# Full license at: http://www.cart-lab.com/license.php
***}
{if $active_modules.Detailed_Product_Images ne "" && $images}
{literal}
<SCRIPT language=JavaScript1.2>
<!--
function productimagedetail(product_id) {
var w = 120;
var h = 120;
var center = ',left = 387,top = 309';

window.open('{/literal}{$catalogs.customer}{literal}/product_detailed_images.php?productid='+product_id ,"detailedproduct","width="+w+",height="+h+",resiz able,scrollbars=yes,status=no'");
}
-->
</SCRIPT>
{/literal}
{/if}


Like i said, it looks like its configured for the alt tags correctly but its not displaying them for some reason. If im overlooking something please let me know :wink:

For anyone looking to mod xcart:
If you want to set up popup windows for detailed images the code above is a good start.


All times are GMT -8. The time now is 12:02 AM.

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