Skip to content

Commit 250e915

Browse files
MC-42288: Coupon codes for existing cart price rule are not generated
- Change error message
1 parent ad5acd1 commit 250e915

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Generate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function execute()
8383
} elseif ((int) $rule->getCouponType() !== \Magento\SalesRule\Model\Rule::COUPON_TYPE_AUTO
8484
&& !$rule->getUseAutoGeneration()) {
8585
$result['error'] =
86-
__('Rule is not saved with auto generate option enabled. Please save the rule and try again.');
86+
__('The rule coupon settings changed. Please save the rule before using auto-generation.');
8787
} else {
8888
try {
8989
$data = $this->getRequest()->getParams();

app/code/Magento/SalesRule/Test/Mftf/Test/AdminBlockCouponGeneratesUntilCartPriceRuleSavedWithSpecificCouponTypeAndAutoGenerationTickedTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
stepKey="clickManageCouponCodes"/>
5252
<fillField selector="{{AdminCartPriceRulesFormSection.couponQty}}" userInput="1" stepKey="fillFieldCouponQty"/>
5353
<click selector="{{AdminCartPriceRulesFormSection.generateCouponsButton}}" stepKey="clickGenerateCoupon"/>
54-
<see selector="{{AdminCartPriceRulesFormSection.modalMessage}}" userInput="Rule is not saved with auto generate option enabled. Please save the rule and try again."
54+
<see selector="{{AdminCartPriceRulesFormSection.modalMessage}}" userInput="The rule coupon settings changed. Please save the rule before using auto-generation."
5555
stepKey="seeModalMessage"/>
5656
</test>
5757
</tests>

app/code/Magento/SalesRule/Test/Unit/Controller/Adminhtml/Promo/Quote/GenerateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public function testExecuteWithCouponTypeNotAutoAndAutoGenerationNotEnabled()
319319
->method('jsonEncode')
320320
->with([
321321
'error' =>
322-
__('Rule is not saved with auto generate option enabled. Please save the rule and try again.')
322+
__('The rule coupon settings changed. Please save the rule before using auto-generation.')
323323
]);
324324
$this->model->execute();
325325
}

0 commit comments

Comments
 (0)