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
  #61  
Old 01-10-2011, 10:02 PM
 
xtech xtech is offline
 

X-Adept
  
Join Date: Jun 2010
Posts: 605
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Quote:
Originally Posted by Snowrev
I was able to get logos to appear in the place of the manufacturer name by using this code in 4.4.1 but the problem is that this code is only equal to one manufacturer and will only display one logo while on that manufacturers page "same logo" for all manufacturers and I don't know how to have it call other manufacturers..

Here is the code.. Anyone know how to call other manufacturers logos?

I am editing this file - /common_files/modules/Manufacturers/menu_manufacturers.tpl

{if $manufacturers_menu ne ''}
{capture name=menu}
<ul>
{foreach from=$manufacturers_menu item=m}
<li><a href="manufacturers.php?manufacturerid={$m.manufac turerid}">{*{$m.manufacturer}*}
<img class="logo1" src="{if $manufacturer.image_url ne ''}{$manufacturer.image_url|amp}{else}{$xcart_web_ dir}/image.php?id={$manufacturer.manufacturerid}&amp;ty pe=M{/if}" alt="{$manufacturer.manufacturer|escape}"{if $manufacturer.image_x} width="{$manufacturer.image_x}"{/if}{if $manufacturer.image_y} height="{$manufacturer.image_y}"{/if} />
</a></li>

