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
  #11  
Old 12-01-2007, 06:03 AM
 
16hands 16hands is offline
 

Newbie
  
Join Date: Mar 2007
Posts: 8
 

Default Re: Showing products by price range

Hmmmm

When I tried this, I got the "shop by price" area, but still no hyperlinks. Any ideas?

Thank you
__________________
Rick Wedel
16 Hands
Celebrating fine craft since 1975

x-cart v. 4.1.6
Reply With Quote
  #12  
Old 12-01-2007, 06:10 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default Re: Showing products by price range

Heres a simple way to do this for 4.1.x

make a new template called shop_by_price.tpl and upload it to skin1 directory

open skin1/customer/home.tpl and add this where you want the menu to show up. maybe after the include for categories.tpl etc

use this to include the template to your page

Code:
{ include file="shop_by_price.tpl" }

Heres the code for shop_by_price.tpl

Code:
{* $Id: shop_by_price.tpl *} {capture name=menu} <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_max=50">ё0 - ё50</a><BR> <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_min=50&price_max=100">ё50 - ё100</a><BR> <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_min=100&price_max=200">ё100 - ё200</a><BR> <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_min=200&price_max=300">ё200 - ё300</a><BR> <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_min=300">ё300 +</a> {/capture} { include file="menu.tpl" dingbats="dingbats_help.gif" menu_title="Shop By Price" menu_content=$smarty.capture.menu }

adjust to suit
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #13  
Old 12-01-2007, 01:13 PM
 
16hands 16hands is offline
 

Newbie
  
Join Date: Mar 2007
Posts: 8
 

Default Re: Showing products by price range

Ah! thank you.

It does work with hyperlinks now, and looks great on the first page of the results. The only problem seems to be that (for example) there might be 4 pages show up for the results for 25-50, but when I go to the next page, it lengthens to 16 pages and starts with the $10 items. Any ideas as to why? I think I'll leave it up this way for now. The first page of the search looks great - after that it seems to default to all products below the range.

Thank you again.
__________________
Rick Wedel
16 Hands
Celebrating fine craft since 1975

x-cart v. 4.1.6
Reply With Quote
  #14  
Old 08-02-2012, 12:20 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Showing products by price range

Quote:
Originally Posted by shan
Heres a simple way to do this for 4.1.x

make a new template called shop_by_price.tpl and upload it to skin1 directory

open skin1/customer/home.tpl and add this where you want the menu to show up. maybe after the include for categories.tpl etc

use this to include the template to your page

Code:
{ include file="shop_by_price.tpl" }

Heres the code for shop_by_price.tpl

Code:
{* $Id: shop_by_price.tpl *} {capture name=menu} <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_max=50">ё0 - ё50</a><BR> <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_min=50&price_max=100">ё50 - ё100</a><BR> <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_min=100&price_max=200">ё100 - ё200</a><BR> <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_min=200&price_max=300">ё200 - ё300</a><BR> <a href="search.php?mode=search&sort=price&sort_direction=0&including=all&price_min=300">ё300 +</a> {/capture} { include file="menu.tpl" dingbats="dingbats_help.gif" menu_title="Shop By Price" menu_content=$smarty.capture.menu }

adjust to suit

But if I goes into the particular category then it is not working.How to work in category level?
__________________
4.6.1 Platinum


Reply With Quote
  #15  
Old 08-06-2012, 08:41 PM
 
sandyg sandyg is offline
 

Newbie
  
Join Date: Mar 2007
Posts: 6
 

Default Re: Showing products by price range

code is not working in 4.5.0 version
__________________
xcart-1.0.9
Reply With Quote
  #16  
Old 02-26-2013, 12:57 PM
 
elipsoid_cz elipsoid_cz is offline
 

Member
  
Join Date: Aug 2012
Posts: 15
 

Default Re: Showing products by price range

Hi, did anybody find a solution how to get this to work in 4.5.2? Thanks.
__________________
4.5.2
Reply With Quote
  #17  
Old 02-26-2013, 01:05 PM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Showing products by price range

Why you don't use Advanced search, entering min and max price, and look at the URL? Then copy this URL into shan's customization, and change it according.
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #18  
Old 02-27-2013, 01:45 AM
 
elipsoid_cz elipsoid_cz is offline
 

Member
  
Join Date: Aug 2012
Posts: 15
 

Default Re: Showing products by price range

Well, because the URL does not change, it looks like this all the time: http://wearewhisky.com/search.php?mode=search&page=1

Maybe it has something to do with htaccess neat urls?
__________________
4.5.2
Reply With Quote
  #19  
Old 02-27-2013, 02:12 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Showing products by price range

You are right. I don't think it is a .htaccess issue. They changed the way these variables are sent inside the script (GET to POST). See here in action: http://demo.x-cart.com/demo/search.php

QT should offer some clues on this why they changed this behavior.

As a tip, using a filtering solution you don't need anymore this customization, and it is much more professional than clicking on links.
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
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 06:10 PM.

   

 
X-Cart forums © 2001-2020