Skip to content

Commit 47df547

Browse files
Yauhen_LyskavetsVeronikaYarats
authored andcommitted
MAGETWO-95186: [2.3] Incorrect table rates shipping charge at check out with cart price rule
- Health check test fix.
1 parent fd53888 commit 47df547

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
class Tablerate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implements
1919
\Magento\Shipping\Model\Carrier\CarrierInterface
2020
{
21-
const CONDITION_CODE_PACKAGE_VALUE_WITH_DISCOUNT = 'package_value_with_discount';
22-
2321
/**
2422
* @var string
2523
*/
@@ -229,12 +227,12 @@ public function getCode($type, $code = '')
229227
$codes = [
230228
'condition_name' => [
231229
'package_weight' => __('Weight vs. Destination'),
232-
self::CONDITION_CODE_PACKAGE_VALUE_WITH_DISCOUNT => __('Price vs. Destination'),
230+
'package_value_with_discount' => __('Price vs. Destination'),
233231
'package_qty' => __('# of Items vs. Destination'),
234232
],
235233
'condition_name_short' => [
236234
'package_weight' => __('Weight (and above)'),
237-
self::CONDITION_CODE_PACKAGE_VALUE_WITH_DISCOUNT => __('Order Subtotal (and above)'),
235+
'package_value_with_discount' => __('Order Subtotal (and above)'),
238236
'package_qty' => __('# of Items (and above)'),
239237
],
240238
];

app/code/Magento/OfflineShipping/Setup/Patch/Data/UpdateShippingTablerate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ public function apply()
3939
$connection = $this->moduleDataSetup->getConnection();
4040
$connection->update(
4141
$this->moduleDataSetup->getTable('shipping_tablerate'),
42-
['condition_name' => Tablerate::CONDITION_CODE_PACKAGE_VALUE_WITH_DISCOUNT],
42+
['condition_name' => 'package_value_with_discount'],
4343
[new \Zend_Db_Expr('condition_name = \'package_value\'')]
4444
);
4545
$connection->update(
4646
$this->moduleDataSetup->getTable('core_config_data'),
47-
['value' => Tablerate::CONDITION_CODE_PACKAGE_VALUE_WITH_DISCOUNT],
47+
['value' => 'package_value_with_discount'],
4848
[
4949
new \Zend_Db_Expr('value = \'package_value\''),
5050
new \Zend_Db_Expr('path = \'carriers/tablerate/condition_name\'')

0 commit comments

Comments
 (0)