A
A
Ali Ali2020-05-03 16:41:48
opencart
Ali Ali, 2020-05-03 16:41:48

Displaying information about the weight of the goods opencart 2x?

Displaying information about the weight of the goods opencart 2x
Warning: A non-numeric value encountered in /public_html/system/storage/modification/admin/controller/sale/order.php on line 2038

'weight'   => $this->weight->format(($product_info['weight'] + $option_weight) * $product['quantity'], $product_info['weight_class_id'], $this->language->get('decimal_point'), $this->language->get('thousand_point'))

5eaecb51e1b9c236663770.png
How to fix?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lazuren, 2020-05-05
@lazuren

Try to "hard" cast to the desired type (float)$option_weight

'weight'   => $this->weight->format(($product_info['weight'] + (float)$option_weight) * $product['quantity'], $product_info['weight_class_id'], $this->language->get('decimal_point'), $this->language->get('thousand_point'))

A
Ali Ali, 2020-05-07
@Ali_1

Thanks to everyone, the problem was that the version of PHP 5.6 was earlier, I changed the version to PHP 7.x on the server, because of this there were a lot of problems, and I returned it back to PHP 5.6 and it all worked)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question