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
  #1  
Old 02-07-2005, 07:12 PM
 
mffowler mffowler is offline
 

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

Default Manufacturers with icons on customer_manufacturers_list.tpl

To get the manufacturer icons to show up in the manufacturers list (not the menu- the full page) was pretty simple, but getting them into columns was not that easy ... so I based it on the subcategories table and the manufacturers menu. The code below does not have the title or dialog.tpl, but you can add that in ...

Just change the 4 in
Code:
{ if %mid.index% is div by 4}
to the number of columns that you desire: 2, 3 etc. and replace the following templates code with:

Modules/Manufacturers/customer_manufacturers_list.tpl:
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 4} <tr> {/if} <td align="center" valign="middle"> <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"><tr><td height="70"> [img]mlogo.php?manufacturerid={$manufacturers[mid].manufacturerid}[/img]</td></tr> <tr><td align="center" valign="middle"> <font size="3">{$manufacturers[mid].manufacturer}</font></td></tr></table> </td> { if %mid.last% } </tr> </table> {/if} {/section} {/capture} {include file="dialog.tpl" content=$smarty.capture.dialog extra="width=100%"}
I then changed the {include} statement in /modules/Manufacturers/menu_manufacturers.tpl to:
Code:
{include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_manufacturers menu_content=$smarty.capture.menu link_href="manufacturers.php"}
so that it would link to the manufacturers page (the same way "Help" does). It is not based on the quantity of manufacturers enabled in General Settings/Module Options, so all of your manufactureres are included. Also, if you deactivate any in the manufacturers settings, then they will be deactivated ...

If anyone has any improvements to this, I would love to incorporate them.

- Mike
__________________
4.1.9
Reply With Quote

The following user thanks mffowler for this useful post:
Ed B. (08-07-2019)
  #2  
Old 07-12-2005, 03:06 PM
 
fearnothing fearnothing is offline
 

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

Default

Mike - Great mod! Thanks for that!

There was a problem with the last include where it should be dialog.tpl rather than dialog_home.tpl for most installations but that is a very minor gripe and easy to sort out.

Just what I was looking for!

If you have any other mods relating to manufacturers that would want to post I'd be interested as I am planning to use this module extensively when my store goes live.

FN
__________________
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
  #3  
Old 07-12-2005, 08:52 PM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default

Excellent, and exactly what I needed. Thank you! Thanks also fearnothing, and for the non-experts like me, change the following in the code to work (near bottom):

Quote:
it should be dialog.tpl rather than dialog_home.tpl
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #4  
Old 07-12-2005, 08:59 PM
 
bluecat bluecat is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 674
 

Default

Again, thank you.

Would anyone know how to make it so only the "image" logo and "description" shows up? Right now, it's the image, and the manufacturer name under the image. So it would look like this:

.gif image

explanation of the product, etc... explanation of the product, etc... explanation of the product, etc...

Thank you.
__________________
--------------------
X-Cart Gold 4.1.11
Linux/Apache
--------------------
Reply With Quote
  #5  
Old 07-31-2005, 04:37 PM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default

My /modules/Manufacturers/customer_manufacturers_list.tpl
Does not contain all those codes.. which like do I change and what do I add?
Sound like an idiot huh? but please help me.

If i just copy the code above to my file, will it work?
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #6  
Old 07-31-2005, 04:49 PM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default

Damn.. I am an Idiot! I Am suppose to copy the codes.. haha.

while i'm at it.. how do I make the name of the manufacture to center it?
now it's like this

IMAGE
Long Manufactuere Name

How do i make to look like this:

....IMAGE.....
Manufacturer
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #7  
Old 08-01-2005, 09:21 AM
 
fearnothing fearnothing is offline
 

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

Default

hyratech - I wrapped the logo and link in <DIV> tags like this:

<div align="center">
[img]mlogo.php?manufacturerid={$manufacturers[mid].manufacturerid}[/img]
</div>

The other change was to take out the <font size="3"> ... </font> tags to make the link a little less overpowering
__________________
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
  #8  
Old 08-01-2005, 09:59 AM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default

I'm a newbee, can u be a little more specific... like where and what file... thanx
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #9  
Old 08-01-2005, 10:12 AM
 
fearnothing fearnothing is offline
 

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

Default

Sorry ... I'm a newbie myself in everything but what it says on the left of this page!

In the original code above in Modules/Manufacturers/customer_manufacturers_list.tpl you''ll see this line about three-quarters of the way down:

<tr><td align="center" valign="middle">

insert a new line of code in after that line like this:

<div align="center">

then look for the closing </A> tag which is in the fourth line down after that new line you have just entered, and after the tag put </div>

so now the line in question should look like this:

[/b]</font></A></div></td></tr></table>



Changing the font size is an optional nicety - I would try this first and make sure it works for you.
__________________
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
  #10  
Old 06-12-2006, 02:59 AM
 
Davidh Davidh is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 44
 

Default

Another great mod, just installed myself thanks, however one quick question.

The images are being pulled from the databse rather than file system, is it possible to change this like the category icons?
__________________
X Cart 4.2
Victoraquatics.com - almost completed the design.
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:04 PM.

   

 
X-Cart forums © 2001-2020