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
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.
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";
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
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.
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..