Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding Speedbar & search to Provider area

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-16-2008, 01:49 AM
  pixeldust's Avatar 
pixeldust pixeldust is offline
 

Senior Member
  
Join Date: Nov 2007
Location: New Zealand
Posts: 107
 

Default 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
__________________
Jayce - still a PHP and X-cart newbie & queen of stupid questions
LIVE SITE: www.craftfetish.co.nz

X-CART Pro 4.1.9 w/ numerous custom mods including phpBB integration, provider commission/billing management & more
Reply With Quote
  #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
  #3  
Old 05-16-2008, 12:15 PM
  pixeldust's Avatar 
pixeldust pixeldust is offline
 

Senior Member
  
Join Date: Nov 2007
Location: New Zealand
Posts: 107
 

Default 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

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.
__________________
Jayce - still a PHP and X-cart newbie & queen of stupid questions
LIVE SITE: www.craftfetish.co.nz

X-CART Pro 4.1.9 w/ numerous custom mods including phpBB integration, provider commission/billing management & more
Reply With Quote
  #4  
Old 05-19-2008, 03:32 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
You are an absolute legend! I knew I should have just asked, this has been bugging me for weeks

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"... 
Reply With Quote
  #5  
Old 05-19-2008, 12:13 PM
  pixeldust's Avatar 
pixeldust pixeldust is offline
 

Senior Member
  
Join Date: Nov 2007
Location: New Zealand
Posts: 107
 

Default Re: Adding Speedbar & search to Provider area

PERFECT!! You rock!
__________________
Jayce - still a PHP and X-cart newbie & queen of stupid questions
LIVE SITE: www.craftfetish.co.nz

X-CART Pro 4.1.9 w/ numerous custom mods including phpBB integration, provider commission/billing management & more
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 10:16 PM.

   

 
X-Cart forums © 2001-2020