X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Hiding weight in product page (https://forum.x-cart.com/showthread.php?t=75767)

CorpWest 11-06-2017 08:12 AM

Hiding weight in product page
 
How do I hide the weight in the product display pages? If found some nice css examples to hide all, but I WANT the SKU - just not the weight? Does anyone have the syntax for that?

P.S. I still want to track and use the weight for shipping and even OK to display in checkout page, just not the product display pages for aesthetics...

xim 11-07-2017 01:46 AM

Re: Hiding weight in product page
 
Log in as admin,
open the storefront,
click the grey icon in the bottom left corner to open webmaster mode,
choose template editor,
make sure that "Pick templates from page" is enabled,
point to the weight line to pick up the needed template (the right one is "customer/product/details/common_attributes/common.product-attributes.weight.twig")
add "add false" to the if statement like this:
Code:

{% if this.getWeight() != 0 and false %}

Do it under the webmaster mode and the system will create the new theme_tweaker/customer/product/details/common_attributes/common.product-attributes.weight.twig file with custom code. As a result, the upgrade will continue work smoothly for you.

The full list of the all edited templates are presented in the "Look & Feel" -> "Edited templates" section


All times are GMT -8. The time now is 12:41 AM.

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