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
5caabf02
Commit
5caabf02
authored
Apr 28, 2023
by
liumengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化购物车列表页面
parent
f77863d7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
83 deletions
+62
-83
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
+53
-63
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/minicart/item/default.html
+2
-2
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/minicart/subtotal.html
+5
-2
app/design/frontend/Joshine/breeze/Magento_Search/templates/form.mini.phtml
+0
-16
app/design/frontend/Joshine/breeze/web/css/_custom.less
+2
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
View file @
5caabf02
...
@@ -53,78 +53,68 @@ $priceBlock = $objectManager->get(\Magento\Catalog\Block\Product\AbstractProduct
...
@@ -53,78 +53,68 @@ $priceBlock = $objectManager->get(\Magento\Catalog\Block\Product\AbstractProduct
<!----------------------------item option start--------------------------------->
<!----------------------------item option start--------------------------------->
<?php
if
(
$_options
=
$block
->
getOptionList
())
:?>
<?php
if
(
$_options
=
$block
->
getOptionList
())
:?>
<
div
class
="
item
-
options
-
meta
">
<
div
class
="
item
-
options
-
meta
">
<?php
<?php foreach (
$_options
as
$_option
) :?>
$countOpt
= count(
$_options
);
<span class="
item
-
options
-
line
">
?>
<?php
$_formatedOptionValue
=
$block->getFormatedOptionValue
(
$_option
) ?>
<?php foreach (
$_options
as
$key
=>
$_option
) :?>
<strong style="
font
-
weight
:
600
;
margin
-
right
:
10
px
;
"><?=
$block->escapeHtml
(
$_option['label']
) ?>:</strong>
<span class="
item
-
options
-
line
">
<?php if (isset(
$_formatedOptionValue['full_view']
)) :?>
<?php
<?=
$block->escapeHtml
(
$_formatedOptionValue['full_view']
) ?>
$objectManager
= \Magento\Framework\App\ObjectManager::getInstance();
<?php else :?>
$resource
=
$objectManager->get
('Magento\Framework\App\ResourceConnection');
<?=
$block->escapeHtml
(
$_formatedOptionValue['value']
, ['span', 'a']) ?>
$connection
=
$resource->getConnection
();
<?php endif; ?>
?>
</span><br />
<?php if (
$_option['label']
!= 'Size'){ ?>
<?php
$tableName
=
$resource->getTableName
('eav_attribute_option_value');
$sql
= "
Select
*
FROM
" .
$tableName
."
where
store_id
=
0
AND
option_id
=
".
$_option['option_value']
;
$result
=
$connection->fetchRow
(
$sql
);
?>
<?=
$block->escapeHtml
(
$result['value']
) ?>
<?php }else{
$tableName
=
$resource->getTableName
('eav_attribute_option_swatch');
$sql
= "
Select
*
FROM
" .
$tableName
."
where
store_id
=
0
AND
option_id
=
".
$_option['option_value']
;
$result
=
$connection->fetchRow
(
$sql
);
echo
$result['value']
;
} ?>
</span>
<span><?php if (
$countOpt
- 1 !=
$key
) :?>/<?php endif; ?></span>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
<?php endif;?>
<?php endif;?>
<!----------------------------item option end----------------------------------->
<!----------------------------item price start---------------------------------->
<div class="
item
-
price
">
<?=
$priceBlock->getProductPrice
(
$product
);?>
</div>
<!----------------------------item price end------------------------------------>
<!----------------------------item handle start--------------------------------->
<div class="
item
-
handle
">
<div class="
item
-
quantity
">
<?php if (
$block->escapeHtmlAttr
(
$block->getQty
()) > 1) :?>
<strong class="
lower
-
qty
qty
-
change
">-</strong>
<?php else :?>
<strong class="
lower
-
qty
qty
-
change
no
-
enabled
">-</strong>
<?php endif; ?>
<div class="
field
qty
new
-
qty
">
<div class="
control
qty
">
<label for="
cart
-<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
-qty">
<input
id=
"cart-
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
-qty"
name=
"cart[
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
][qty]"
data-cart-item-id=
"
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getSku
())
?>
"
value=
"
<?=
$block
->
escapeHtmlAttr
(
$block
->
getQty
())
?>
"
type=
"number"
size=
"4"
step=
"any"
title=
"
<?=
$block
->
escapeHtmlAttr
(
__
(
'Qty'
))
?>
"
class=
"input-text qty"
data-validate=
"{required:true,'validate-greater-than-zero':true}"
data-role=
"cart-item-qty"
readonly=
"readonly"
/>
</label>
<div style="
max
-
width
:
100
%
;
width
:
100
%
;
height
:
40
px
;
">
<!----------------------------item handle start--------------------------------->
<div class="
item
-
handle
" style="
width
:
16
%
;
float
:
left
;
position
:
inherit
;
font
-
size
:
16
px
;
">
<div class="
item
-
quantity
">
<?php if (
$block->escapeHtmlAttr
(
$block->getQty
()) > 1) :?>
<strong class="
lower
-
qty
qty
-
change
">-</strong>
<?php else :?>
<strong class="
lower
-
qty
qty
-
change
no
-
enabled
">-</strong>
<?php endif; ?>
<div class="
field
qty
new
-
qty
">
<div class="
control
qty
">
<label for="
cart
-<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
-qty">
<input
id=
"cart-
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
-qty"
name=
"cart[
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getId
())
?>
][qty]"
data-cart-item-id=
"
<?=
$block
->
escapeHtmlAttr
(
$_item
->
getSku
())
?>
"
value=
"
<?=
$block
->
escapeHtmlAttr
(
$block
->
getQty
())
?>
"
type=
"number"
size=
"4"
step=
"any"
title=
"
<?=
$block
->
escapeHtmlAttr
(
__
(
'Qty'
))
?>
"
class=
"input-text qty"
data-validate=
"{required:true,'validate-greater-than-zero':true}"
data-role=
"cart-item-qty"
readonly=
"readonly"
/>
</label>
</div>
</div>
</div>
</div>
<strong
class=
"add-qty qty-change"
>
+
</strong>
<strong
class=
"add-qty qty-change"
>
+
</strong>
</div><br
/>
</div>
<div
class=
"item-actions"
>
<div
class=
"item-actions"
>
<div
class=
"actions-toolbar"
style=
"text-decoration: underline;"
>
<div
class=
"actions-toolbar"
>
<?=
/* @noEscape */
$block
->
getActions
(
$_item
)
?>
<?=
/* @noEscape */
$block
->
getActions
(
$_item
)
?>
</div>
</div>
</div>
</div>
</div>
<!----------------------------item handle end----------------------------------->
<!----------------------------item option end----------------------------------->
<div
style=
"float: right;padding-right: 15%;width: 40%;font-size: 20px;"
>
<?php
if
(
$canApplyMsrp
)
:?>
<
span
class
="
cart
msrp
subtotal
">--</span>
<?php else :?>
<?=
$block->getRowTotalHtml
(
$_item
) ?>
<?php endif; ?>
</div>
</div>
</div>
<!----------------------------item handle end----------------------------------->
</div>
</div>
</div>
</div>
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/minicart/item/default.html
View file @
5caabf02
...
@@ -32,15 +32,15 @@
...
@@ -32,15 +32,15 @@
</strong>
</strong>
<div
class=
"product-item-pricing"
>
<div
class=
"product-item-pricing"
style=
"font-size: 20px;"
>
<div
class=
"details-qty qty"
>
<div
class=
"details-qty qty"
>
<span
class=
"qty-wrapper"
data-bind=
"html: qty"
></span>
*
<!-- ko if: canApplyMsrp -->
<!-- ko if: canApplyMsrp -->
<div
class=
"details-map"
>
<div
class=
"details-map"
>
<span
class=
"label"
data-bind=
"i18n: 'Price'"
></span>
<span
class=
"label"
data-bind=
"i18n: 'Price'"
></span>
<span
class=
"value"
data-bind=
"i18n: 'See price before order confirmation.'"
></span>
<span
class=
"value"
data-bind=
"i18n: 'See price before order confirmation.'"
></span>
</div>
</div>
<!-- /ko -->
<!-- /ko -->
x
<span
class=
"qty-wrapper"
data-bind=
"html: qty"
></span>
</div>
</div>
<!-- ko ifnot: canApplyMsrp -->
<!-- ko ifnot: canApplyMsrp -->
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/minicart/subtotal.html
View file @
5caabf02
...
@@ -5,10 +5,13 @@
...
@@ -5,10 +5,13 @@
*/
*/
-->
-->
<div
class=
"subtotal"
>
<div
class=
"subtotal"
>
<span
class=
"label"
>
<span
class=
"label"
style=
"
font-size: 18px;
color: gray;
"
>
<!-- ko i18n: 'Cart subtotal' --><!-- /ko -->
<!-- ko i18n: 'Cart subtotal' --><!-- /ko -->
</span>
</span>
:
<!-- ko foreach: elems -->
<!-- ko foreach: elems -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->
<!-- /ko -->
...
...
app/design/frontend/Joshine/breeze/Magento_Search/templates/form.mini.phtml
View file @
5caabf02
...
@@ -61,19 +61,3 @@ $quickSearchUrl = $allowedSuggestion ? $escaper->escapeUrl($helper->getSuggestUr
...
@@ -61,19 +61,3 @@ $quickSearchUrl = $allowedSuggestion ? $escaper->escapeUrl($helper->getSuggestUr
</form>
</form>
</div>
</div>
</div>
</div>
<script>
require
([
'jquery'
],
function
(
$
)
{
$
(
"#search"
).
on
(
"focus"
,
function
()
{
$
(
this
).
css
(
"width"
,
"500px"
).
css
(
"font-size"
,
"20px"
);
});
$
(
'#search'
).
on
(
'blur'
,
function
(){
if
(
!
$
(
this
).
val
()){
$
(
this
).
attr
(
"style"
,
""
);
}
});
});
</script>
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
5caabf02
...
@@ -903,6 +903,8 @@ p.shopbycate-title {
...
@@ -903,6 +903,8 @@ p.shopbycate-title {
justify-content: space-between;
justify-content: space-between;
width: 100%;
width: 100%;
padding: 2px 0px;
padding: 2px 0px;
font-size: 20px;
margin-bottom: 20px;
}
}
.discount-area{
.discount-area{
color:#fa320f;
color:#fa320f;
...
...
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