Post by Tom Cat » Tue Mar 02, 2021 5:10 pm

Opencart Version 3.0.3.7
The order numbers are numbered correctly, but when generating invoices for printing the invoice numbers are showing as "#%s", instead of the order number. This numbering is at the top left of the invoice. This happens whether printing single or multiple invoices for printing.

Also when multiple invoices are generated the order webpage also turns into print format and you must 'page back' to the Orders list to view them. This page also shows as symbols instead of order numbers. (When using Chrome, in Safari it stays as Order list)

Any ideas please?

The only OC error reported is this from another of my posts, which I cannot correct.

2021-03-01 22:36:15 - PHP Warning: Division by zero in /home/customer/www/kenwoodchefrestore.co.uk/public_html/shop/catalog/controller/product/manufacturer.php on line 311

New member

Posts

Joined
Thu Mar 08, 2012 4:24 am

Post by straightlight » Tue Mar 02, 2021 8:23 pm

What is on line 311 of your file?

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 Tom Cat » Tue Mar 02, 2021 10:55 pm

straightlight wrote:
Tue Mar 02, 2021 8:23 pm
What is on line 311 of your file?
311
$data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit), $product_total, ceil($product_total / $limit));

New member

Posts

Joined
Thu Mar 08, 2012 4:24 am

Post by straightlight » Tue Mar 02, 2021 11:05 pm

:ponder:

A clue ...

In catalog/controller/account/order.php file, find:

Code: Select all

$this->document->setTitle($this->language->get('text_order'));
replace with:

Code: Select all

$this->document->setTitle(sprintf($this->language->get('text_order'), $order_id));
Then, find:

Code: Select all

'text' => $this->language->get('text_order'),
replace with:

Code: Select all

'text' => sprintf($this->language->get('text_order'), $order_id),
This should resolved the issue.

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 Mar 02, 2021 11:08 pm

The master branch seem to no longer have this #%s symbol with the text_order language key, however, which means this issue has already been 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 Mar 03, 2021 12:26 am

Also fixed on the maintenance branch already. Which means, the v3.0.3.7 is an unfollowed distribution regarding that fix.

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 Tom Cat » Tue Mar 09, 2021 6:38 pm

straightlight wrote:
Tue Mar 02, 2021 11:05 pm
:ponder:

A clue ...

In catalog/controller/account/order.php file, find:

Code: Select all

$this->document->setTitle($this->language->get('text_order'));
replace with:

Code: Select all

$this->document->setTitle(sprintf($this->language->get('text_order'), $order_id));
Then, find:

Code: Select all

'text' => $this->language->get('text_order'),
replace with:

Code: Select all

'text' => sprintf($this->language->get('text_order'), $order_id),
This should resolved the issue.

Unfortunately I still get the error:

2021-03-09 9:15:35 - PHP Warning: Division by zero in /home/customer/www/kenwoodchefrestore.co.uk/public_html/shop/catalog/controller/product/manufacturer.php on line 311

Any other files to check / amend?

New member

Posts

Joined
Thu Mar 08, 2012 4:24 am

Post by straightlight » Tue Mar 09, 2021 9:19 pm

Issue already fixed on the master branch and on the maintenance 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 Tom Cat » Wed Mar 10, 2021 8:32 pm

straightlight wrote:
Tue Mar 09, 2021 9:19 pm
Issue already fixed on the master branch and on the maintenance branch.
Apologies, never used github before.
These are the relevant changes I must make to my install?
https://github.com/opencart/opencart/co ... 9795035222

Are these 6x changes relevant to my install: Version 3.0.3.7
https://github.com/opencart/opencart/co ... b2e0372a4f

Thank you.

New member

Posts

Joined
Thu Mar 08, 2012 4:24 am

User avatar
Expert Member

Posts

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

Post by Tom Cat » Thu Mar 11, 2021 2:34 am

xxvirusxx wrote:
Wed Mar 10, 2021 10:51 pm
This branch...
https://github.com/opencart/opencart/tr ... intenance/
So would to keep my Open cart up to date and resolve any issues, I would update files from here.

Upload - resolved language issue - its just that it is 75 changes to make.
Can you confirm these changes will fix my issue of the Order numbering?

Thanks

New member

Posts

Joined
Thu Mar 08, 2012 4:24 am
Who is online

Users browsing this forum: No registered users and 11 guests