Open
Description
Preconditions (*)
- Magento 2.4-develop
- Magento 2.3.5-p1 Installation
- Valid Coupon with a Description
Steps to reproduce (*)
- Create valid Coupon with Description Populated (fill the description with say 200 characters for emphasised issue)
- Create an Order using said Coupon
- View Order in CMS at Discount Line (discount line description has changed from hisitoric orders, to be the coupon description)
- Generate Invoice (Invoice discouunt line has also changed)
- Print PDF (Discount line does not show Coupon Code anymore, but the description)
Expected result (*)
- Coupon Code to be shown in Description on Order, Invoice and Invoice PDF
Actual result (*)
- Coupon Code is missing from Order, Invoice and Invoice PDF as Discount Description column is now being populated with the description field and not the invoice when Description is populated.
Note: If the coupon is without a description then the coupon code is displayed
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Activity
m2-assistant commentedon May 29, 2020
Hi @kdjmonaghan. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x releaseFor more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue:
@magento I am working on this
kdjmonaghan commentedon May 29, 2020
For users who seek a fix until Magento either make an option for this in an update, or, make a merge request for this;
Your
discount_description
field is being populated with the Coupon's description now where as previously in older versions of Magento it was usingcoupon_code
and never actually checked for the presence of the Coupon's description to populate this field.In recent builds of Magento, Magento have 'fixed' this issue (causing your legacy orders invoices contents data to not match the expected result of new orders, where your legacy orders were 'correct' before) - this results in the coupon code used not being present anywhere to the normal Admin user who does not know how to look up the Coupon Code used within the Order, easily.
The following file is the issue within Vendor:
Look for the
addDiscountDescription
method and you will see there is a new condition added for setting the Coupon Code Description to the$label
variable after the getCouponCode check.Previously this method,
addDiscountDescription
looked like this, and you're going to have to replace it via an Extension or Plugin to get it to work as it did before. Comparing the below to what's in this file now will show you the change:You're going to have to either make a Plugin or extend this module and replace this method within the class to have the original functionality work as the way it did in previous releases of Magento 2.
Your invoices templates, by default, aren't expecting, or formatted, to handle a long description that you can enter into the Discount Description field. This may have been patched as a 'long term bug' (it probably was intended to work like this) but can cause frustration for those expeccting the base functionality to work as it has in previous iterations.
[-]Magento 2.3.5 - Discount Description, Coupon Codes on Invoices Broken[/-][+]Magento 2.3.5-p1 - Discount Description, Coupon Codes on Invoices Broken[/+]m2-assistant commentedon May 30, 2020
Hi @krishprakash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇
1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears.2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself.3. Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.- If the issue is reproducible on
2.4-develop
branch, please, add the labelReproduced on 2.4.x
.- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
5. Add label
Issue: Confirmed
once verification is complete.6. Make sure that automatic system confirms that report has been added to the backlog.
krishprakash commentedon May 30, 2020
@magento give me 2.4-develop instance
magento-engcom-team commentedon May 30, 2020
Hi @krishprakash. Thank you for your request. I'm working on Magento 2.4-develop instance for you
magento-engcom-team commentedon May 30, 2020
Hi @krishprakash, here is your Magento instance.
Admin access: https://i-28432-2-4-develop.instances.magento-community.engineering/admin_043f
Login:
4087a0e1
Password:86b17b7cf138
Instance will be terminated in up to 3 hours.
49 remaining items
engcom-Bravo commentedon May 22, 2024
HI @kdjmonaghan,
Thanks for your reporting and collaboration.
We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.
Coupon Code is missing from Order, Invoice and Invoice PDF as Discount Description column is now being populated with the description field and not the invoice when Description is populated.
Hence Confirming the issue.
Thanks.
github-jira-sync-bot commentedon May 22, 2024
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11991 is successfully created for this GitHub issue.
m2-assistant commentedon May 22, 2024
✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.