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)
-   -   Adding Speedbar & search to Provider area (https://forum.x-cart.com/showthread.php?t=39822)

pixeldust 05-16-2008 01:49 AM

Adding Speedbar & search to Provider area
 
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 :(

Yurij 05-16-2008 05:00 AM

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?

pixeldust 05-16-2008 12:15 PM

Re: Adding Speedbar & search to Provider area
 
Quote:

Originally Posted by Yurij
How should work search in a provider's area?


You are an absolute legend! I knew I should have just asked, this has been bugging me for weeks :lol:

The search in the provider area should return the same results as from the main page - it should search the live products of the site rather than the logged in providers products as it currently does.

Yurij 05-19-2008 03:32 AM

Re: Adding Speedbar & search to Provider area
 
Quote:

Originally Posted by pixeldust
You are an absolute legend! I knew I should have just asked, this has been bugging me for weeks :lol:

The search in the provider area should return the same results as from the main page - it should search the live products of the site rather than the logged in providers products as it currently does.



I do not see a simple solution to this problem.

Well, as an option while you can do so:

1. Edit file "skin1/customer/search.tpl", replace all lines
PHP Code:

..."search.php"... 



on

PHP Code:

..."{$http_location}/search.php"... 


pixeldust 05-19-2008 12:13 PM

Re: Adding Speedbar & search to Provider area
 
PERFECT!! You rock!


All times are GMT -8. The time now is 11:22 AM.

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