Post by stef83136 » Thu Mar 07, 2019 10:03 pm

Hello, our site runs under Opencart 2.3.0.2, we have just switched to PHP 7.2 / mariaDB

Everything is fine except that since we migrated to PHP 7.2 for printing the delivery list for which we have this error:

2019-03-07 13:02:30 - PHP Warning: A non-numeric value encountered in /home/mest8941/public_html/vqmod/vqcache/vq2-system_storage_modification_admin_controller_sale_order.php on line 3641

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

How to correct this?

Thanks for your help.

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by kestas » Thu Mar 07, 2019 10:20 pm

stef83136 wrote:
Thu Mar 07, 2019 10:03 pm
Hello, our site runs under Opencart 2.3.0.2, we have just switched to PHP 7.2 / mariaDB

Everything is fine except that since we migrated to PHP 7.2 for printing the delivery list for which we have this error:

2019-03-07 13:02:30 - PHP Warning: A non-numeric value encountered in /home/mest8941/public_html/vqmod/vqcache/vq2-system_storage_modification_admin_controller_sale_order.php on line 3641

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

How to correct this?

Thanks for your help.
try to use float function.

Code: Select all

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

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by stef83136 » Thu Mar 07, 2019 10:27 pm

Thank you kestas for your help.

In which file? Admin/controller/Sale/Order.php ?

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by stef83136 » Thu Mar 07, 2019 10:45 pm

I tried on Admin/controller/Sale/Order.php.

Always the error.

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by xxvirusxx » Thu Mar 07, 2019 11:11 pm

Try this

Code: Select all

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

My Extensions | OC 3.0.3.1, 3.0.2.0, 2.3.0.2 with bugs fixed.


Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm

Post by stef83136 » Thu Mar 07, 2019 11:16 pm

Thanks xxvirusxx.

It's OK Now. :-)

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by stef83136 » Mon Mar 11, 2019 4:27 pm

Hello, new error but more on the same file.

Thanks for your advices.

Code: Select all

2019-03-11 8:10:52 - PHP Warning:  A non-numeric value encountered in /home/xxxxx/public_html/system/storage/modification/catalog/controller/product/category.php on line 177
2019-03-11 8:10:53 - PHP Warning:  A non-numeric value encountered in /home/xxxxx/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-11 8:10:53 - PHP Warning:  A non-numeric value encountered in /home/xxxxx/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-11 8:10:53 - PHP Warning:  A non-numeric value encountered in /home/xxxxx/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-11 8:10:53 - PHP Warning:  A non-numeric value encountered in /home/xxxxx/public_html/system/storage/modification/catalog/controller/product/category.php on line 388
2019-03-11 8:10:53 - PHP Warning:  A non-numeric value encountered in /home/xxxxx/public_html/system/storage/modification/catalog/controller/product/category.php on line 392

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by kestas » Mon Mar 11, 2019 4:41 pm

Because error in files which are in modification folder, there can be some module installed, which can cause your errors. Nobody can check this errors, because nobody knows which extensions you have installed.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by xxvirusxx » Mon Mar 11, 2019 5:25 pm

lol @kestas....

Is the "bug" with PHP7...

@stef83136

You need to changes from all files inside of catalog/controller/product where you find

this line

Code: Select all

$page = $this->request->get['page'];
to

Code: Select all

$page = (int)$this->request->get['page'];
Then you can apply @straightlight fix from here
viewtopic.php?f=24&t=210459#p748892

After that, clear VQMOD cache, refresh ocmod.

My Extensions | OC 3.0.3.1, 3.0.2.0, 2.3.0.2 with bugs fixed.


Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm

Post by kestas » Mon Mar 11, 2019 5:47 pm

xxvirusxx wrote:
Mon Mar 11, 2019 5:25 pm
lol @kestas....

Is the "bug" with PHP7...

@stef83136

You need to changes from all files inside of catalog/controller/product where you find

this line

Code: Select all

$page = $this->request->get['page'];
to

Code: Select all

$page = (int)$this->request->get['page'];
Then you can apply @straightlight fix from here
viewtopic.php?f=24&t=210459#p748892

After that, clear VQMOD cache, refresh ocmod.
LOL... I hope you're right and there just only this. But do you really know code under this numbers of the line, in mentioned errors... I mean when somebody posting his issues, it should provide more info... ;)

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by xxvirusxx » Mon Mar 11, 2019 5:50 pm

And this :)
https://www.opencart.com/index.php?rout ... n_id=35487

