X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   manufacturers products count... (https://forum.x-cart.com/showthread.php?t=39827)

Vetrivel 05-16-2008 06:32 AM

manufacturers products count...
 
Hi,
How to display the manufacturers products count in side menu .:roll::roll:
like this..
-------------------
manufacturers
-------------------
manufacturer one (25)
manufacturer two(10)
.
.
...............................


Thanks in Advance.8)

Vetrivel 05-19-2008 01:05 AM

Re: manufacturers products count...
 
i got it...:D/

thnks frnds...8)

your silence too helped me a lot...:lol:

Yurij 05-19-2008 01:17 AM

Re: manufacturers products count...
 
Quote:

Originally Posted by Vetrivel
Hi,
How to display the manufacturers products count in side menu .:roll::roll:
like this..
-------------------
manufacturers
-------------------
manufacturer one (25)
manufacturer two(10)
.
.
...............................


Thanks in Advance.8)


Try to do so:

1. Back up files:
- modules/Manufacturers/customer_manufacturers.php;
- skin1/modules/Manufacturers/menu_manufacturers.tpl.

2. Edit file "modules/Manufacturers/customer_manufacturers.php",
Add the end of the file the following lines

PHP Code:

if($active_modules["Manufacturers"])
{
        
$sql "select manufacturerid, count(productid) as countpr  from ".$sql_tbl[products]." WHERE (forsale='Y') GROUP BY manufacturerid";
        
$result func_query($sql);
        
$result2=array();
        foreach (
$result as $ind => $one)
        {
            
$result2[$one[manufacturerid]]=$one[countpr];
        }
        
$smarty->assign("mstats"$result2);
        unset(
$result ,$result2);






3. Edit file "skin1/modules/Manufacturers/menu_manufacturers.tpl",
replace the contents of the file the following code

PHP Code:

{* $Idmenu_manufacturers.tpl,v 1.5 2005/11/17 06:55:47 max Exp $ *}
{if 
$manufacturers_menu ne ''}
{
capture name=menu}
{
section name=mid loop=$manufacturers_menu}
{
assign var=number value=$manufacturers_menu[mid].manufacturerid}
<
a href="manufacturers.php?manufacturerid={$manufacturers_menu[mid].manufacturerid}class="VertMenuItems">{$manufacturers_menu[mid].manufacturer} ({if $mstats[$numberne ""}{$mstats[$number]}{else}0{/if})</a>
<
br />
{/
section}
{if 
$show_other_manufacturers}
<
br />
{
assign var=number value=$manufacturers_menu[mid].manufacturerid}
<
a href="manufacturers.php" class="VertMenuItems">{$lng.lbl_other_manufacturers} ({if $mstats[$numberne ""}{$mstats[$number]}{else}0{/if})</a><br />
{/if}
{/
capture}
{include 
file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_manufacturers menu_content=$smarty.capture.menu}
<
br />
{/if} 


Vetrivel 05-19-2008 06:41 AM

Re: manufacturers products count...
 
thanks Yurij..


All times are GMT -8. The time now is 02:36 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.