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

IncrementId - order comment #47

Open
kasperth opened this issue May 25, 2022 · 0 comments
Open

IncrementId - order comment #47

kasperth opened this issue May 25, 2022 · 0 comments

Comments

@kasperth
Copy link

Preconditions

Module: bambora/module-payment-magento
Module Version: 2.3.4 (installed by composer)
Magento Version: Clean Magento 2.4.3-p1

Description

Bambora Online module provides the functionality for the payment. And it is working very well. I have checked by installing the module and configured as per it’s requirement and test it.

As I have noticed that Bambora added the comment with the text “The customer is notified of order # ” in the order when the payment made as shown in below image.
bambora-1

Here, Bambora uses the order id and it is set here when the payment was successful.
So, we are thinking that it should be a order increment id instead of the order id.

Because, in magento they use the order id as internal ID for the internal use. And order id is the primary key value of the ‘sales_flat_order’ table. And order increment id is the external ID used for the communication with customers.

In magento, order increment id is based on the ‘sequence_value’ of the 'sequence_{entity_type}_{store_id}' table. We are requesting to modify the code for showing the order id to order increment id. Because, if some how the order incement id was increase by some number then order increment id will start after the last sequence_value.

For example, if the last entry of the sequence_value in the sequence_{entity_type}_{store_id} is 2 then the next order's order ID will be 3 and order increment id will be 000000003. But, some how some one increase the sequence_value like 10 then the next order’s order id will be 4 and order increment id will be 0000000011.

So, in this kind of case with using the Bambora module, the comment which is added by the Bambora module on payment success will be like - “The customer is notified of order # 4”. But, the order increment id is #11. Due to this, the customer misunderstands these two things (Order ID at the comment and Order increment id of the order).

For overcoming this misunderstanding of the customers. We need to modify the code for changing the order id with the order increment id. We need to change in the below file-
vendor/bambora/module-payment-magento2/Controller/AbstractActionController.php
In this file, there is function sendOrderEmail() with the parameter $order. And in this function they are adding the status history comment at line number 424 and 428 by using the order id ($order->getId()) like below image.
bambora-2

So, instead of using the $order->getId() we should use $order->getIncrementId(). It should be look like as in below image.

bambora-3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant