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

Weight removing from product page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 12-27-2006, 03:51 PM
 
ndent ndent is offline
 

Member
  
Join Date: Aug 2006
Posts: 16
 

Default Re: Weight removing from product page

Is this still an issue with 4.1.x? I need to do the same... I don't want weight appearing in the description.
__________________
x-cart pro 4.1.8
Reply With Quote
  #12  
Old 06-13-2008, 08:39 PM
 
smek smek is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 54
 

Default Re: Weight removing from product page

use html commenting and it works

<!---{if $product.weight ne "0.00" || $variants ne ''}
<tr id="product_weight_box">
<td width="30%">{$lng.lbl_weight}</td>
<td nowrap="nowrap"><span id="product_weight">{$product.weight|formatprice}< /span> {$config.General.weight_symbol}</td>
</tr>
{/if} -->
__________________
xcart 4.5.2
Reply With Quote
  #13  
Old 12-18-2009, 09:23 AM
 
northstar northstar is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 33
 

Default Re: Weight removing from product page

I'd love to know how to make the Weight listings disappear on the product pages in Version 4.3. I can't seem to figure it out!

Can anyone help? Thank you!
__________________
Alisa
X-Cart 4.3
Reply With Quote
  #14  
Old 12-18-2009, 09:41 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Weight removing from product page

The file is skin1/customer/main/product_details.tpl and the code to comment out

{if $product.weight ne "0.00" || $variants ne ''}
<tr id="product_weight_box"{if $product.weight eq '0.00'} style="display: none;"{/if}>
<td class="property-name">{$lng.lbl_weight}</td>
<td class="property-value" colspan="2">
<span id="product_weight">{$product.weight|formatprice}< /span> {$config.General.weight_symbol}
</td>
</tr>
{/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
B.Alex (09-07-2010)
  #15  
Old 12-18-2009, 10:20 AM
 
northstar northstar is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 33
 

Default Re: Weight removing from product page

Perfect! Thank you VERY much!
__________________
Alisa
X-Cart 4.3
Reply With Quote
  #16  
Old 02-03-2010, 03:38 PM
  xcel's Avatar 
xcel xcel is offline
 

eXpert
  
Join Date: Nov 2008
Posts: 220
 

Default Re: Weight removing from product page

balinor to the rescue. this works in pro 4.1.9. thanks sir!

Quote:
Originally Posted by balinor
Be VERY careful when you are working with {if} tags. If you don't include the brackets, you could really mess your site up. Instead of all of those comment tags, just put a comment at the beginning and the end of the code, like this:

Code:
{*{if $product.weight ne "0.00"}<TR><TD width="30%">{$lng.lbl_weight}</TD><TD nowrap><SPAN id="product_weight">{$product.weight}</SPAN>{$config.General.weight_symbol}</TD></TR>{/if}*}

That will tell X-Cart to skip the whole thing, and won't leave a blank spot where the weight is supposed to be. No need for it to waste time running the {if} statement if there is nothing to process

FYI, this is how you can hide anything on any page. Just be sure to get both the opening and closing {if} tags.
__________________
X-Cart Gold Plus 4.6.6

Altered Cart - Checkout One
Altered Cart - Checkout One Payments
Altered Cart - Cash Rewards
Altered Cart - On Sale

Smack Digital - CDSEO
Smack Digital - CDSEO Rich Snippets
Smack Digital - xCMS

The xCart Store - xBanners2

Star Plugins - Cloud Zoom

Heavily Customized by Starts Here Ltd. (UK)
Reply With Quote
  #17  
Old 12-14-2010, 01:14 PM
  Bruno Stevens's Avatar 
Bruno Stevens Bruno Stevens is offline
 

Newbie
  
Join Date: Dec 2010
Location: Belgium
Posts: 3
 

Default Re: Weight removing from product page

Thx !
Works fine with X-Cart 4.4.1

Quote:
Originally Posted by smek
use html commenting and it works

<!---{if $product.weight ne "0.00" || $variants ne ''}
<tr id="product_weight_box">
<td width="30%">{$lng.lbl_weight}</td>
<td nowrap="nowrap"><span id="product_weight">{$product.weight|formatprice}< /span> {$config.General.weight_symbol}</td>
</tr>
{/if} -->
__________________
Bruno Stevens - Belgium
X-Cart 4.4.1 Gold
mother tongue: Dutch

www.tandem-shop.kz
Reply With Quote
  #18  
Old 06-16-2011, 02:22 PM
 
batt255 batt255 is offline
 

Member
  
Join Date: Feb 2011
Posts: 29
 

Default Re: Weight removing from product page

will this work on 4.4.3?
__________________
x-cart 4.4
Reply With Quote
  #19  
Old 06-16-2011, 05:37 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Weight removing from product page

Yes but use smarty comments not html comments - {* code here *}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #20  
Old 06-18-2011, 10:42 AM
 
batt255 batt255 is offline
 

Member
  
Join Date: Feb 2011
Posts: 29
 

Default Re: Weight removing from product page

I'm sorry newbie..can you show me?
__________________
x-cart 4.4
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 10:31 PM.

   

 
X-Cart forums © 2001-2020