You are here:  » Brands


Brands

Submitted by chrisst1 on Wed, 2006-04-12 14:19 in

I seem to be having problems getting the brands list to show products when clicked. Any suggestions, something simple I might have missed perhaps.
http://www.flexyourplastic.co.uk/productsearch/brands.php

Thanks Chris

Submitted by support on Wed, 2006-04-12 14:30

Hi Chris,

I'm looking into this now. I notice that something funny is going on with regards the query string when the search query contains characters that need to be encoded on the URL.

For example, if you search for just ":" on its own, you will see that it is converted into "3A" in the search box, which is the hex code for the ":" character, and is normally represented on the URL by "%3A", so for some reason, URL encoding is going funny.

I'm afraid I don't have an answer yet, so bear with me whilst I look into it, and i'll try and figure out what's going on..

Submitted by support on Wed, 2006-04-12 14:59

Hi Chris,

Can you check that you have $config_baseHREF set as follows:

$config_baseHREF = "/productsearch/";

The reason i'm wondering if this is part of the problem is that the action attribute for the search form is as follows:

/productsearch//search.php

..note the extra "/". It maybe the rewrite being performed by the server as a result of this that is causing the problem...

Cheers,
David.

Submitted by chrisst1 on Wed, 2006-04-12 15:14

Hi
Its the same as you wrote above

$config_title = "Product Search";

$config_charset = "utf-8";

$config_baseHREF = "/productsearch/";

$config_useRewrite = false;

$config_useTracking = TRUE;

$config_useJavaScript = TRUE;

$config_useInteraction = TRUE;

$config_currencyHTML = "£";

$config_resultsPerPage = 10;

$config_databaseServer = "localhost";

Submitted by chrisst1 on Wed, 2006-04-12 15:21

Sorted form had extra / now looks like
action='".$config_baseHREF."search.php'

has not fixed brand problem though

Just tested problem on your original script and it works fine

http://www.flexyourplastic.co.uk/productsearchOLD/brands.php

Submitted by support on Wed, 2006-04-12 15:31

Hi Chris,

Sorry about this; it's uncovered a bug in brands.php! When rewrite is not being used, it is generating the wrong query (using "category" instead).

If you edit brands.php, search for the word "category" and simply change it to "brand", as follows:

$item["href"] = search.php?q=brand:".urlencode($product["brand"]).":";

I've now fixed this in the distribution. Apologies for the inconvenience.

Regards,
David.

Submitted by chrisst1 on Wed, 2006-04-12 15:56

David

All fixed, thanks for the help.

Chris