Skip to content

Commit 43e5596

Browse files
RaghavendraTirumalasettiManjusha.S
authored andcommitted
BUG#AC-2242:Error:Cart Price rule forces Free Shipping to "No" even if "-- Please Select --" was saved
1 parent 7c49551 commit 43e5596

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/code/Magento/OfflineShipping/etc/db_schema.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
</constraint>
3939
</table>
4040
<table name="salesrule" resource="default" comment="Salesrule">
41-
<column xsi:type="smallint" name="simple_free_shipping" unsigned="true" nullable="true"
42-
identity="false" default="0" comment="Simple Free Shipping"/>
41+
<column xsi:type="varchar" name="simple_free_shipping" unsigned="true" nullable="true"
42+
identity="false" default="NULL" comment="Simple Free Shipping"/>
4343
</table>
4444
<table name="sales_order_item" resource="sales" comment="Sales Flat Order Item">
4545
<column xsi:type="smallint" name="free_shipping" unsigned="true" nullable="false" identity="false"

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,8 @@ public function __construct(
6363
public function execute()
6464
{
6565
$data = $this->getRequest()->getPostValue();
66-
if ($data['simple_free_shipping']==="") {
67-
$data['simple_free_shipping']=null;
68-
}
6966
if ($data) {
67+
if ($data['simple_free_shipping'] === '') { $data['simple_free_shipping'] = null; }
7068
try {
7169
/** @var $model \Magento\SalesRule\Model\Rule */
7270
$model = $this->_objectManager->create(\Magento\SalesRule\Model\Rule::class);

0 commit comments

Comments
 (0)