X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Hard coded search links... (https://forum.x-cart.com/showthread.php?t=11431)

maazinesquick 01-12-2005 11:36 AM

Hard coded search links...
 
Can you not use hard coded search links with X-Cart 4.0.9? I would like to add a "Quick Links" section to our site where a customer can click on a link and get search results based on the options established via the link.

Such as: All products less that $10.00 sorted by price.

Is this possible? Or is there a MOD available somewhere that would let me do this?

rjcbear 01-12-2005 11:49 AM

Re: Hard coded search links...
 
Quote:

Originally Posted by maazinesquick
Can you not use hard coded search links with X-Cart 4.0.9? I would like to add a "Quick Links" section to our site where a customer can click on a link and get search results based on the options established via the link.

Such as: All products less that $10.00 sorted by price.

Is this possible? Or is there a MOD available somewhere that would let me do this?


Dave,

is this what you looking for?

http://www.cart-lab.com/lab/customer/pages.php?pageid=3


download a file named: Shop By Price Menu

I hope this will help

Kind regards
Ricky Calle

maazinesquick 01-12-2005 01:02 PM

Re: Hard coded search links...
 
Quote:

Dave,

is this what you looking for?

http://www.cart-lab.com/lab/customer/pages.php?pageid=3


download a file named: Shop By Price Menu

I hope this will help

Kind regards
Ricky Calle



Hello Ricky,

Thanks for the link! Yeah, that's what I am looking for but that doesn't appear to work with version 4.0.9. I had already figured out how to make the links, I just couldn't get them to work.

That file appears to have been written for 3.5.x, so I guess it used to work... maybe they have changed something in version 4.x.x.

But thank you for your help!

anandat 01-12-2005 07:53 PM

Dave,
Yes they have changed search method in 4.x. Instead of GET method they implement POST method so I guess it's not possible to get serach result my clicking on link.

maazinesquick 01-13-2005 06:13 AM

Okay... I finally came up with something that will work. But now after spending two days on this I find that an X-Cart user with the username TeleFirma had already done something very similar in this post:

http://forum.x-cart.com/viewtopic.php?t=8969

Sure wish I had found that sooner! But here is what I did for anyone that wants to know:



I put this code into a file called quick_links.tpl

Quote:

{* $Id: quick_links.tpl,v 1.00 01/12/2005 22:53:29 max Exp $ *}

{capture name=menu}
<form style="margin-top: 0; margin-bottom: 0" method="post" action="search.php" name="productsearchform1">
<input type="hidden" name="mode" value="search" />
<input type="hidden" name="sort" value="price" />
<input type="hidden" name="sort_direction" value="0" />
<input type="hidden" name="posted_data[price_min]" value="0.00" />
<input type="hidden" name="posted_data[price_max]" value="9.99" />
Under $10.00
</form>

<form style="margin-top: 0; margin-bottom: 0" method="post" action="search.php" name="productsearchform2">
<input type="hidden" name="mode" value="search" />
<input type="hidden" name="sort" value="price" />
<input type="hidden" name="sort_direction" value="0" />
<input type="hidden" name="posted_data[price_min]" value="10.00" />
<input type="hidden" name="posted_data[price_max]" value="20.00" />
$10.00-$20.00
</form>

<form style="margin-top: 0; margin-bottom: 0" method="post" action="search.php" name="productsearchform3">
<input type="hidden" name="mode" value="search" />
<input type="hidden" name="sort" value="price" />
<input type="hidden" name="sort_direction" value="0" />
<input type="hidden" name="posted_data[price_min]" value="20.00" />
<input type="hidden" name="posted_data[price_max]" value="40.00" />
$20.00-$40.00
</form>

<form style="margin-top: 0; margin-bottom: 0" method="post" action="search.php" name="productsearchform4">
<input type="hidden" name="mode" value="search" />
<input type="hidden" name="sort" value="price" />
<input type="hidden" name="sort_direction" value="0" />
<input type="hidden" name="posted_data[price_min]" value="40.00" />
<input type="hidden" name="posted_data[price_max]" value="1500.00" />
Over $40.00
</form>
{/capture}

{ include file="menu.tpl" dingbats="dingbats_yarrow.gif" menu_title="Quick Links" menu_content=$smarty.capture.menu }


And then I put this into customer/home.tpl where I wanted it to show up.

Quote:

{ include file="customer/quick_links.tpl" }


That's it....


All times are GMT -8. The time now is 09:24 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.