-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Magento 2.3.5-p1 - Discount Description, Coupon Codes on Invoices Broken #28432
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
Comments
Hi @kdjmonaghan. Thank you for your report.
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:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
|
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 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 Previously this method, public function addDiscountDescription($address, $rule)
{
$description = $address->getDiscountDescriptionArray();
$ruleLabel = $rule->getStoreLabel($address->getQuote()->getStore());
$label = '';
if ($ruleLabel) {
$label = $ruleLabel;
} else {
if (strlen($address->getCouponCode())) {
$label = $address->getCouponCode();
}
}
if (strlen($label)) {
$description[$rule->getId()] = $label;
}
$address->setDiscountDescriptionArray($description);
return $this;
} 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. |
Hi @krishprakash. Thank you for working on this issue.
|
@magento give me 2.4-develop instance |
Hi @krishprakash. Thank you for your request. I'm working on Magento 2.4-develop instance for you |
Hi @krishprakash, here is your Magento instance. |
Hi @engcom-Alfa. Thank you for working on this issue.
|
Hi @engcom-Bravo. Thank you for working on this issue.
|
@magento give me 2.4-develop instance |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://7353e34217821129194bf61186089f6e.instances-prod.magento-community.engineering |
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. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11991 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue. |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
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.
The text was updated successfully, but these errors were encountered: