PDA

View Full Version : Simple: Just show 1 query


anonymouse
11-02-10, 02:53
Hi everyone,

I only want to promote 1 type of product in my site: "kw1 kw2" related products.

How can I make it so that when the visitor arrives at my homepage he already sees displayed the result of searching for query "kw1 kw2"?

Ideally, he can see no other category options, and can't even make a different search.

I've been playing with the code for weeks unsuccessfully and a support ticket led me to this forum.

Thanks for your help!

A

CaptainFalcon
11-02-10, 10:59
Simply put, you need to make some pretty heavy changes to the Default Client.

Firstly, you want to change the index.php page to be a copy of the productlist page.

Next your best bet is to then remove the includes you do not want. For example. get rid of search_box, category_tree, query_list, refineby, nav_product_list and if you want merchant_list. Yes, thats pretty much everything.

To hardcode the searchterm you can add to your new index.php page (above the include(product list):
$oProductDisplayListParams->sQuery = "kw1 kw2";

Once you have done that, you should pretty much have a list of products returned. For speed, make sure your refine bys are turned off in your config file and caching is enabled.

Finally, you need to make some changes to the templates to make it look all pretty and get rid of the awful default template that so many affiliates feel an odd need to keep.

:D

Good luck

anonymouse
15-02-10, 17:20
Hey CaptainFalcon,

Thanks for your prompt reply. I will report as soon as I can implement the changes... hopefully successfully.

Regards,

A

Andy
15-02-10, 17:47
I dont think any modifications are required to the client to do this.

Use .htaccess:


RewriteEngine on
RewriteBase /

RewriteRule ^index.php$ /productlist.php?q=Your Search Terms [L]



Might work, havent tested it though