Below is the code for x-cart 4.3.1 to search for products using there weight value.
Place this in xcart/skin1/customer/shop_by_weight.tpl
Code:
{*
$Id: shop_by_weight.tpl,v 1.20 2009/04/23 11:35:03 max Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{capture name=weight}
<table width="100%" border="0">
<tr>
<td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_weight1">
<input type="hidden" name="mode" value="search">
<input type="hidden" name="posted_data[weight_min]" value="0.00">
<input type="hidden" name="posted_data[weight_max]" value="0.50">
<a class="VertMenuItems" href="javascript:document.productsearch_weight1.submit()" >Weight 0 - 0.50</a>
</form> </td>
<td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_weight2">
<input type="hidden" name="mode" value="search">
<input type="hidden" name="posted_data[weight_min]" value="0.50">
<input type="hidden" name="posted_data[weight_max]" value="1.00">
<a class="VertMenuItems" href="javascript:document.productsearch_weight2.submit()" >Weight 0.50 - 1</a>
</form> </td>
</tr>
<tr>
<td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_weight3">
<input type="hidden" name="mode" value="search">
<input type="hidden" name="posted_data[weight_min]" value="1.00">
<input type="hidden" name="posted_data[weight_max]" value="1.50">
<a class="VertMenuItems" href="javascript:document.productsearch_weight3.submit()" >Weight 1 - 1.50</a>
</form> </td>
<td><form style="margin-top: 0; margin-bottom: 0" method="POST" action="search.php" name="productsearch_weight4">
<input type="hidden" name="mode" value="search">
<input type="hidden" name="posted_data[weight_min]" value="1.50">
<input type="hidden" name="posted_data[weight_max]" value="999.99">
<a class="VertMenuItems" href="javascript:document.productsearch_weight4.submit()" >Weight 1.50 +</a>
</form> </td>
</tr>
</table>
{/capture}
{include file="customer/menu_dialog.tpl" title=$lng.lbl_Shop_by_weight content=$smarty.capture.weight 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_weight.tpl"}