He provided information...

Code: Select all

Hello, our site runs under Opencart 2.3.0.2, we have just switched to PHP 7.2 / mariaDB
Same on 3.0.2.0
viewtopic.php?f=202&t=209908

My Extensions | OC 3.0.3.1, 3.0.2.0, 2.3.0.2 with bugs fixed.


Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm

Post by stef83136 » Tue Mar 12, 2019 1:31 am

Thank you. I'm going to try.

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by stef83136 » Thu Mar 14, 2019 1:21 am

xxvirusxx wrote:
Mon Mar 11, 2019 5:50 pm
And this :)
https://www.opencart.com/index.php?rout ... n_id=35487

He provided information...

Code: Select all

Hello, our site runs under Opencart 2.3.0.2, we have just switched to PHP 7.2 / mariaDB
Same on 3.0.2.0
viewtopic.php?f=202&t=209908
xxvirusxx I used the recommended module but I still have the errors.

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by straightlight » Thu Mar 14, 2019 4:56 am

stef83136 wrote:
Thu Mar 14, 2019 1:21 am
xxvirusxx wrote:
Mon Mar 11, 2019 5:50 pm
And this :)
https://www.opencart.com/index.php?rout ... n_id=35487

He provided information...

Code: Select all

Hello, our site runs under Opencart 2.3.0.2, we have just switched to PHP 7.2 / mariaDB
Same on 3.0.2.0
viewtopic.php?f=202&t=209908
xxvirusxx I used the recommended module but I still have the errors.
Which one are you referring to and what are the errors? More info needed. Forum rules.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by stef83136 » Sun Mar 17, 2019 11:00 pm

straightlight, the same object errors of my post.

Code: Select all

2019-03-16 11:00:04 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 177
2019-03-16 11:00:04 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-16 11:00:04 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-16 11:00:04 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-16 11:00:04 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 388
2019-03-16 11:00:04 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 392
2019-03-17 1:46:16 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 177
2019-03-17 1:46:16 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-17 1:46:16 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-17 1:46:16 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-17 1:46:16 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 388
2019-03-17 1:46:16 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 392
2019-03-17 1:46:18 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 177
2019-03-17 1:46:18 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-17 1:46:18 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-17 1:46:18 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 380
2019-03-17 1:46:18 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 388
2019-03-17 1:46:18 - PHP Warning:  A non-numeric value encountered in /home/mest8941/public_html/system/storage/modification/catalog/controller/product/category.php on line 392

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by straightlight » Sun Mar 17, 2019 11:02 pm

Have you also tried this solution: viewtopic.php?f=202&t=209908 despite if it's for v3.x releases since you are using v2.3.0.2 release of OC?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by stef83136 » Thu May 02, 2019 7:58 pm

Hi everyone.

I managed with all your advice that I followed to solve a good part of the problems related to PHP7.2

I use the Uber Options (Q) module.

In fact I have 1 left, when I want to edit / print shipping list. In this case I have this type of error again:

Code: Select all

Warning: A non-numeric value encountered in /home/mest8941/public_html/vqmod/vqcache/vq2-system_storage_modification_admin_controller_sale_order.php on line 3386Warning: A non-numeric value encountered in / home / mest8941 / public_html / vqmod / vqcache / vq2-system_storage_modification_admin_controller_sale_order .php on line 3386

This error only appears when I have a product with an option
The new SKU of the option did not take into account in the PDF
The consequence is that this error appears on the generated PDF

Have I forgotten a file in which I must replace by:

Code: Select all

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

Thank you for your new help.
Last edited by stef83136 on Thu May 02, 2019 8:54 pm, edited 2 times in total.

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by straightlight » Thu May 02, 2019 8:05 pm

'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'))?
Ending by a question mark will lead to an error message from the array.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by stef83136 » Thu May 02, 2019 8:07 pm

No it's me who added the? in my question on the forum since it was a question :-) but in the script there is no?

Aquamagasin votre spécialiste du Traitement d'eau et des Adoucisseurs d'eau


Active Member

Posts

Joined
Tue Dec 09, 2014 3:29 am

Post by straightlight » Thu May 02, 2019 8:28 pm

stef83136 wrote:
Thu May 02, 2019 8:07 pm
No it's me who added the? in my question on the forum since it was a question :-) but in the script there is no?
Then, please set the code between code tags [ code ] and [ /code ] (without spaces when using tags). Then, add your question mark after the [ / code ] tag. Otherwise, it's confusing.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 38 guests