View Single Post
  #2  
Old 05-16-2008, 05:00 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Adding Speedbar & search to Provider area

Quote:
Originally Posted by pixeldust
Hi

I've managed to get my Provider Area to resemble the design of the rest of my site but for a couple of parts and despite my best efforts I just can't get them working!

Main Page (using shopkey)
Provider Area missing speedbar with wrong search

I can't get the speedbar showing. I've checked the head.tpl which it resides in, and it seems to be there. This is what my head.tpl looks like on both my main page and in the provider area:

PHP Code:
{* $Idhead.tpl,v 1.40.2.4 2005/11/15 09:25:38 max Exp $ *}
<
table width="80%" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" align="center">
<
tr><td>

<
div align="right"><a href="home.php"></a></div>
<
table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" bgcolor="#FFFFFF">
<
tr>
  <
td><div align="left"><a href="home.php"><img src="{$ImagesDir}/custom/top_leftcorner.gif" alt="" height="20" border="0" align="top" /></a></div></td>
  <
td>&nbsp;</td>
  <
td><div align="right"><a href="home.php"></a></div></td>
  <
td><div align="right"><a href="home.php"><img src="{$ImagesDir}/custom/top_rightcorner.gif" alt="" height="20" border="0" align="top" /></a></div></td>
</
tr>
<
tr>
<
td><div align="left"><a href="home.php"><img src="{$ImagesDir}/custom/logo.gif" alt="" border="0"></a></div></td>
<
td width="100%">&nbsp;</td>
<
td>
  <
div align="right">{if $usertype eq "C" or $usertype eq "P"}
    { include 
file="customer/search.tpl" }
    </
div></td>
<
td><div align="right"></div></td>
</
tr>
<
tr>
<
td colspan="4" height="24" class="speedbarbg">
{ include 
file="customer/top_menu.tpl" }</td>{/if}
</
tr>
<
tr>
<
td colspan="4" height="2" class="topstripe"></td>
</
tr>
<
tr>
<
td colspan="4" height="12" class="awning"><img src="{$ImagesDir}/custom/awning1.gif" alt="" width="23" height="12"></td>
</
tr>
</
table

I also have a search box located in the head of the main page, but though that shows up in the provider area, it returns incorrect search results (instead of searching the products in the store it searches the products owned by that provider).

Hopefully that is enough info - this thing is doing my head in

For Speed Bars.

Insert this code at the end of file "provider/auth.php"

PHP Code:
$speed_bar unserialize($config["speed_bar"]);
if (!empty(
$speed_bar)) {
    
$tmp_labels = array();
    foreach (
$speed_bar as $k => $v) {
        
$speed_bar[$k] = func_array_map("stripslashes"$v);
        
$tmp_labels[] = "speed_bar_".$v['id'];
    }

    
$tmp func_get_languages_alt($tmp_labels);
    foreach (
$speed_bar as $k => $v) {
        if (isset(
$tmp['speed_bar_'.$v['id']]))
            
$speed_bar[$k]['title'] = $tmp['speed_bar_'.$v['id']];

        
$speed_bar[$k]['link'] = str_replace("&""&amp;"$v['link']);
    }

    
$smarty->assign("speed_bar"$speed_bar);
}

unset(
$speed_bar); 

How should work search in a provider's area?
Reply With Quote