Skip to content

Commit

Permalink
Fix admin price not saving
Browse files Browse the repository at this point in the history
  • Loading branch information
srenon committed Jul 19, 2018
1 parent e863e3e commit 367f0c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Plugin/Quote/Address/Total/ShippingPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function getCustomShippingJsonToArray($json)

$jsonToArray = (array)json_decode($json, true);

if (!$json || count($jsonToArray) != 3) {
if (!$json || count($jsonToArray) != 4) {
$json = $this->getQuote()->getCustomShippingRateJson();

if ($json) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"magento 2 free shipping extension"
],
"type": "magento2-module",
"version": "1.4.1",
"version": "1.4.2",
"license": [
"proprietary"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,11 @@ require(['prototype'], function(){
<script type="text/javascript">
function getCustomShippingCost(){
var rate = $('custom-shipment-rate').value;
var code = $('custom-shipment-title')[$('custom-shipment-title').selectedIndex].value;
var type = $('custom-shipment-title')[$('custom-shipment-title').selectedIndex].value;
var code = 'customshippingrate_' + type;
var desc = '';

var val = '{"rate" : "' + rate + '", "code" : "customshippingrate_' + code + '", "type" : "' + code + '"}';
var val = '{"rate" : "' + rate + '", "code" : "' + code + '", "type" : "' + type + '", "description" : "' + desc + '"}';

return val;
}
Expand Down

0 comments on commit 367f0c8

Please sign in to comment.