Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to add a price range related search link in side menu?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 07-09-2005, 10:34 PM
 
shirley2005 shirley2005 is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 33
 

Default How to add a price range related search link in side menu?

I want to add a Price Range menu in side bar, for example:

$1-$500
$500-$1000
$1000-$2000

when customer click these links, it will display relative products according to the price range.
__________________
x-cart 4.0.14 Pro
Reply With Quote
  #2  
Old 07-10-2005, 04:12 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

Create a file named shop_by_price.tpl in the /skin1/customer/ directory. In this file put this code:

Code:
{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="posted_data[price_min]" value="1"> <input type="hidden" name="posted_data[price_max]" value="100"> $1-$100 </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="posted_data[price_min]" value="100"> <input type="hidden" name="posted_data[price_max]" value="250"> $100-$250 </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="posted_data[price_min]" value="250"> <input type="hidden" name="posted_data[price_max]" value="500"> $250-$500 </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="posted_data[price_min]" value="500"> <input type="hidden" name="posted_data[price_max]" value="1000"> $500-$1000 </form> <form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearchform5"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="1000"> <input type="hidden" name="posted_data[price_max]" value="10000"> $1000-$10000 </form> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title="Shop by Price" menu_content=$smarty.capture.menu }

Then just where you want this menu, call it with:

Code:
{ include file="customer/shop_by_price.tpl" }
Reply With Quote
  #3  
Old 07-10-2005, 01:02 PM
 
shirley2005 shirley2005 is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 33
 

Default

Thanks! It works.
__________________
x-cart 4.0.14 Pro
Reply With Quote
  #4  
Old 07-14-2005, 10:10 AM
 
Online Michael Online Michael is offline
 

eXpert
  
Join Date: Mar 2005
Location: Melbourne, Australia
Posts: 273
 

Default

Just wanted to say thanks. This was just what I was looking for.
__________________
X-Cart 5.3.5.4
Reply With Quote
  #5  
Old 08-30-2005, 06:21 AM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Would it be possible to make this a subcategory?

I'd like to add a category called "Shop by Price" and when they click it they see subcategories as I've defined for the price ranges.

Anyone know how to do this?

Thanks,
Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #6  
Old 08-30-2005, 11:48 AM
  Bling's Avatar 
Bling Bling is offline
 

Senior Member
  
Join Date: Apr 2005
Posts: 162
 

Default

Any way to get rid of the line that seperates the title form the price variables?

Gonna try and put in in my "main" screen" with Fashion Mosaic.
__________________
Thanks...Bling

4.4.2
Reply With Quote
  #7  
Old 08-30-2005, 08:08 PM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default

Nice work TeleFirma. cheers
Reply With Quote
  #8  
Old 03-07-2006, 04:57 AM
  Raptor's Avatar 
Raptor Raptor is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 131
 

Default

I don't know about you guys but once the user is in the searched price range and they try to sort by price or anything it just lists all products...?
__________________
X-Cart Gold Plus v4.7.12
ReBOOT ReDUX Theme
Reply With Quote
  #9  
Old 03-15-2006, 09:37 AM
 
pwd88 pwd88 is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 80
 

Default

I had the same problem, i.e. once the search returens the products list, if you click on next page icon, the serach result just returns all products, anyone has a solution yet?
__________________
XCart 4.0.18 Gold
X-Giftregistry
Neon light
Fashion mosaic
Tabbed product menu
Reply With Quote
  #10  
Old 03-28-2006, 07:25 PM
 
bestdata bestdata is offline
 

Member
  
Join Date: Oct 2004
Posts: 14
 

Default shop by price

thanks for the mode. JUst installed it works great for the fist result page but the 2nd page and fter it shows all the products.

Any advise

tks.....

X-cart 4.0.18 ( linux)
__________________
Online stores . Bestdata.com / Diamondmm.com
X-cart Gold 4.0.13 & 4.0.18 & 4.1
UNIX/LINUX
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:07 PM.

   

 
X-Cart forums © 2001-2020