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

Commenting Out Weight (easy question)

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-05-2011, 08:40 PM
 
ppbjgpjge ppbjgpjge is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 53
 

Cool Commenting Out Weight (easy question)

I want to remove the weight from being seen on my storefront, but still use it for shipping. It looks like through a search of these forums that commenting that out of my product_details.tpl file is the best way to go.

However, I've tried a couple of different ways and it's not working.

I'm guessing this is the code I need to comment out:
Code:
{if $product.weight ne "0.00" or $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}

I've put // in front of every line, but that just gives me a whole bunch of // on my template page. Ditto for /* */ bracketing the code.

Silly question, I know, but can someone help? Thanks!
__________________
X-Cart 4.4.1
add'l mods - Download expander
Reply With Quote
  #2  
Old 03-06-2011, 03:37 AM
 
mekon mekon is offline
 

Senior Member
  
Join Date: Jan 2011
Posts: 180
 

Default Re: Commenting Out Weight (easy question)

To comment out html use <!-- html here -->
__________________
------------------------------------------------

Darren
Reply With Quote
  #3  
Old 03-06-2011, 09:36 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Commenting Out Weight (easy question)

This is smarty code not html (well it does have html code as well). Use

{* code here *}

to comment out. If you use html comments the code will not be executed but will show in the html source code
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following 2 users thank cflsystems for this useful post:
aol (04-16-2011), ppbjgpjge (03-06-2011)
  #4  
Old 03-06-2011, 12:35 PM
 
ppbjgpjge ppbjgpjge is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 53
 

Default Re: Commenting Out Weight (easy question)

Thanks, Steve. That worked perfectly!
__________________
X-Cart 4.4.1
add'l mods - Download expander
Reply With Quote
  #5  
Old 06-24-2011, 07:19 AM
 
quietcoolone quietcoolone is offline
 

Senior Member
  
Join Date: Mar 2011
Posts: 176
 

Default Re: Commenting Out Weight (easy question)

Works on 4.4.3
edit the product.tpl page of the skin you are using.
__________________
Austin!
X-Cart 4.7.7 (old) X-Cart Business 5.3.6.8 (new)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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:03 AM.

   

 
X-Cart forums © 2001-2020