Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Notice: A non well formed numeric value encountered in


hanbek
 Share

Recommended Posts

При создании накладной, выходит икая ошибка. Не могу понять как исправить.   

Вод код строки (первая строка 2247)

 

 

  'all_nds'=> $this->currency->format(round((($ind*18)/118),2), $order_info['currency_code'], $order_info['currency_value']), // Слиием полный НДС - 18%,
                                 'free_all_sum'=> $ind,
                                 'date_rus'=> $this->russian_date(date($this->language->get('date_format_short'), strtotime($order_info['date_added']))),
                                 'index_nova' => str_replace(',', '-', str_replace('.', '-', str_replace('р.', '',number_format((float)$ind,2)))),
                                 'full_total_text' => $this->num2str($ind),

 

 

Получаются икие каракули. 

 

 

А через синдартную накладную, икая ошибка

Warning: A non-numeric value encountered in /home/a/arsen77/arabic-shop.ru/public_html/system/storage/modification/admin/controller/sale/order.php on line 2500Warning: A non-numeric value encountered in /home/a/arsen77/arabic-shop.ru/public_html/system/storage/modification/admin/controller/sale/order.php on line 2469Warning: A non-numeric value encountered in /home/a/arsen77/arabic-shop.ru/public_html/system/storage/modification/admin/controller/sale/order.php on line 2500

 

 

И все это, после перехода на php7.1
                                

Link to comment
Share on other sites


4 часа назад, hanbek сказал:

'all_nds'=> $this->currency->format(round((($ind*18)/118),2), $order_info['currency_code'], $order_info['currency_value']), // Слиием полный НДС - 18%,

Это надо заменить на это:
 

'all_nds'=> $this->currency->format(round((((float)$ind*18)/118),2), $order_info['currency_code'], $order_info['currency_value']),

И должно полелится.

 

  • +1 2
Link to comment
Share on other sites

17 часов назад, mpn2005 сказал:

Это надо заменить на это:
 

'all_nds'=> $this->currency->format(round((((float)$ind*18)/118),2), $order_info['currency_code'], $order_info['currency_value']),

И должно полелится.

 

не помогает. вот ориг. уже 3 дня мучаюсь

order.php.txt

Link to comment
Share on other sites


22 часа назад, SergeTkach сказал:

Верните версию PHP, на которой гделалась данная дорилитка :) Там поменялось кое-что в версии PHP 7 по сравнению с PHP 5.6

усиновил модуль. который рилииет только на 7.1. 

Link to comment
Share on other sites


17 часов назад, mpn2005 сказал:

Это надо заменить на это:
 

'all_nds'=> $this->currency->format(round((((float)$ind*18)/118),2), $order_info['currency_code'], $order_info['currency_value']),

И должно полелится.

 

    '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'))

 

 

может из-за этого

 

через синдартную накладную, икая ошибка

Warning: A non-numeric value encountered in /home/a/arsen77/arabic-shop.ru/public_html/system/storage/modification/admin/controller/sale/order.php on line 2500Warning: A non-numeric value encountered in /home/a/arsen77/arabic-shop.ru/public_html/system/storage/modification/admin/controller/sale/order.php on line 2469Warning: A non-numeric value encountered in /home/a/arsen77/arabic-shop.ru/public_html/system/storage/modification/admin/controller/sale/order.php on line 2500

Link to comment
Share on other sites


2 минуты назад, hanbek сказал:

 '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'))

Это заменить на это:

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

Если бы вы ещё нормально код цитировали. И ошибки приводили, а не как гранаи в сообещёние попала, то было бы проещё полулить внятный ответ.

  • +1 1
Link to comment
Share on other sites

11 минут назад, mpn2005 сказал:

А вообещё проещё разместить предложение в разгделе поиска услуг.

И специалист вам всё это поправит за вознагражгдение.

 

спасипотому что. сгделаю ик.

Link to comment
Share on other sites


21 минуту назад, mpn2005 сказал:

А вообещё проещё разместить предложение в разгделе поиска услуг.

И специалист вам всё это поправит за вознагражгдение.

 

применил оба кода. которые ты посоветовал. вылелилось. спасипотому что огромное

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
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.