Hi David, a simple question but I can't find the answer using the search function on the forum...
How would you show all products across all merchants?
If it wanted my front index page to be a (paginated) list of all products from every merchant (rather than the default Google-like search box + featured products as standard), how would I accomplish this?
Thanks!
Hi david
I would like to make a image link to a search result page which show allproducts whatever the merchand.
What I have to change in my code:
<a href="/merchant/Essai/"><img src="/images/allproducts.jpg" /></a>
Thank you
Hi,
Use this:
<a href="/search.php?q=bw:"><img border='0' src="/images/allproducts.jpg" /></a>
(i've added border='0' otherwise you get a border around an image when it is part of a link...)
Cheers,
David.
Hi David
Please accept my apologize, my previous question was not accurate enough.
When I make a link to /merchant/essai, I have a search result page with all products from the merchant essai.
I would like to create a link to a search result page showing all products from all merchants.
Best regards
Hi,
Oooops - i'd missed the code tags out of my post above - you can now see the A and IMG tags required for your link to all products from all merchants...
Cheers,
David.
Hi David,
How would I hide the query from the search box if $q is "bw"?
I'm using 1509 with search form autocomplete module.
Many thanks
Richard
Hello Richard,
If $q is bw: the query shouldn't be displayed in the search box but to capture the "bw" on its own case, in html/searchform.php look for the setting of the value attribute on the text box within line 21:
value='<?php print ((isset($q) && !isset($parts[1]) && !isset($product["products"]))?$q:""); ?>'
...and REPLACE with:
value='<?php print ((isset($q) && !isset($parts[1]) && ($q<>"bw") && !isset($product["products"]))?$q:""); ?>'
Cheers,
David.
--
PriceTapestry.com
Hi Jim,
The query bw: will return all products; so you could make these results become your home page by replacing index.php with just:
<?php
$_GET["q"] = "bw:";
require("search.php");
?>
For aesthetic reasons you may of course want to hide the query from the search box and header bar if $q is "bw:" so let me know if you need a hand with that...
Cheers,
David.