Jump to content

Remove "weight" in order history details


Recommended Posts

In the order history /details, I'm trying to hide the "weight" from being shown (pic below) and I'm not sure of all I need to do beyond what I have. I know enough code to be dangerous and find/change a few things, see something done above so do it below, which is what I did and doesn't seem to be working this time.  

 

File changed:   ..PS dir/ classes/order/OrderCarrier.php

 

Original code:

'weight' =>                 array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),

 

Changed code:

'weight' =>                 array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedId', 'required' => true),

 

Could anyone tell me what I'm doing wrong?  Other files I need to change?

 

shipping.jpg

Link to comment
Share on other sites

You need to remove it from order-detail.tpl

The heading

 

<th data-hide="phone" class="item">{l s='Weight'}</th>

And content:

<td data-value="{if $line.weight > 0}{$line.weight|string_format:"%.3f"}{else}0{/if}">{if $line.weight > 0}{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}{else}-{/if}</td>

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...