| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Copy search box to non-cart pages | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Is it possible to copy the search utility from X-Cart and add it to any non-cart pages so it can search from outside the cart?
v 4.1.8
__________________
Thanks - CobaltCat I would love to change the world, but they won't give me the source code. |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() Yes, just extract the form code and put it in your page, and make sure you reference the file search.php correctly in the form action:
<TABLE width="100%" height="1" border="0" cellpadding="0" cellspacing="0" align="right" valign="top"> <FORM method="POST" action="search.php" name="productsearchform"> <INPUT type="hidden" name="simple_search" value="Y"> <INPUT type="hidden" name="mode" value="search"> <INPUT type="hidden" name="posted_data[by_title]" value="Y"> <INPUT type="hidden" name="posted_data[by_shortdescr]" value="Y"> <INPUT type="hidden" name="posted_data[by_fulldescr]" value="Y"> <TR> <TD align="right">Search<INPUT type="text" name="posted_data[substring]" size="20"> </TD> <td width="10"> </td> <TD width="23"><A href="javascript: document.productsearchform.submit()">Go</A></TD> </TR> <TR> <TD colspan="3" align="right" valign="top"> <A href="/equine/search.php" class="SmallLink">Advanced Search</A> </TD> </TR> </FORM> </TABLE>
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Thanks, Paul, that worked perfectly!
__________________
Thanks - CobaltCat I would love to change the world, but they won't give me the source code. |
|||||||||
#4
|
|||||||
|
|||||||
![]() How about the advanced search. Is there a way to put that on another page? I have not been succesful at getting it to work.
__________________
4.1.9 (Linux) Live Store www.thecrackedbook.com Find used books and out of print books. |
|||||||
#5
|
|||||||
|
|||||||
![]() Paul,
How do you reference the file search.php correctly in the form action? Thank you.
__________________
All USA Catalog X-Cart Gold 4.1.9 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Crikey, that's a while back, Jeff
![]() Basically, we are looking at this line: <FORM method="POST" action="search.php" name="productsearchform"> within which is "search.php" - so what you need to do here, is change the link so that wherever you put this form, it can still find search.php Maybe adding http://yourdomain.com/search.php or http://yourdomain.com/store/search.php or ../search.php something like that, just so it can find the file from wherever it is.
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|