{/foreach}
{if $show_other_manufacturers}
<li><a href="manufacturers.php">{$lng.lbl_other_manufactu rers}</a></li>
{/if}
</ul>
{/capture}
{include file="customer/menu_dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.menu additional_class="menu-manufacturers"}
{/if}
See below

Not working on current 4.4.1 Version..What is the exact code??
__________________
X-cart Platinum
4.6.1
Reboot template
Reply With Quote
  #62  
Old 01-12-2011, 11:58 AM
 
Cankus Cankus is offline
 

Member
  
Join Date: May 2006
Posts: 27
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

/common_files/modules/Manufacturers/menu_manufacturers.tpl (4.4.1)

{* $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="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">
<a href="manufacturers.php?manufacturerid={$manufactu rers[mid].manufacturerid}"><b>{$manufacturers[mid].manufacturer}</b><br><img src="{$xcart_web_dir}/image.php?id={$manufacturers[mid].manufacturerid}&type=M" /></a></td></tr>
<tr><td align="center" valign="middle"></td></tr></table>


</td>
{ if %mid.last% }
</tr>
</table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" content=$smarty.capture.dialog extra="width=100%"}
__________________
www.elitmarket.com
Pro 4.4.3
Reply With Quote
  #63  
Old 01-12-2011, 09:41 PM
 
xtech xtech is offline
 

X-Adept
  
Join Date: Jun 2010
Posts: 605
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Quote:
Originally Posted by Cankus
/common_files/modules/Manufacturers/menu_manufacturers.tpl (4.4.1)

{* $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="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">
<a href="manufacturers.php?manufacturerid={$manufactu rers[mid].manufacturerid}"><b>{$manufacturers[mid].manufacturer}</b><br><img src="{$xcart_web_dir}/image.php?id={$manufacturers[mid].manufacturerid}&type=M" /></a></td></tr>
<tr><td align="center" valign="middle"></td></tr></table>


</td>
{ if %mid.last% }
</tr>
</table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" content=$smarty.capture.dialog extra="width=100%"}

Hi Cankus the above code set is working but there is a problem see the attachment below-http://www.thefashiontree.com/brandlogo.jpg

It should be Logo only not Manufacturer is not specified that is at least 4 or five logo Vertically and other on more options.

How to achieve that??
__________________
X-cart Platinum
4.6.1
Reboot template
Reply With Quote
  #64  
Old 03-24-2011, 02:55 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Quote:
Originally Posted by Cankus
/common_files/modules/Manufacturers/menu_manufacturers.tpl (4.4.1)

{* $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="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">
<a href="manufacturers.php?manufacturerid={$manufactu rers[mid].manufacturerid}"><b>{$manufacturers[mid].manufacturer}</b><br><img src="{$xcart_web_dir}/image.php?id={$manufacturers[mid].manufacturerid}&type=M" /></a></td></tr>
<tr><td align="center" valign="middle"></td></tr></table>


</td>
{ if %mid.last% }
</tr>
</table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" content=$smarty.capture.dialog extra="width=100%"}


Hi is it possible to call brand logo on home page four or five vertically and rest shows on other manufacturer in menu_manufacturers.tpl??
__________________
4.6.1 Platinum


Reply With Quote
  #65  
Old 03-25-2011, 01:43 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

I would like to ask how to insert the number of products for a manufacturer between round squares.
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #66  
Old 11-16-2011, 10:54 AM
  XCart4Life's Avatar 
XCart4Life XCart4Life is offline
 

Advanced Member
  
Join Date: Feb 2010
Posts: 62
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

There is a space in the $manufacturers array.

Fix the line:

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

With this:

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

Or the logo link won't work.
__________________
X-Cart Pro v4.2.2 [Win]
X-Cart Pro v4.2.3 [Win]
X-Cart Pro v4.4.4 [Win]
Reply With Quote
  #67  
Old 11-22-2011, 08:22 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

Quote:
Originally Posted by xtech
Hi Cankus the above code set is working but there is a problem see the attachment below-http://www.thefashiontree.com/brandlogo.jpg

It should be Logo only not Manufacturer is not specified that is at least 4 or five logo Vertically and other on more options.

How to achieve that??

Part of the problem is he says to replace "menu_manufacturers.tpl" with customer_manufacturers_list.tpl. If you are trying to get logos to display vertically in the menu then they should not be in a table but in a list.

I have my manufacturers list (the one not on the menu) with logos 4 across in columns. Here is my customer_manufacturers_list.tpl for 4.4.4.
Code:
{* $Id: customer_manufacturers_list.tpl,v 1.2 2010/06/21 13:19:49 joy Exp $ vim: set ts=2 sw=2 sts=2 et: Modified to display icons in columns *} <h1>{$lng.lbl_manufacturers}</h1> {capture name=dialog} {include file="customer/main/navigation.tpl"} {* Modified to display icons in columns <ul class="manufacturers-list list-item"> {foreach from=$manufacturers item=v} <li><a href="manufacturers.php?manufacturerid={$v.manufacturerid|amp}">{$v.manufacturer|escape}</a></li> {/foreach} </ul> *} <ul class="manufacturers-list list-item"> {assign var="col" value="0"} {foreach from=$manufacturers item=v} {if $col == 4}{* Adjust the number of columns *} </ul><ul class="manufacturers-list list-item">{assign var="col" value="0"} {/if} <li><a href="manufacturers.php?manufacturerid={$v.manufacturerid|amp}"> <img src="{$xcart_web_dir}/image.php?id={$v.manufacturerid|amp}&type=M" alt="/"{if $manufacturer.image_x} width="{$manufacturer.image_x}"{/if}{if $manufacturer.image_y} height="{$manufacturer.image_y}"{/if} /> <br /> {$v.manufacturer|escape} </a><br /></li> {assign var="col" value="`$col+1`"} {/foreach} </ul> {include file="customer/main/navigation.tpl"} {/capture} {include file="customer/dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog noborder=true}

Pay attention to the part that begins "<img src="{$xcart_web_dir}.." as that is the routine you want to incorporate into menu_manufacturers.tpl. If we just put it as is into menu_manufacturers.tpl then we should get a list of all of the manufacturers. To do this, in menu_manufacturers.tpl try replacing
Code:
{foreach from=$manufacturers_menu item=m} <li><a href="manufacturers.php?manufacturerid={$m.manufacturerid}">{$m.manufacturer|amp}</a></li> {/foreach}
with
Code:
{foreach from=$manufacturers_menu item=m} <li><a href="manufacturers.php?manufacturerid={$m.manufacturerid}">{$m.manufacturer|amp}<br /> <img src="{$xcart_web_dir}/image.php?id={$m.manufacturerid|amp}&type=M" alt="/"{if $manufacturer.image_x} width="{$manufacturer.image_x}"{/if}{if $manufacturer.image_y} height="{$manufacturer.image_y}"{/if} /> {$m.manufacturer|escape}</a> </li> {/foreach}
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #68  
Old 02-04-2012, 10:06 AM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default Re: Manufacturers with icons on customer_manufacturers_list.tpl

A tidier method placing the image in a DIV and floating it left.

Code:
{* $Id: customer_manufacturers_list.tpl,v 1.2 2010/06/21 13:19:49 joy Exp $ vim: set ts=2 sw=2 sts=2 et: *} <h1>{$lng.lbl_manufacturers}</h1> {capture name=dialog} {include file="customer/main/navigation.tpl"} {foreach from=$manufacturers item=v} <div class="cw-manufacturers-wrap"> <a href="manufacturers.php?manufacturerid={$v.manufacturerid|amp}"><img src="{$xcart_web_dir}/image.php?id={$v.manufacturerid|amp}&type=M" alt="/"{if $manufacturer.image_x} width="{$manufacturer.image_x}"{/if}{if $manufacturer.image_y} height="{$manufacturer.image_y}"{/if} /><br/>{$v.manufacturer|escape}</a> </div> {/foreach} <div class="clearing"></div> {include file="customer/main/navigation.tpl"} {/capture} {include file="customer/dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.dialog noborder=true}

and the css class

Code:
.cw-manufacturers-wrap { border:#CCC 2px solid; font-size:12px; float:left; margin:10px; text-align:center; width:210px; padding:5px; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; width:150px; }

The class clearing at the end clears the float left and it is an existing xcart class.

You can use a similar tactic with simple_products_list.tpl and products_t.tpl thereby disposing of the table layout.
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
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:16 AM.

   

 
X-Cart forums © 2001-2020