Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Manufacturers with icons on customer_manufacturers_list.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #41  
Old 09-18-2007, 04:22 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default 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
Reply With Quote
  #42  
Old 09-22-2007, 02:53 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default 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
Reply With Quote

The following user thanks TL408 for this useful post:
timbrrr (04-21-2009)
  #43  
Old 10-14-2007, 04:29 AM
 
seanwhite seanwhite is offline
 

Newbie
  
Join Date: Aug 2007
Posts: 1
 

Default 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:
{* $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 width="150" border="0" cellpadding="0" cellspacing="0"> <tr> <td><a href="manufacturers.php?manufacturerid={$manufacturers[mid].manufacturerid}"><img src="image.php?id={$manufacturers[mid].manufacturerid}&type=M" border="0" alt="{$manufacturers[mid].manufacturer}" /></a> </td> <tr> <td><font class="ItemsList"> <a href="manufacturers.php?manufacturerid={$manufacturers[mid].manufacturerid}"> {$manufacturers[mid].manufacturer}</a></font></td> <tr> <td>&nbsp;</td> <tr> <td>&nbsp;</td> </table> { if %mid.last% } </table> {/if} {/section} { include file="customer/main/navigation.tpl" } {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra='width="100%"'}

I also modified the include statement in /modules/Manufacturers/menu_manufacturers.tpl so the Manufacturer title would be a link with:

Code:
{include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_manufacturers menu_content=$smarty.capture.menu link_href="manufacturers.php"}

I tested it on version 4.1.8.
__________________
X-Cart Gold 4.1.8
Reply With Quote

The following user thanks seanwhite for this useful post:
papertrunk (11-29-2010)
  #44  
Old 08-06-2008, 08:30 AM
 
Monarch1 Monarch1 is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 30
 

Default 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)
Reply With Quote
  #45  
Old 08-08-2008, 10:34 PM
 
Scotty85 Scotty85 is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 94
 

Default 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)
Reply With Quote
  #46  
Old 08-09-2008, 11:46 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

http://www.xcartmods.net/shop-by-brand.html
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #47  
Old 08-21-2009, 10:19 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default 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.
__________________
4.6.1 Platinum


Reply With Quote
  #48  
Old 02-12-2010, 02:46 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

What is the code for 4.3 Version?
__________________
4.6.1 Platinum


Reply With Quote
  #49  
Old 03-22-2010, 04:18 AM
 
theschtickler theschtickler is offline
 

Newbie
  
Join Date: Dec 2008
Posts: 8
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Quote:
Originally Posted by Learner
What is the code for 4.3 Version?

Second that, anyone got a 4.3 compatible version?
__________________
X-Cart version 4.1.11
Reply With Quote
  #50  
Old 04-19-2010, 04:02 AM
  FTI's Avatar 
FTI FTI is offline
 

Senior Member
  
Join Date: Oct 2009
Location: Plovdiv, Bulgaria
Posts: 153
 

Default 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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:03 AM.

   

 
X-Cart forums © 2001-2020