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

Showing products by price range

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-27-2005, 05:22 PM
 
chrisinoz chrisinoz is offline
 

eXpert
  
Join Date: Aug 2004
Location: Australia
Posts: 248
 

Default Showing products by price range

My client has seen a site (not xcart) where you can click on $0-$200 etc and it shows all products in that range.

He would like that.

I know I can do an advanced search for that but that gives me no distinct url I can paste into a new menu.

An easy mod?

Thanks for any help here.

Cheers
Chris

4.016
Reply With Quote
  #2  
Old 10-27-2005, 08:49 PM
  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 10-28-2005, 12:35 AM
 
chrisinoz chrisinoz is offline
 

eXpert
  
Join Date: Aug 2004
Location: Australia
Posts: 248
 

Default

Thank You very much TelaFirma

Works a treat.

Cheers

Chris
Reply With Quote
  #4  
Old 07-31-2006, 12:38 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

tela,

i se this working on ur peral shop but somehow ur results are formated differntly. theres no


[view all] 1 2 NEXT б╩

or

5results found
Displaying: 1 - 10 results

Search results
Search again
Sort by: SKU Product Price Default
__________________
X-Cart 4.0.18 DBest
Reply With Quote
  #5  
Old 07-31-2006, 12:40 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

tela,

what does this do:
{ include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title="Shop by Price" menu_content=$smarty.capture.menu }

and how do u do it so that is language compatible and not hard coded language?

Shop by Price is hard coded?

How bout when we want it in a different language?
__________________
X-Cart 4.0.18 DBest
Reply With Quote
  #6  
Old 06-12-2007, 04:34 PM
 
jstafford jstafford is offline
 

Newbie
  
Join Date: Aug 2003
Posts: 1
 

Default Re: Showing products by price range

This is a great tool. I have followed the instructions and it does indeed put the menu where I wanted it. Just one problem - when you mouse over the price range items, there is no hyperlink, it is just text. Could it be that this doesn't work with the latest branch 4.0.7? Our store is at www.swisswatchstyles.com/shop .

Regards,
Jay

Quote:
Originally Posted by TelaFirma
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
  #7  
Old 06-12-2007, 06:57 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Showing products by price range

Jay, this thread is almost 2 years old...it probably doesn't work with the 4.1 branch of X-Cart.

Also, if you could add your version to your X-Cart signature per the forum guidelines that would be great. Thanks!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 11-10-2007, 12:45 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Showing products by price range

Is there a similar mod/patch that does work with the 4.1 branch of X-Cart? This is something I am very interested in implamenting on my site.

Thanks
__________________
version 4.4.2
Reply With Quote
  #9  
Old 11-10-2007, 03:13 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default Re: Showing products by price range

Okay, I just tried this with version 4.1.8 and it works, sort of.
It added a nice box under my main category box titled 'Shop by Price' as expected.
The price values are there and they are clickable and everything so at first glace it appears to work. When I click any of the price values I get taken to a page full of items in that price range, so again, it appears to work...
Until I click on any of the 'sort by' options.
If I sort by price, no matter which price range I'm supposed to be browsing, it displays ALL of my products and sorts them by price.
If I sort by product, it does the same thing only sorting by product name, but it includes ALL of the products on my site not just the ones specific to the price range I requested.

Anyone know a way to make the 'sort by' feature stay within the price range that was just clicked?

Thanks,
__________________
version 4.4.2
Reply With Quote
  #10  
Old 11-13-2007, 03:14 PM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: Showing products by price range

Look at your PMs
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:26 AM.

   

 
X-Cart forums © 2001-2020