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

Hiding weight in product page

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 11-06-2017, 08:12 AM
 
CorpWest CorpWest is offline
 

Newbie
  
Join Date: Oct 2017
Location: Silicon Valley, California
Posts: 3
 

Default 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...
__________________
x-cart v5.3.3.4
Shared Linux server
we specialize in hosting for non-profits
no special modules added - trying to see how vanilla works first
Reply With Quote
  #2  
Old 11-07-2017, 01:46 AM
 
xim xim is offline
 

X-Cart team
  
Join Date: Nov 2004
Posts: 677
 

Default 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
__________________
Sincerely yours, Max Vydrin
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


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 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 06:36 AM.

   

 
X-Cart forums © 2001-2020