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)
-   -   removing weight (https://forum.x-cart.com/showthread.php?t=33706)

mangoboom 09-05-2007 07:11 AM

removing weight
 
Hi

does anyone know how to not show the weight of a product to a user? currently the weight is being displayed on the product detail page, we dont want to show the weight to the users.

thanks for any help

balinor 09-05-2007 07:22 AM

Re: removing weight
 
Open up customer/main/product.tpl and remove or comment out this:

{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}

hhiker 09-05-2007 07:22 AM

Re: removing weight
 
I did this by commenting out the following code in my /skin1/customer/main/product.tpl file.

Code:

{if $product.weight ne "0.00" || $variants ne ''}
<tr id="product_weight_box">
 <td width="40%">{$lng.lbl_weight}</td>
 <td nowrap="nowrap"><span id="product_weight">{$product.weight|formatprice}</span> {$config.General.weight_symbol}</td>
</tr>
{/if}


mangoboom 09-05-2007 08:02 AM

Re: removing weight
 
done!

thanks for your help guys

Acquamarina 01-11-2008 05:21 PM

Re: removing weight
 
Hi,

Does this work for 4.1.9? Is it the same snipet or has it changed?

Thanks in advance!

Acquamarina 02-09-2008 10:17 AM

Re: removing weight
 
Ok, I just got an answer form x-cart for the solution on 4.1.9 and here it is:

In order to have the weight removed from the product description page but still be calculated for the shipping you need to modify the "skin1/customer/main/product.tpl" on your server.

Find this code:

----CODE----

{if $product.weight ne "0.00" || $variants ne ''}<tr><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}

----CODE----

and change it to this one:

----CODE----

{*if $product.weight ne "0.00" || $variants ne ''}<tr><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*}

----CODE----

You can also change the code in your Admin area in the "Edit templates" section by following this route "customer ->main -> product.tpl" and perform the above mentioned change there.

Please, note that the incorrect changing of the templates code may lead to an incorrect display of the page.

Hope this can help someone else. It's easy - even I got it to work.


All times are GMT -8. The time now is 10:57 AM.

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