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)
-   -   How to replace Categories.tpl links with image buttons? (https://forum.x-cart.com/showthread.php?t=2350)

rohit 04-18-2003 04:14 AM

How to replace Categories.tpl links with image buttons?
 
Hi, :)

I want to replace the text links as created by categories.tpl file with the respective buttons. How should i do that? see http://www.templatearena.com/xcart/customer

best regards

funkydunk 04-18-2003 11:42 PM

Do it the same way as you would with normal html and work the smarty bits around it.

ie.

{* $Id: categories.tpl,v 1.16 2002/10/21 07:06:43 zorg Exp $ *}
<TABLE border=0 cellPadding=5 cellSpacing=0 width=100%>
<TR>
<TD class=VertMenuTitle height=26 width=26 valign=center>[img]{$ImagesDir}/dingbats_categorie.gif[/img]</TD>
<TD class=VertMenuTitle height=26 valign=center width="80%"><FONT class=VertMenuTitle>{$lng.lbl_categories}</FONT></TD>
</TR>
<tr><td colspan=2 nowrap>
{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}
<font class=CategoriesList>[img]./yourimages/yourimage{ $categories[cat_num].categoryid }.gif[/img]</font>

{/section}
{else} {section name=cat_num loop=$subcategories}
<font class=CategoriesList>{ $subcategories[cat_num].category|escape }</font>

{/section}
{/if}
</td></tr>
</TABLE>

Where each image here is called yourimage{category number}.gif

rohit 04-19-2003 10:21 PM

RE:How to replace Categories.tpl links with image buttons?
 
I think i am getting you but not clearly. Heres what happening is that the button i just created for test i.e. buttonall.gif is being replaced by name buttonall251.gif..... when viewed finally and thus is not displaying.

This is what i have done :

[img]{$ImagesDir}/buttonall{ $categories[cat_num].categoryid }.gif[/img]

Is it correct?? If not then please tell me how to move?

thanks

rohit 04-19-2003 10:22 PM

RE:How to replace Categories.tpl links with image buttons?
 
I think i am getting you but not clearly. Heres what happening is that the button i just created for test i.e. buttonall.gif is being replaced by name buttonall251.gif..... when viewed finally and thus is not displaying.

Check: http://www.templatearena.com/xcart/customer

This is what i have done :

[img]{$ImagesDir}/buttonall{ $categories[cat_num].categoryid }.gif[/img]

Is it correct?? If not then please tell me how to move?

thanks

funkydunk 04-19-2003 11:03 PM

And all you need to do is create an image for each category named (in your example) buttonall251.gif if the category id is 251

B00MER 04-20-2003 04:46 AM



All times are GMT -8. The time now is 02:50 PM.

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