Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
8151b306
Commit
8151b306
authored
Feb 16, 2023
by
dhn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物流展示规则修改
parent
cc9e5401
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
49 deletions
+7
-49
app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rate-processor/new-address.js
+1
-15
app/code/Rokanthemes/OnePageCheckout/view/frontend/web/js/action/update-item.js
+5
-19
app/code/Rokanthemes/OnePageCheckout/view/frontend/web/js/model/shipping-rate-processor/new-address.js
+1
-15
No files found.
app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rate-processor/new-address.js
View file @
8151b306
...
...
@@ -56,21 +56,7 @@ define([
serviceUrl
,
payload
,
false
).
done
(
function
(
result
)
{
var
new_sh
=
[];
if
(
result
.
length
>
1
)
{
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
if
(
result
[
i
].
amount
==
0
)
{
new_sh
.
push
(
result
[
i
]);
}
}
}
else
if
(
result
.
length
===
1
)
{
new_sh
.
push
(
result
[
0
]);
}
new_sh
.
push
(
result
[
0
]);
rateRegistry
.
set
(
address
.
getCacheKey
(),
result
);
shippingService
.
setShippingRates
(
new_sh
);
}).
fail
(
function
(
response
)
{
...
...
app/code/Rokanthemes/OnePageCheckout/view/frontend/web/js/action/update-item.js
View file @
8151b306
...
...
@@ -71,26 +71,12 @@ define([
paymentServiceDefault
.
setPaymentMethods
(
methodConverter
(
response
.
payment_methods
));
var
sh
=
response
.
shipping_methods
;
var
new_sh
=
[];
if
(
sh
.
length
>
1
)
{
for
(
var
i
=
0
;
i
<
sh
.
length
;
i
++
)
{
if
(
sh
[
i
].
amount
==
0
)
{
selectShippingMethodAction
(
sh
[
i
]);
checkoutData
.
setSelectedShippingRate
(
sh
[
i
][
'carrier_code'
]
+
'_'
+
sh
[
i
][
'method_code'
]);
quote
.
shippingMethod
(
sh
[
i
]);
new_sh
.
push
(
sh
[
i
]);
}
}
}
else
if
(
sh
.
length
===
1
)
{
selectShippingMethodAction
(
sh
[
0
]);
quote
.
shippingMethod
(
sh
[
0
]);
new_sh
.
push
(
sh
[
0
]);
}
selectShippingMethodAction
(
sh
[
0
]);
checkoutData
.
setSelectedShippingRate
(
sh
[
0
][
'carrier_code'
]
+
'_'
+
sh
[
0
][
'method_code'
]);
quote
.
shippingMethod
(
sh
[
0
]);
new_sh
.
push
(
sh
[
0
]);
shippingService
.
setShippingRates
(
new_sh
);
updateItemService
.
hasUpdateResult
(
false
);
response
.
totals
.
coupon_code
?
paymentService
.
isAppliedCoupon
(
true
)
:
paymentService
.
isAppliedCoupon
(
false
);
...
...
app/code/Rokanthemes/OnePageCheckout/view/frontend/web/js/model/shipping-rate-processor/new-address.js
View file @
8151b306
...
...
@@ -40,21 +40,7 @@ define([
serviceUrl
,
payload
,
false
).
done
(
function
(
result
)
{
var
new_sh
=
[];
if
(
result
.
length
>
1
)
{
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
if
(
result
[
i
].
amount
==
0
)
{
new_sh
.
push
(
result
[
i
]);
}
}
}
else
if
(
result
.
length
===
1
)
{
new_sh
.
push
(
result
[
0
]);
}
new_sh
.
push
(
result
[
0
]);
rateRegistry
.
set
(
address
.
getCacheKey
(),
result
);
shippingService
.
setShippingRates
(
new_sh
);
}).
fail
(
function
(
response
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment