Page 1 of 1

Hide weight for zero amounth

Posted: Thu Jun 06, 2019 10:49 pm
by skip
Hi , how to hide weight amounth if cart iz "0 kg" on checkout
UK Shipping (Weight: 0.00kg) - $0.00
how to hide "(Weight: 0.00kg)" from this line for weight=0
catalog/model/shipping/weight.php define this line

Code: Select all

'title'        => $result['name'] . '  (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class_id')) . ')',

Re: Hide weight for zero amounth

Posted: Fri Jun 07, 2019 1:44 am
by uksitebuilder

Code: Select all

'title'        => $result['name'] . ($weight > 0 ? '  (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class_id')) . ')' : ''),

Re: Hide weight for zero amounth

Posted: Fri Jun 07, 2019 3:39 am
by skip
@uksitebuilder Thank You very much -it works!