Search Box from External site?
I am tyring to have a search box on an external site capable of searching my zen-cart site.
In other words, I would like to have visitors at happy.biz be able to search in a search box which will take them to zen-cart-happy.biz to view the results.
Any help appreciated.
thanks.
Re: Search Box from External site?
It's fairly straightforward. Just look at the HTML generated for a header seach box. This is actually a complete form that passes the search terms to the advanced_search_result page. Create a similar form with the same action on your external site and you can pass search terms into your Zen Cart in the same way.
Re: Search Box from External site?
Kuroi's right... it's not difficult.
On one of our customer's external sites, we have the following HTML:
HTML Code:
<div id="productSearch">
<form id="quick_find" action="http://www.OUR-WEB-SHOP.co.uk/index.php?main_page=advanced_search_result" method="get">
<fieldset>
<label for="keyword">Search our product catalogue</label>
<input type="text" name="keyword" id="keyword" size="20" maxlength="100" style="width: 145px" value="Enter search keywords" onfocus="if (this.value == 'Enter search keywords') this.value = '';" onblur="if (this.value == '') this.value = 'Enter search keywords';" />
<input name="submit" type="submit" class="submit" value="Go" />
<p><a href="http://www.OUR-WEB-SHOP.co.uk/index.php?main_page=advanced_search">Advanced search ></a></p>
<input type="hidden" name="main_page" value="advanced_search_result" />
<input type="hidden" name="search_in_description" value="1" />
</fieldset>
</form>
</div>
(Naturally, for privacy, I've changed our actual URL (above) to "OUR-WEB-SHOP" - so this is where you put your own webshop's URL)
Re: Search Box from External site?
Got it :) working per your suggestions...and thank for the help
much appreciated.