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
aa675cdd
Commit
aa675cdd
authored
Apr 13, 2023
by
dhn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化购物车页面
parent
9b2d2284
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
279 additions
and
4 deletions
+279
-4
app/code/Joshine/Common/Lib/MobileDetect/MobileDetect.php
+0
-0
app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml
+40
-0
app/code/Magento/Checkout/view/frontend/templates/cart/item/renderer/actions/remove.phtml
+2
-2
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/coupon.phtml
+9
-0
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
+226
-0
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/renderer/actions/remove.phtml
+2
-2
No files found.
app/code/Joshine/Common/Lib/MobileDetect/MobileDetect.php
0 → 100644
View file @
aa675cdd
This diff is collapsed.
Click to expand it.
app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml
View file @
aa675cdd
...
...
@@ -36,6 +36,11 @@ else
{
$difference_price
=
$free_shipping_subtotal
-
$subtotal
;
}
$mobileDetect
=
$objectManager
->
get
(
\Joshine\Common\Lib\MobileDetect\MobileDetect
::
class
);
?>
<style>
.free_message
{
...
...
@@ -83,6 +88,9 @@ else
z-index
:
1
;
border-top
:
1px
solid
#fff
;
}
.cart.table-wrapper
{
border-top
:
1px
solid
#ddd
;
}
}
</style>
<?php
$mergedCells
=
(
$this
->
helper
(
Magento\Tax\Helper\Data
::
class
)
->
displayCartBothPrices
()
?
2
:
1
);
?>
...
...
@@ -121,6 +129,7 @@ else
</div>
</div>
<?php
endif
?>
<?php
if
(
!
$mobileDetect
->
isMobile
())
:
?>
<form
action=
"
<?=
$block
->
escapeUrl
(
$block
->
getUrl
(
'checkout/cart/updatePost'
))
?>
"
method=
"post"
...
...
@@ -191,6 +200,37 @@ else
<input
type=
"hidden"
value=
""
id=
"update_cart_action_container"
data-cart-item-update=
""
/>
</div>
</form>
<?php
else
:
?>
<form
action=
"
<?=
$block
->
escapeUrl
(
$block
->
getUrl
(
'checkout/cart/updatePost'
))
?>
"
method=
"post"
id=
"form-validate"
data-mage-init=
'{"Magento_Checkout/js/action/update-shopping-cart":
{"validationURL" : "
<?=
$block
->
escapeUrl
(
$block
->
getUrl
(
'checkout/cart/updateItemQty'
))
?>
",
"updateCartActionContainer": "#update_cart_action_container"}
}'
class=
"form form-cart"
>
<?=
$block
->
getBlockHtml
(
'formkey'
)
?>
<div
class=
"cart table-wrapper
<?=
$mergedCells
==
2
?
' detailed'
:
''
?>
"
>
<?php
if
(
$block
->
getPagerHtml
())
:
?>
<div
class=
"cart-products-toolbar cart-products-toolbar-top toolbar"
data-attribute=
"cart-products-toolbar-top"
>
<?=
$block
->
getPagerHtml
()
?>
</div>
<?php
endif
?>
<?php
foreach
(
$block
->
getItems
()
as
$_item
)
:
?>
<?=
$block
->
getItemHtml
(
$_item
)
?>
<?php
endforeach
?>
<?php
if
(
$block
->
getPagerHtml
())
:
?>
<div
class=
"cart-products-toolbar cart-products-toolbar-bottom toolbar"
data-attribute=
"cart-products-toolbar-bottom"
>
<?=
$block
->
getPagerHtml
()
?>
</div>
<?php
endif
?>
</div>
</form>
<?php
endif
?>
<script>
require
([
'jquery'
],
function
(
$
)
{
$
(
'.add-qty'
).
click
(
function
(){
...
...
app/code/Magento/Checkout/view/frontend/templates/cart/item/renderer/actions/remove.phtml
View file @
aa675cdd
...
...
@@ -7,10 +7,10 @@
/** @var $block \Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove */
?>
<a
href=
"#"
title=
"
<?=
$block
->
escapeHtml
(
__
(
'Remove
item
'
))
?>
"
title=
"
<?=
$block
->
escapeHtml
(
__
(
'Remove'
))
?>
"
class=
"action action-delete"
data-post=
'
<?=
/* @noEscape */
$block
->
getDeletePostJson
()
?>
'
>
<span>
<?=
$block
->
escapeHtml
(
__
(
'Remove
item
'
))
?>
<?=
$block
->
escapeHtml
(
__
(
'Remove'
))
?>
</span>
</a>
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/coupon.phtml
View file @
aa675cdd
...
...
@@ -20,6 +20,15 @@ $hasCouponCode = (bool) strlen($block->getCouponCode());
.checkout-cart-index
.cart-container
.block.discount.active
.content
{
padding
:
0px
1rem
;
}
@media
(
max-width
:
768px
){
.checkout-cart-index
.cart-container
.block.discount.active
.content
{
padding
:
0px
!important
;
}
.checkout-cart-index
.column.main
.block
.title
{
padding
:
0.45rem
!important
;
}
}
</style>
<!--
<div class="block discount"
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
View file @
aa675cdd
This diff is collapsed.
Click to expand it.
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/renderer/actions/remove.phtml
View file @
aa675cdd
...
...
@@ -7,10 +7,10 @@
/** @var $block \Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove */
?>
<a
href=
"#"
title=
"
<?=
$block
->
escapeHtml
(
__
(
'Remove
item
'
))
?>
"
title=
"
<?=
$block
->
escapeHtml
(
__
(
'Remove'
))
?>
"
class=
"action action-delete"
data-post=
'
<?=
/* @noEscape */
$block
->
getDeletePostJson
()
?>
'
>
<span>
<?=
$block
->
escapeHtml
(
__
(
'Remove
item
'
))
?>
<?=
$block
->
escapeHtml
(
__
(
'Remove'
))
?>
</span>
</a>
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