X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Commenting Out Weight (easy question) (https://forum.x-cart.com/showthread.php?t=58334)

ppbjgpjge 03-05-2011 08:40 PM

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!

mekon 03-06-2011 03:37 AM

Re: Commenting Out Weight (easy question)
 
To comment out html use <!-- html here -->

cflsystems 03-06-2011 09:36 AM

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

ppbjgpjge 03-06-2011 12:35 PM

Re: Commenting Out Weight (easy question)
 
Thanks, Steve. That worked perfectly!

quietcoolone 06-24-2011 07:19 AM

Re: Commenting Out Weight (easy question)
 
Works on 4.4.3
edit the product.tpl page of the skin you are using.


All times are GMT -8. The time now is 05:01 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.