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

Shop by Weight for x-cart 4.3.1

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-14-2010, 11:56 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

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

Wink Shop by Weight for x-cart 4.3.1

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"}
__________________
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
  #2  
Old 03-14-2010, 01:47 PM
 
cautious cautious is offline
 

Advanced Member
  
Join Date: Oct 2003
Location: FL, US
Posts: 64
 

Default Re: Shop by Weight for x-cart 4.3.1

Good work ShishaPipeUK. Just a trend question: Are there many instances of buyers searching by weight? One would envisage that the weight of supplies or accessories that customers are looking for would not matter as much as the prices. Right?
__________________
Recommend www.paintball-gear-supplies.com for good deals on camping & outdoor supplies.
x-cart v4.1.10 on LAMP
Reply With Quote
  #3  
Old 03-14-2010, 02:10 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

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

Default Re: Shop by Weight for x-cart 4.3.1

Yes i would agree with you, even my online shops do not use the weight mod.

I would suspect the weight is more for a shop that does not use the weight for shipping calculation but maybe for a product, for example selling fitness equipment (weights).

Or maybe a product that is the same but different weights for different prices, for example fruit, or sweets.

I just thought i would post this as well as the shop_by_price.tpl

I am working on shop_by_size.tpl where in product options you have the size of the dress, but having a few problems with this one. You can see
http://forum.x-cart.com/showthread.php?t=52804 for more info.
__________________
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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:20 PM.

   

 
X-Cart forums © 2001-2020