View Single Post
  #1  
Old 03-14-2010, 12:01 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Wink Shop by Price for xcart 4.3.1

Below is the code for x-cart 4.3.1 to search for products using there price value.

Place this in xcart/skin1/customer/shop_by_price.tpl

Code:
{* $Id: shop_by_price.tpl,v 1.20 2009/04/23 11:35:03 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} {capture name=price} <table width="101%" border="0"> <tr> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_5"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="0"> <input type="hidden" name="posted_data[price_max]" value="5"> <a class="VertMenuItems" href="javascript:document.productsearch_price_5.submit()" >ё0-ё5</a> </form> </td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_10"> <input type="hidden" name="mode" value="search" /> <input type="hidden" name="posted_data[price_min]" value="5" /> <input type="hidden" name="posted_data[price_max]" value="10" /> <a class="VertMenuItems" href="javascript:document.productsearch_price_10.submit()" >ё5-ё10</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_15"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="10"> <input type="hidden" name="posted_data[price_max]" value="15"> <a class="VertMenuItems" href="javascript:document.productsearch_price_15.submit()" >ё10-ё15</a> </form> </td> </tr> <tr> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_20"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="15"> <input type="hidden" name="posted_data[price_max]" value="20"> <a class="VertMenuItems" href="javascript:document.productsearch_price_20.submit()" >ё15-ё20</a> </form> </td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_25"> <input type="hidden" name="mode" value="search" /> <input type="hidden" name="posted_data[price_min]" value="20" /> <input type="hidden" name="posted_data[price_max]" value="25" /> <a class="VertMenuItems" href="javascript:document.productsearch_price_25.submit()" >ё20-ё25</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_30"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="25"> <input type="hidden" name="posted_data[price_max]" value="30"> <a class="VertMenuItems" href="javascript:document.productsearch_price_30.submit()" >ё25-ё30</a> </form> </td> </tr> <tr> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_35"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="30"> <input type="hidden" name="posted_data[price_max]" value="35"> <a class="VertMenuItems" href="javascript:document.productsearch_price_35.submit()" >ё30-ё35</a> </form> </td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_40"> <input type="hidden" name="mode" value="search" /> <input type="hidden" name="posted_data[price_min]" value="35" /> <input type="hidden" name="posted_data[price_max]" value="40" /> <a class="VertMenuItems" href="javascript:document.productsearch_price_40.submit()" >ё35-ё40</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_45"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="40"> <input type="hidden" name="posted_data[price_max]" value="45"> <a class="VertMenuItems" href="javascript:document.productsearch_price_45.submit()" >ё40-ё45</a> </form> </td> </tr> <tr> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_50"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="45"> <input type="hidden" name="posted_data[price_max]" value="50"> <a class="VertMenuItems" href="javascript:document.productsearch_price_50.submit()" >ё45-ё50</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_55"> <input type="hidden" name="mode" value="search" /> <input type="hidden" name="posted_data[price_min]" value="50" /> <input type="hidden" name="posted_data[price_max]" value="55" /> <a class="VertMenuItems" href="javascript:document.productsearch_price_55.submit()" >ё50-ё55</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_60"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="55"> <input type="hidden" name="posted_data[price_max]" value="60"> <a class="VertMenuItems" href="javascript:document.productsearch_price_60.submit()" >ё55-ё60</a> </form></td> </tr> <tr> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_65"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="60"> <input type="hidden" name="posted_data[price_max]" value="65"> <a class="VertMenuItems" href="javascript:document.productsearch_price_65.submit()" >ё60-ё65</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_70"> <input type="hidden" name="mode" value="search" /> <input type="hidden" name="posted_data[price_min]" value="65" /> <input type="hidden" name="posted_data[price_max]" value="70" /> <a class="VertMenuItems" href="javascript:document.productsearch_price_70.submit()" >ё65-ё70</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_75"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="70"> <input type="hidden" name="posted_data[price_max]" value="75"> <a class="VertMenuItems" href="javascript:document.productsearch_price_75.submit()" >ё70-ё75</a> </form></td> </tr> <tr> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_80"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="75"> <input type="hidden" name="posted_data[price_max]" value="80"> <a class="VertMenuItems" href="javascript:document.productsearch_price_80.submit()" >ё75-ё80</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_85"> <input type="hidden" name="mode" value="search" /> <input type="hidden" name="posted_data[price_min]" value="80" /> <input type="hidden" name="posted_data[price_max]" value="85" /> <a class="VertMenuItems" href="javascript:document.productsearch_price_85.submit()" >ё80-ё85</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_90"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="85"> <input type="hidden" name="posted_data[price_max]" value="90"> <a class="VertMenuItems" href="javascript:document.productsearch_price_90.submit()" >ё85-ё90</a> </form></td> </tr> <tr> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_95"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="posted_data[price_min]" value="90"> <input type="hidden" name="posted_data[price_max]" value="95"> <a class="VertMenuItems" href="javascript:document.productsearch_price_95.submit()" >ё90-ё95</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price_100"> <input type="hidden" name="mode" value="search" /> <input type="hidden" name="posted_data[price_min]" value="95" /> <input type="hidden" name="posted_data[price_max]" value="100" /> <a class="VertMenuItems" href="javascript:document.productsearch_price_100.submit()" >ё95-ё100</a> </form></td> <td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_price"> <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="100000"> <a class="VertMenuItems" href="javascript:document.productsearch_price.submit()" >ё100 +</a> </form></td> </tr> </table> {/capture} {include file="customer/menu_dialog.tpl" title=$lng.lbl_Shop_by_Price content=$smarty.capture.price additional_class="menu-bestsellers"}

Once uploaded you can change your xcart/skin1/customer/home.tpl by adding the code below.


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

You can see this at www.nightscene.co.uk/shop/home.php
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote