Post by sw!tch » Mon Jun 22, 2020 8:02 am

A non-numeric value encountered - From Voucher when a non-number is entered in amount..

Probably should patch this one since bots like to hit this form, not a huge issue, but it fills up error logs, etc.

Link to thread. - viewtopic.php?t=215547#p773734

Was able to replicate on v3.0.3.4 a few versions back, not sure if you patched this one.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by straightlight » Mon Jun 22, 2020 11:10 am

sw!tch wrote:
Mon Jun 22, 2020 8:02 am
A non-numeric value encountered - From Voucher when a non-number is entered in amount..

Probably should patch this one since bots like to hit this form, not a huge issue, but it fills up error logs, etc.

Link to thread. - viewtopic.php?t=215547#p773734

Was able to replicate on v3.0.3.4 a few versions back, not sure if you patched this one.
It was fixed based on the master branch but I think the solution we both worked on might be better as we already have the input from the OP of that topic indicating it did solved the issue. Let's see how it goes on this one.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Mon Jun 22, 2020 11:23 am

Package updated.

- Fixed catalog/controller/account/affiliate.php with custom fields.
- Fixed catalog/controller/account/forgotten.php
- Fixed catalog/controller/account/register.php
- Fixed catalog/controller/account/voucher.php as per post provided by sw!tch: viewtopic.php?f=201&t=218203&p=791513#p791499 .

- Fixed catalog/controller/account/wishlist.php
- Fixed catalog/controller/affiliate/register.php
- Fixed catalog/controller/checkout/payment_address.php
- Fixed catalog/controller/checkout/shipping_address.php
- Fixed catalog/controller/extension/module/banner.php with html_entity_decode on the $result['image'] . Not yet in master branch

- Fixed catalog/controller/tool/upload.php as per master branch
- Fixed admin/controller/tool/upload.php as per master branch
- Fixed catalog/controller/extension/module/bestseller.php with review_status config; not yet on master branch
- Fixed admin/controller/catalog/filter.php as per this commit: https://github.com/opencart/opencart/pull/8026
- Reverted to leafo vendor
- Replaced all JSON redirection / links with str_replace from & to '&' characters on the URL. Not yet on master branch

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Tue Jun 23, 2020 11:34 pm

Package updated

- Added more warnings in the OC admin as per this commit: https://github.com/opencart/opencart/pu ... d825dcf60b .

- Fixed admin/controller/report/statistics.php as per this commit: https://github.com/opencart/opencart/pu ... c28e6588ec

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Wed Jun 24, 2020 5:50 am

Package updated.

- Fixed wishlist conventional array names in catalog account/account and account/wishlist.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by xxvirusxx » Wed Jun 24, 2020 6:50 am

admin/controller/design/banner.php, change:

Code: Select all

if (is_file(DIR_IMAGE . $banner_image['image'])) {
to:

Code: Select all

if (is_file(DIR_IMAGE . html_entity_decode($banner_image['image'], ENT_QUOTES, 'UTF-8'))) {

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Wed Jun 24, 2020 10:10 am

xxvirusxx wrote:
Wed Jun 24, 2020 6:50 am
admin/controller/design/banner.php, change:

Code: Select all

if (is_file(DIR_IMAGE . $banner_image['image'])) {
to:

Code: Select all

if (is_file(DIR_IMAGE . html_entity_decode($banner_image['image'], ENT_QUOTES, 'UTF-8'))) {
Ok, fixed.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by xxvirusxx » Wed Jun 24, 2020 1:57 pm

Bank Transfer missing value: admin/controller/extension/payment/bank_transfer.php

Change:

Code: Select all

$data['payment_bank_transfer'] = array();
to

Code: Select all

$data['payment_bank_transfer_bank'] = array();
https://github.com/opencart/opencart/pull/7936/files

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Wed Jun 24, 2020 5:53 pm

xxvirusxx wrote:
Wed Jun 24, 2020 1:57 pm
Bank Transfer missing value: admin/controller/extension/payment/bank_transfer.php

Change:

Code: Select all

$data['payment_bank_transfer'] = array();
to

Code: Select all

$data['payment_bank_transfer_bank'] = array();
https://github.com/opencart/opencart/pull/7936/files
Fixed.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Wed Jun 24, 2020 7:04 pm

Package updated.

- Fixed admin banner image, bank transfer array and removed text_empty in account/wishlist.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Thu Jun 25, 2020 11:35 pm

Package updated.

- Fixed all html_entity_decode with image post, database insertions and database updates.
- Fixed reserved terms with database with escaped quotes such as type and description.
- Fixed voucher as per this commit: https://github.com/opencart/opencart/pull/8040 .

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Fri Jun 26, 2020 12:01 am

Package updated

- Completed description database fields with escaped quotes.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by xxvirusxx » Fri Jun 26, 2020 1:22 am

Language bug??

LE. You have updated Bootstrap? Because you use...

Code: Select all

<i class="fas fa-cog">
and

Code: Select all

<div class="float-right">
And same problem everywhere

Attachments

Screenshot_2020-06-25_20-24-10.png

Screenshot_2020-06-25_20-24-10.png (10.05 KiB) Viewed 13710 times

Screenshot_2020-06-25_20-21-33.png

Screenshot_2020-06-25_20-21-33.png (68.82 KiB) Viewed 13714 times


Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Fri Jun 26, 2020 1:54 am

Please provide the TWIG filenames!

Looked everywhere for fas and can't find any of it.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by xxvirusxx » Fri Jun 26, 2020 4:01 am

Is fking weird...

Now on Firefox I have this error..

Code: Select all

Parse error: syntax error, unexpected 'template' (T_STRING), expecting variable (T_VARIABLE) in catalog/controller/event/theme.php on line 3 
Downloaded: opencart-3.0.3.4-core-pre.zip

The function is:

Code: Select all

public function index($route, $args, &template) {

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Fri Jun 26, 2020 6:53 am

xxvirusxx wrote:
Fri Jun 26, 2020 4:01 am
Is fking weird...

Now on Firefox I have this error..

Code: Select all

Parse error: syntax error, unexpected 'template' (T_STRING), expecting variable (T_VARIABLE) in catalog/controller/event/theme.php on line 3 
Downloaded: opencart-3.0.3.4-core-pre.zip

The function is:

Code: Select all

public function index($route, $args, &template) {
Ok, fixed and package updated.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by xxvirusxx » Fri Jun 26, 2020 1:38 pm

Same issue.

Some text is missing. From Admin login page, Add to cart from catalog, some text from footer (informations)..etc

LE. catalog/controller/event/language.php

When you change from:

Code: Select all

public function index($route, $args) {
to:

Code: Select all

public function index(&$route, &$args) {
Catalog language issue is fixed.

Same for admin. admin/controller/event/language.php

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by ADD Creative » Fri Jun 26, 2020 10:11 pm

Missing Twig from composer.json. You need to correct that and then do a "composer update" to clean up the system/storage/vendor folder.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by head_dunce » Sat Jun 27, 2020 7:37 pm

Thank you straightlight

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm

Post by xxvirusxx » Sun Jun 28, 2020 2:42 pm

- admin/controller/customer/customer.php

Change this:

Code: Select all

'href' => $this->url->link('customer/customer/login', 'user_token=' . $this->session->data['user_token'] . '&customer_id=' . $result['customer_id'] . '&store_id=' . $result['store_id'], true)
To:

Code: Select all

'href' => $this->url->link('customer/customer/login', 'user_token=' . $this->session->data['user_token'] . '&customer_id=' . $result['customer_id'] . '&store_id=' . $store['store_id'], true)
https://github.com/opencart/opencart/bl ... r.php#L391

Same file. You forgot to change as Master :)

Code: Select all

$results = $this->model_customer_customer->getRewards($this->request->get['customer_id'], ($page - 1) * 10, 10);
to

Code: Select all

$results = $this->model_customer_customer->getRewards($customer_id, ($page - 1) * 10, 10);
- admin/model/localisation/location.php

Change this:

Code: Select all

$this->db->query("DELETE FROM " . DB_PREFIX . "location WHERE location_id = " . (int)$location_id);
To this:

Code: Select all

$this->db->query("DELETE FROM " . DB_PREFIX . "location WHERE location_id = '" . (int)$location_id . "'");
- /admin/view/template/marketing/marketing_form.twig

Change this:

Code: Select all

$('#input-code').on('keyup', function() {
To this:

Code: Select all

$('#input-code').on('keyup', function(e) {
Add this line after { % endif %} (on error_code)

Code: Select all

<small class="form-text text-muted">{{ help_code }}</small>
https://github.com/opencart/opencart/co ... 769ce6c400

- admin/controller/sale/voucher.php, delete line 640

Code: Select all

$this->load->model('sale/voucher_theme');
- catalog/controller/affiliate/register.php, missing brace after line 89 and hit Enter

- catalog/controller/extension/total, remove credit.php file, is a model not controller.

- why you have changed from:

Code: Select all

$json['redirect'] = str_replace('&amp;', '&', $this->url->link('checkout/cart', '', true));
to (line 155)

Code: Select all

$json['redirect'] = str_replace('&amp;', '&', $this->url->link('checkout/checkout', '', true));
https://github.com/opencart/opencart/bl ... t.php#L155

- /catalog/view/theme/default/template/checkout/register.twig

Change this: (line 322)

Code: Select all

{% if custom_field.type == 'time' %}
to this

Code: Select all

{% if custom_field.type == 'datetime' %}

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România
Who is online

Users browsing this forum: No registered users and 31 guests