Hi
When you followed this link choose a slave category and go to the following page there is an error.
What can i do about it.
Cheers Henk
Hello Henk,
I see what is happening, your brandFilter parameter is not included on the 2/3/Next etc. links. This needs to be fixed in html/navigation.php.
Line 16:
$prevHREF = "?q=".urlencode($q)."&page=".$prevPage."&sort=".$sort;
$prevHREF = "?q=".urlencode($q)."&page=".$prevPage."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"]);
Line 62:
$pageOneHREF = "?q=".urlencode($q)."&page=1&sort=".$sort;
$pageOneHREF = "?q=".urlencode($q)."&page=1&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"]);
Line 75:
$pageHREF = "?q=".urlencode($q)."&page=".$i."&sort=".$sort;
$pageHREF = "?q=".urlencode($q)."&page=".$i."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"]);
Line 99:
$nextHREF = "?q=".urlencode($q)."&page=".$nextPage."&sort=".$sort;
$nextHREF = "?q=".urlencode($q)."&page=".$nextPage."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"]);
That should do the trick,
Cheers,
David.
Hello,
how did you code this "Totaal aantal artikelen in onze database: 12312" in ?
Can you this explain to me?
Thanks!
Hi Hani,
There is code to get the product count in this thread:
http://www.pricetapestry.com/node/367
To include it on a page and not as its own script, you can just to the following:
<?php
$sql = "SELECT count(*) as numProducts FROM `".$config_databaseTablePrefix."products`";
database_querySelect($sql,$rows);
$numProducts = $rows[0]["numProducts"];
print "<p>Total products in database: ".$numProducts."</p>";
?>
Cheers,
David.
Hi Henk,
That's the same cause - the merchant name must be added to the links generated by html/navigation.php. Based on having already made the changes above:
Line 16:
$prevHREF = "?q=".urlencode($q)."&page=".$prevPage."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"]);
$prevHREF = "?q=".urlencode($q)."&page=".$prevPage."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"])."&merchant=".urlencode($_GET["merchant"]);
Line 62:
$pageOneHREF = "?q=".urlencode($q)."&page=1&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"]);
$pageOneHREF = "?q=".urlencode($q)."&page=1&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"])."&merchant=".urlencode($_GET["merchant"]);
Line 75:
$pageHREF = "?q=".urlencode($q)."&page=".$i."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"]);
$pageHREF = "?q=".urlencode($q)."&page=".$i."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"])."&merchant=".urlencode($_GET["merchant"]);
Line 99:
$nextHREF = "?q=".urlencode($q)."&page=".$nextPage."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"]);
$nextHREF = "?q=".urlencode($q)."&page=".$nextPage."&sort=".$sort."&brandFilter=".urlencode($_GET["brandFilter"])."&merchant=".urlencode($_GET["merchant"]);
Cheers,
David.
works great :)
But is it possible to have it under each other left from the products ,and alphabetical
edit:
got them on the left side, the only thing now is under each other and alphabetical.
Thx HENk
Hi Henk,
Do you mean that instead of using a 1..2..3 Next etc. navigation that you want an alphabetical navigation? Would you not also want the paged navigation as well; incase there were many product beginning with a certain letter?
There's some code in the following thread for creating an A-Z index of categories - the same technique can also be applied to the brand index...
http://www.pricetapestry.com/node/266
Cheers,
David.
Nope i use the brand as a category on the left see link but i want to sort them out under each other only alphabetical.
Thx
Henk
Hello Henk,
I understand. What you need to is simply to add the following SQL to the SQL statement that is selecting the categories:
ORDER BY category
In other words, instead of the SQL you are using now try this:
$sql = "SELECT DISTINCT(category) as category FROM `".$config_databaseTablePrefix."products` ORDER BY category";
Cheers,
David.
Hello Henk,
I can't get an error to occur from that page - all the brand filter pages and subsequent product pages seem to be working ok....
Can you post a direct link to a page that shows the error?
Thanks,
David.