Paulito Posted August 11, 2013 Share Posted August 11, 2013 Good morning Just a quick question that maybe useful to a lot of forum members. What is the correct code for commenting out? Is it: <!-- comment out --> or {* comment out *} or does this depend on whether it is html, css etc I have seen conflicting answers on the forum so I hope this post and any answers will be helpful to all Paul Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2013 Share Posted August 11, 2013 methods that you mentioned are related to the comments in the .tpl file (not .php) if you will use <!-- COMMENT --> the code will appear in the page source, anyone will be able to see it. if you will use {* COMMENT *} the code will not appear in the source, so no one will be able to see it. im usually use second method - im absolutely sure then, that code isn't visible for guests and robots like google crawler etc. Link to comment Share on other sites More sharing options...
Paulito Posted August 11, 2013 Author Share Posted August 11, 2013 Thank you for your reply vekia I think a lot of new users to prestashop or any other platform are not used to html, css, php, smarty or any other name, so, what would you suggest would be the best way to comment out all file types Paul Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2013 Share Posted August 11, 2013 php - /** COMMENT **/ tpl - {* COMMENT *} js - /** COMMENT **/ css - /** COMMENT **/ html - <!-- COMMENT --> Link to comment Share on other sites More sharing options...
PSdilemma Posted November 3, 2013 Share Posted November 3, 2013 (edited) php - /** COMMENT **/ tpl - {* COMMENT *} js - /** COMMENT **/ css - /** COMMENT **/ html - <!-- COMMENT --> Hello Vekia, In the backend under the price tab I would like to remove the "Pre-tax retail price" and "Tax rule" fields. In the prices.tpl I have commented those sections but I get a black page when I click the price tab. Even just commenting the "Pre-tax retail price". I have tried both methodes: {* COMMENT *} and <!-- COMMENT --> This is an example for commenting the "Pre-tax retail price": {* <tr> <td class="col-left"> {include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"} <label>{l s='Pre-tax retail price:'}</label> </td> <td style="padding-bottom:5px;"> <input type="hidden" id="priceTEReal" name="price" value="{toolsConvertPrice price=$product->price}" /> {$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="[spam-filter]toolsConvertPrice price=$product->price}|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix} <p class="preference_description">{l s='The pre-tax retail price to sell this product'}</p> </td> </tr> *} What else should I do? Thanks Edited November 3, 2013 by PSdilemma (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 if it doesnt work, if you see some errors, please turn on error reporting, you will see what and where doesnt work your comment method looks fine. Link to comment Share on other sites More sharing options...
Recommended Posts