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
  #21  
Old 09-10-2006, 01:52 PM
 
pinklinoleum pinklinoleum is offline
 

Advanced Member
  
Join Date: Aug 2006
Posts: 37
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

hey there.... this is a great modification that i am trying to implement on the site i am working on. i am trying to call the images from the suggested "brands" folder that i have created.... but I can't get the images to appear.

i have tried linking the images in a couple differnt formats:

[img]{$ImagesDir}/brands/{$product.manufacturer|replace:' ':''}.gif[/img]
</a>

<IMG SRC="{$ImagesDir}/brands/{$product.manufacturer|replace:' ':''}.gif">
</a>


any suggestions from the experts?


version 4.0.19
__________________
XCART version 4.0.19
Reply With Quote
  #22  
Old 09-10-2006, 03:34 PM
 
pinklinoleum pinklinoleum is offline
 

Advanced Member
  
Join Date: Aug 2006
Posts: 37
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

wow.... so it all of a sudden started working! yay!

does anyone know how to make this modification work with the subcategory listings? ...so the subcategory logos will replace the listing text?

thanks everyone!
__________________
XCART version 4.0.19
Reply With Quote
  #23  
Old 09-22-2006, 02:26 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Thank you for the codes, NightFire. I updated my "customer_manufacturers_list.tpl" file up your codes. However, the images are not showing up. And this is what it looked like. http://www.mvpautoparts.com/manufacturers.php

http://img108.imageshack.us/img108/5008/manufacturersmx2.jpg

After looking over and over again, I notice that your code referenced the "mlogo.php" file to call the image. However, I can not find this "mlogo.php" file anywhere in the entire xcart directory. Am I missing something here?

Thanks
-Tuan

Quote:
Originally Posted by NightFire
The IMG codes didn't work for me. So I modified the original code a little bit and adjusted the fonts etc to the standards of x-cart. I'm using 2 collums. Here's my code. The file system image code is not included:

Code:
{* $Id: customer_manufacturers_list.tpl,v 1.3 2004/05/28 12:21: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="5" cellspacing="0"> {/if} { if %mid.index% is div by 2} <tr> {/if} <td align="center" valign="middle"> <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"><tr><td height="70"> <A href="manufacturers.php?manufacturerid={$manufacturers[mid].manufacturerid}"> <img border="0" src="mlogo.php?manufacturerid={$manufacturers[mid].manufacturerid}"></a></td></tr> <tr><td align="center" valign="middle"> <A href="manufacturers.php?manufacturerid={$manufacturers[mid].manufacturerid}"><FONT class="ItemsList">{$manufacturers[mid].manufacturer}</FONT></a></td></tr></table> </td> { if %mid.last% } </tr> </table> {/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra="width=100%"}<p>
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #24  
Old 09-22-2006, 02:39 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Hi weckie,

I'm using the codes as you listed below in my "customer_manufacturers_list.tpl" and the images are now showing up. Can you please help point me to the right direction? This is what it shows.

http://img117.imageshack.us/img117/5845/manufacturerswa2.jpg

Thanks
-Tuan


Quote:
Originally Posted by weckie
Here's te code for 4.1.2. Works well.

Code:
{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="5" cellspacing="0"> {/if} { if %mid.index% is div by 3} <tr> {/if} <td align="center" valign="middle"> <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"><tr><td height="70"> [img]image.php?id={$manufacturers[mid].manufacturerid}&type=M[/img]</td></tr> <tr><td align="center" valign="middle"> <font class="ItemsList">{$manufacturers[mid].manufacturer}</font></td></tr></table> </td> { if %mid.last% } </tr> </table> {/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog extra='width="100%"'}

It is in three column, if you want more, just change
Code:
{ if %mid.index% is div by 3}
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #25  
Old 09-22-2006, 05:12 PM
 
mdperfumes mdperfumes is offline
 

Advanced Member
  
Join Date: Nov 2005
Location: Australia
Posts: 41
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Hi Did any one come with the code to make it work with 4.1.3 yet?
Cheers
Mark
__________________
www.mdperfumes.com.au
LC Version 2.2.21
www.perfumeonsale.com.au
X-cart 4.1.3
www.mstechstore.com.au
X-cart 4.1.2
www.giftinabox.com.au
X-cart 4.1.3
Reply With Quote
  #26  
Old 09-23-2006, 11:27 AM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

TL408 -
You need to replace
Code:
[img]image.php?id={$manufacturers[mid].manufacturerid}&type=M[/img]
with
Code:
<img src="image.php?id={$manufacturers[mid].manufacturerid}&type=M" />
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
  #27  
Old 09-23-2006, 01:43 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Thanks so much, Mike. That did it! The images are showing up now. However, they are not link clickable as before. Do you happen to know how to correct this?

Thanks
-Tuan

Quote:
Originally Posted by mrkenzie
TL408 -
You need to replace
Code:
[img]image.php?id={$manufacturers[mid].manufacturerid}&type=M[/img]
with
Code:
<img src="image.php?id={$manufacturers[mid].manufacturerid}&type=M" />
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #28  
Old 09-23-2006, 03:11 PM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Right before the image tag (<img) add this:

Code:
<A href="manufacturers.php?manufacturerid={$manufacturers[mid].manufacturerid}">

Right after the image tag, add this:
Code:
</a>
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
  #29  
Old 09-23-2006, 04:21 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Awesome!!! Thanks again, Mike. Your help is greatly appreciated.

Using a combination of your codes listed and the post from "fearnothing", I was able to combine the two and have the images called from the filesystem instead. It is MUCH faster than using the "image.php" to call.

And just to recap all the posts above, below is the complete codes from my "customer_manufacturers_list.tpl" file for X-Cart version 4.1.3. Hopefully it will be useful to some.

Cheers
-Tuan

Code:
{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="5" cellspacing="0"> {/if} { if %mid.index% is div by 3} <tr> {/if} <td align="center" valign="middle"> <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"><tr><td height="70"> <A href="manufacturers.php?manufacturerid={$manufacturers[mid].manufacturerid}"> <img src=images/M/{$manufacturers_menu[mid].manufacturer|replace:' ':''}.jpg /></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
  #30  
Old 09-23-2006, 05:00 PM
 
mdperfumes mdperfumes is offline
 

Advanced Member
  
Join Date: Nov 2005
Location: Australia
Posts: 41
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Thanks TL408 and Mike and everyone else - brilliant.

I had to add { include file="customer/main/navigation.tpl" } just after the {capture name=dialog} so it would pagenate to multiple pages as I have abour 120 manufacturers in the list but other than that works like a charm!

Cheers

Mark
__________________
www.mdperfumes.com.au
LC Version 2.2.21
www.perfumeonsale.com.au
X-cart 4.1.3
www.mstechstore.com.au
X-cart 4.1.2
www.giftinabox.com.au
X-cart 4.1.3
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 09:22 PM.

   

 
X-Cart forums © 2001-2020