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
  #11  
Old 06-14-2006, 08:11 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

Sure! Simply, you can just create a folder called "brands" (in skin1/images) of images named after the manufacturers and link to them by name:
Code:
<A href="manufacturers.php?manufacturerid={$product.manufacturerid}" title="">[img]{$ImagesDir}/brands/{$product.manufacturer|replace:' ':''}.gif[/img] </a>
If there is a space in a brand name, like "British Telecom" just name the image BritishTelecom and the space will be replaced in the call for it without a space. My code also links to the brand page and this works on the product.tpl page (I tested it).

In the future, icons won't be in the DB at all as newer versions are much improved and we only need stability to migrate.

- Mike
__________________
4.1.9
Reply With Quote
  #12  
Old 06-17-2006, 03:37 AM
 
Davidh Davidh is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 44
 

Default

Thanks alot :P
__________________
X Cart 4.2
Victoraquatics.com - almost completed the design.
Reply With Quote
  #13  
Old 07-10-2006, 01:49 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default

Hi,

Can someone post the code for 4.1.1?

Code:
{* $Id: customer_manufacturers_list.tpl,v 1.6 2005/11/21 12:42:10 max Exp $ *} <font class=big>{$lng.lbl_manufacturers}</font> { include file="customer/main/navigation.tpl" } <table cellspacing="5"> {foreach from=$manufacturers item=v} <tr> <td class="ManufacturersItem"><font class="ItemsList">{$v.manufacturer|escape}</font></td> </tr> {/foreach} </table> { include file="customer/main/navigation.tpl" }
Reply With Quote
  #14  
Old 07-12-2006, 02:38 PM
 
fearnothing fearnothing is offline
 

Senior Member
  
Join Date: Jun 2005
Location: North East England
Posts: 124
 

Default

This is a mod well worth implementing, and the code to use files instead of the database for image thumbnail generation reduces the load on the server quite significantly.

One thing I found in putting the files mod in place was that the code provided works great for product.tpl but wouldn't run for me in customer_manufacturers_list.tpl

This is the code I used to display files instead of drawing from the database using that template:

Code:
[img]location of your files/{$manufacturers_menu[mid].manufacturer|replace:' ':''}.jpg[/img]

Hope this helps.

Anybody have any suggestions on pagination of the Manufacturers list? At the minute it just produces a single long-ass list. I've just amended my version to split into 4 columns, but it's still a lengthy old list:

http://www.smartchoicemusic.com/store/manufacturers.php
__________________
www.smartchoicemusic.com
Smart Choice Music - Import CD and DVD Specialists
4.6.0
MySQL 5.5.34
PHP 5.4.24
Apache/2.2.26
Multiple homegrown and paid-for mods
Reply With Quote
  #15  
Old 07-20-2006, 02:41 PM
 
weckie weckie is offline
 

eXpert
  
Join Date: Feb 2005
Location: Netherlands
Posts: 220
 

Default

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}
__________________
Herman Steijn

Using: X-cart 4.5.4
AT: http://www.weckonline.com LIVE
Reply With Quote
  #16  
Old 08-17-2006, 03:23 PM
 
stuartn stuartn is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 48
 

Default

I need a little direction where to find the code for the manufacturers link, so that I can change it to open in a blank window rather than taking the customer out of the site....any clues on which template it is...thanks in advance for any help.
__________________
Cheers
Stuart
-----------------------
X-Cart Version
Gold 5.4.2
Reply With Quote
  #17  
Old 08-31-2006, 12:46 PM
 
laurieblake laurieblake is offline
 

Advanced Member
  
Join Date: Jul 2006
Location: Sydney, AUS.
Posts: 56
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

[quote=mffowler]Sure! Simply, you can just create a folder called "brands" (in skin1/images) of images named after the manufacturers and link to them by name:
Code:
<A href="manufacturers.php?manufacturerid={$product.manufacturerid}" title="">[img]{$ImagesDir}/brands/{$product.manufacturer|replace:' ':''}.gif[/img] </a>

Excelent post Mike. I am using it but struck and issue with the Crystal Blue Skin Addon. It seems our friend RRF has changed the code for images from what you have done to
<IMG src="{$ImagesDir}/blahblah.gif">. I was just getting the text [img]Blah[/img] instead of the image.
All good now. Thank you.

Laurie
__________________
Gold Version 4.1.5
Crystal Blue Skins
Reply With Quote
  #18  
Old 09-05-2006, 06:17 PM
 
Jenm Jenm is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 3
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Version 4.1.3 looks nothing like these. Anyone know the code for that?
__________________
X-cart pro used on http://www.handcraftedworks.com
X-Cart Pro v. 4.1.3 [unix]
Reply With Quote
  #19  
Old 09-08-2006, 01:19 PM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

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>
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
  #20  
Old 09-08-2006, 04:51 PM
 
Jenm Jenm is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 3
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Thank you NightFire! Works great! Does exactly what I wanted it to do. Now if I can only get the images in there!!! If anyone can shed some light on that I'd appreciate that too.

If anyone wants to see what it is, go to: http://www.handcraftedworks.com/shop/manufacturers.php

If the images are there, I figured it out (or someone else told me how to!)

Thanks again NightFire!
__________________
X-cart pro used on http://www.handcraftedworks.com
X-Cart Pro v. 4.1.3 [unix]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:09 PM.

   

 
X-Cart forums © 2001-2020