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

Hiding product weights and inventory quantities

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 11-13-2014, 08:58 AM
  More-Japan's Avatar 
More-Japan More-Japan is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 107
 

Default Hiding product weights and inventory quantities

By default X-Cart 5 shows all product weights and inventory quantities. I would like to hide this from the storefront. Anyone know how this can be done? Is there a module or somewhere in the template files I can hide the code that displays these values?
__________________
Version 5.2.13

http://www.more-japan.com/
Reply With Quote
  #2  
Old 11-17-2014, 01:39 AM
 
SignTorch SignTorch is offline
 

Advanced Member
  
Join Date: Jun 2010
Posts: 30
 

Default Re: Hiding product weights and inventory quantities

there may be a better way, but this worked for me

to hide the weight, using custom skins module

copy skins\default\en\product\details\common_attributes \common.product-attributes.weight.tpl

to skins\custom_skin\default\en\product\details\commo n_attributes\common.product-attributes.weight.tpl

and comment out the template code

Code:
{* <li IF="!getWeight()=0"> <div><strong>{t(#Weight#)}</strong></div> <span>{formatWeight(getWeight())}</span> </li> *}

I'm not using inventory, so I'd guess for inventory maybe do the same with this template

skins\default\en\product\details\parts\common.stoc k.tpl
__________________
SignTorch Vector Graphics
dropping xc4.6.x, tested xc5 (FAIL)
Reply With Quote

The following user thanks SignTorch for this useful post:
tony_sologubov (11-17-2014)
  #3  
Old 11-17-2014, 02:43 PM
  More-Japan's Avatar 
More-Japan More-Japan is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 107
 

Default Re: Hiding product weights and inventory quantities

Thank you. I was able to hide the product quantities through the template files.
__________________
Version 5.2.13

http://www.more-japan.com/
Reply With Quote
  #4  
Old 02-21-2015, 08:52 PM
 
Hanypa Hanypa is offline
 

Member
  
Join Date: Feb 2015
Location: West Allis, WI
Posts: 25
 

Default Re: Hiding product weights and inventory quantities

You can also do it with custom css in the back of xcart with

Code:
/* Hide quantity available */ .product-items-available { display: none; } /* Hide weight in check out */ .item-weight { display: none; } /* Hide weight & SKU in item description */ .product-details-tabs { display: none; }

This way you don't have to modify any files, which makes upgrading a little easier.
__________________
X-Cart 4.6.4 Gold Plus
X-Cart 5.2.4 Free
Reply With Quote
  #5  
Old 03-07-2015, 07:12 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Hiding product weights and inventory quantities

Hanypa,

Your way works, but that hides the product description too. I'm interersted in only hiding the Weight & SKU.

Perhaps a combination of Custom Skin and your CSS?

Or is there a way to build a Module to do this?
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #6  
Old 08-01-2015, 07:10 PM
 
Wing Fat Wing Fat is offline
 

Advanced Member
  
Join Date: Oct 2012
Posts: 34
 

Default Re: Hiding product weights and inventory quantities

Quote:
Originally Posted by minfinger
Hanypa,

Your way works, but that hides the product description too. I'm interersted in only hiding the Weight & SKU.
Try this instead:
Code:
/* Hide weight & SKU in item description */ .extra-fields { display: none; }
__________________
X-Cart Business 5.2.6
Reply With Quote
  #7  
Old 08-05-2015, 12:18 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: Hiding product weights and inventory quantities

Quote:
Originally Posted by minfinger
Hanypa,

Your way works, but that hides the product description too. I'm interersted in only hiding the Weight & SKU.

Perhaps a combination of Custom Skin and your CSS?

Or is there a way to build a Module to do this?
There is no need in editing templats.
Just add this to 'Custom CSS':
Code:
.product-details .extra-fields { display: none; }
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #8  
Old 03-09-2016, 11:07 AM
 
Oren Oren is offline
 

Advanced Member
  
Join Date: Sep 2015
Posts: 30
 

Default Re: Hiding product weights and inventory quantities

Quote:
Originally Posted by razortw
There is no need in editing templats.
Just add this to 'Custom CSS':
Code:
.product-details .extra-fields { display: none; }
This did not work for me with version 5.2.13.

Also, the weight also appears in the cart, and I'd like to hide it there as well. Any idea how to do that?
__________________
Business 5.2.13
Reply With Quote
  #9  
Old 03-11-2016, 04:22 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Hiding product weights and inventory quantities

Idk what to tell you, I just upgraded the site and mine is working fine.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #10  
Old 03-12-2016, 02:44 AM
 
Oren Oren is offline
 

Advanced Member
  
Join Date: Sep 2015
Posts: 30
 

Default Re: Hiding product weights and inventory quantities

It works now. Not sure what was the problem. But the shopping cart still shows weight. How do I hide it from there as well?
__________________
Business 5.2.13
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 08:21 PM.

   

 
X-Cart forums © 2001-2020