Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Order - if multiple orders are printed at once the order numbers are all the same #10197

Closed
Mios-1000 opened this issue Sep 6, 2021 · 7 comments
Labels
3.0.x.x Affects the 3.0.x.x maintenance version

Comments

@Mios-1000
Copy link

I have tested this on a fresh install of both 3.0.3.7 and also 3.0.3.8 and if multiple orders are selected in the 'Order' page and then the 'Print Invoice' button is clicked, all of the orders in the resulting window are correct apart from the actual order number on each individual order are all the same.
This only seems to effect the later OC versions as I have tested on earlier versions which work correctly.

@WebkulOpencart WebkulOpencart added the 3.0.x.x Affects the 3.0.x.x maintenance version label Sep 7, 2021
mathsolutions added a commit to mathsolutions/opencart that referenced this issue Sep 7, 2021
Fix for bug: Print Order - if multiple orders are printed at once the order numbers are all the same opencart#10197
@mathsolutions
Copy link

Hi, I've proposed a fix #10201

@ADDCreative
Copy link
Contributor

Also need to remove the following.

$data['text_order'] = sprintf($this->language->get('text_order'), $order_id);

mathsolutions added a commit to mathsolutions/opencart that referenced this issue Sep 7, 2021
Print Order - if multiple orders are printed at once the order numbers are all the same opencart#10197 more fixes
mathsolutions added a commit to mathsolutions/opencart that referenced this issue Sep 7, 2021
Fix for bug: Print Order - if multiple orders are printed at once the order numbers are all the same opencart#10197 complete solution
mathsolutions added a commit to mathsolutions/opencart that referenced this issue Sep 7, 2021
Fix for bug: Print Order - if multiple orders are printed at once the order numbers are all the same opencart#10197 complete solution
@mathsolutions
Copy link

@ADDCreative , you are right
I've modified the pull request, removing the line in the controller and correcting the language file also

@prabhat-webkul
Copy link
Contributor

@ADDCreative , you are right
I've modified the pull request, removing the line in the controller and correcting the language file also

@mathsolutions
text_order is also being used on other pages like order info, etc
it's better to keep this key's value the same in the language file and modify only the invoice page

send each "text_order" value in the array and just add order.text_order in the twig. apply changes on the PR #10203

Controller
Line 1521 $text_order = sprintf($this->language->get('text_order'), $order_id);
Line 1677 'text_order' => $text_order,

Twig
order.text_order instead of text_order

@mathsolutions
Copy link

@prabhatkumaroc082,
yes it's better. I've changed PR #10203

WebkulOpencart added a commit that referenced this issue Sep 13, 2021
Fix for bug #10197 in maintenance branch v2
@ActorMike
Copy link

ActorMike commented Mar 13, 2022

``I added this code below to my en-gb.php language files but when I bulk print it does not show any Order # text at the top, just the order number. The order number is correct now, but I cannot get it to add the word "Order" in front of the order number, did I miss something?

$_['text_invoice'] = 'Order';

I guess for now I will change the TWIG file to:
<h1>ORDER #{% if order.invoice_no %}{{ order.invoice_no }}{% else %}{{ order.order_id }}{% endif %}</h1>

@ADDCreative
Copy link
Contributor

You don't need to change the language files. Order is already there.

$_['text_order'] = 'Order (#%s)';

Used.

$text_order = sprintf($this->language->get('text_order'), $order_id);

Just need to make these changes.
https://github.com/opencart/opencart/pull/10203/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0.x.x Affects the 3.0.x.x maintenance version
Projects
None yet
Development

No branches or pull requests

6 participants