| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Manufacturers with icons on customer_manufacturers_list.tpl | ||||
|
|
Thread Tools | Search this Thread |
#41
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
The codes below work like a charm (as of version4.1.. Thanks guys!!!
The only minor issue I see is that it's pulling all of the thubnail images via "image.php" instead of directly via the filesystem. This is extremely slow when you have hundreds of different manufacturer thumbnails. Hopefully someone here knows how to re-write it and have the thumbnail images pull directly from the filesystem intead. ---------------------------------------------------------------------------------------------------------------------------------------- {* $Id: customer_manufacturers_list.tpl,v 1.6 2005/11/21 12:42:10 max Exp $ *} {capture name=dialog} {assign var="tmp" value="0"} {section name=mid loop=$manufacturers} {if $manufacturers[mid].manufacturerid}{assign var="tmp" value="1"}{/if} {/section} {section name=mid loop=$manufacturers} { if %mid.first% } <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> {/if} { if %mid.index% is div by 4} <tr> {/if} <td align="center" valign="middle"> <table bgcolor="#FFFFFF" cellspacing="5" cellpadding="5" border="0"><tr><td height="65"> <A href="manufacturers.php?manufacturerid={$manufactu rers[mid].manufacturerid}"> <img src="image.php?id={$manufacturers[mid].manufacturerid}&type=M" /></a> </td> <td align="center" valign="middle"> <font class="ItemsList"> {* {$manufacturers[mid].manufacturer}</font> *} </td></table> { if %mid.last% } </table> {/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra='width="100%"'} ----------------------------------------------------------------------------------------------------------------------------------------
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9 |
|||||||
#42
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
Well....just figured it out on my own....Below is the code. You will notice a huge improvement in the image loading time.
Cheers -Tuan --------------------------------------------------------------------------------------------------------------------------- {* $Id: customer_manufacturers_list.tpl,v 1.6 2005/11/21 12:42:10 max Exp $ *} {capture name=dialog} {assign var="tmp" value="0"} {section name=mid loop=$manufacturers} {if $manufacturers[mid].manufacturerid}{assign var="tmp" value="1"}{/if} {/section} {section name=mid loop=$manufacturers} { if %mid.first% } <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> {/if} { if %mid.index% is div by 5} <tr> {/if} <td align="center" valign="middle"> <table bgcolor="#FFFFFF" cellspacing="5" cellpadding="5" border="0"><tr><td height="65"> <A href="manufacturers.php?manufacturerid={$manufactu rers_menu[mid].manufacturerid}"><img src=images/M/{$manufacturers_menu[mid].manufacturer|replace:' ':''}.gif /></a> </td> <td align="center" valign="middle"> <font class="ItemsList"> {* {$manufacturers[mid].manufacturer}</font> *} </td></table> { if %mid.last% } </table> {/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra='width="100%"'}
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9 |
|||||||
|
#43
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
Here's my version - I had some trouble with some of the previous posted code examples. Some only accepted a particular graphic file type - only GIFs for example or needing logo image named exactly as the Manufacturer name, and for some of them, the link was broken after a while on the logos. Although it takes a while to load the images from image.php - I prefer it because it seems like more robust code. I hard coded the table around each logo to be 150 pixels.
My version shows the text too (but it's pretty easy to remove it if you want to do that). Here's it is: Code:
I also modified the include statement in /modules/Manufacturers/menu_manufacturers.tpl so the Manufacturer title would be a link with: Code:
I tested it on version 4.1.8.
__________________
X-Cart Gold 4.1.8 |
|||||||
|
#44
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
Thank you for this is a great mod!!
It works great in 4.1.8.
__________________
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::: X-Cart Pro 4.1.8 (Linux) (4.1.10 upgrade pending) |
|||||||
#45
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
Works great in 4.1.10 as well!
__________________
Xcart Version 4.1.9 Upgraded to 4.1.10 (clean install with mods added back) |
|||||||
#46
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
__________________
http://www.lingerieblowout.com Version 4.1.10 http://www.topnichewebsites.com Version 4.4.5 Michael |
|||||||
#47
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
I want to display the manufacturer's name/logo which are currently on that category.I have approximately 50 manufactures in my store.Each manufacturer links with different different category.Suppose X category links with a,b,c,d manufacturer's product among 50 manufacturers.I want to display only a,b,c,d manufacturer's name/logo when I click on X category.Is it possible? Can anyone help me?
Thanks to all. |
|||||||
#48
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
What is the code for 4.3 Version?
|
|||||||
#49
|
|||||||
|
|||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
Quote:
Second that, anyone got a 4.3 compatible version?
__________________
X-Cart version 4.1.11 |
|||||||
#50
|
|||||||||
|
|||||||||
Re: Manufacturers with icons on customer_manufacturers_list.tpl
I need it also. Plase help!
__________________
Version 4.2.3 X-Cart Gold Version 4.3.1 X-Cart Gold |
|||||||||
|
|||
X-Cart forums © 2001-2020
|