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)
-   -   shop by price mod? (https://forum.x-cart.com/showthread.php?t=50386)

Mr. G 12-07-2012 10:06 PM

Re: shop by price mod?
 
Two issues.
1. The problem, at least for 4.4.5, with flyclothing's code is that it will only show results for top categories, and ignore subcats. Here is the correct code:
PHP Code:

{capture name=menu}
&
nbsp;&nbsp; &raquo; &nbsp;<a href="/search.php?mode=search&including=all&by_title=on&by_descr=on&by_sku=on&search_in_subcategories=on&price_min=0&price_max=25&by_fulldescr=on&by_shortdescr=on">$- $25</a><br />
&
nbsp;&nbsp; &raquo; &nbsp;<a href="/search.php?mode=search&including=all&by_title=on&by_descr=on&by_sku=on&search_in_subcategories=on&price_min=25&price_max=50&by_fulldescr=on&by_shortdescr=on">$25 - $50</a><br />
&
nbsp;&nbsp; &raquo; &nbsp;<a href="/search.php?mode=search&including=all&by_title=on&by_descr=on&by_sku=on&search_in_subcategories=on&price_min=50&price_max=100&by_fulldescr=on&by_shortdescr=on">$50 - $100</a><br />
&
nbsp;&nbsp; &raquo; &nbsp;<a href="/search.php?mode=search&including=all&by_title=on&by_descr=on&by_sku=on&search_in_subcategories=on&price_min=100&price_max=200&by_fulldescr=on&by_shortdescr=on">$100 - $200</a><br />
&
nbsp;&nbsp; &raquo; &nbsp;<a href="/search.php?mode=search&including=all&by_title=on&by_descr=on&by_sku=on&search_in_subcategories=on&price_min=200&by_fulldescr=on&by_shortdescr=on">$200+</a>
{
assign var="additional_class" value="menu-categories-list"}
{/
capture}
{include 
file="customer/menu_dialog.tpl" title="Shop By Price" content=$smarty.capture.menu

I removed the <li> so that you can add whichever bullet characters you like. Yes, the increments overlap. For my store, I'll never have items that sell for those round numbers.

2. I use X-Cart Mod's Smart Template. If you want to put this in the right or left panel, paste in /skin/smart_template/custom/home_2col_left.tpl or home_3col.tpl or home_2col_right.tpl depending on your chosen layout.

Mr. G 12-10-2012 10:24 PM

Re: shop by price mod?
 
Update: The search does not work under certain (most) circumstances. On our home page, we display a selection of featured products according to the settings here: /admin/categories.php#featured (Admin -> Catalog -> Categories -> Featured Products). If I click on the home page, then one of the Search by Price links as shown in the code above, then only the featured products within that search's price range are displayed. However, if I run a search using /search.php, then later click on one of the price search links in the code above, then the search displays all products properly. So, I am still without a working Search by Price solution. :(


All times are GMT -8. The time now is 06:25 AM.

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