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
0302eb96
Commit
0302eb96
authored
May 04, 2023
by
dhn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车属性展示修改
parent
4cb5a579
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
11 deletions
+31
-11
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
+28
-10
app/design/frontend/Joshine/breeze/web/css/_custom.less
+3
-1
No files found.
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
View file @
0302eb96
...
...
@@ -53,16 +53,34 @@ $priceBlock = $objectManager->get(\Magento\Catalog\Block\Product\AbstractProduct
<!----------------------------item option start--------------------------------->
<?php
if
(
$_options
=
$block
->
getOptionList
())
:?>
<
div
class
="
item
-
options
-
meta
">
<?php foreach (
$_options
as
$_option
) :?>
<span class="
item
-
options
-
line
">
<?php
$_formatedOptionValue
=
$block->getFormatedOptionValue
(
$_option
) ?>
<strong style="
font
-
weight
:
600
;
margin
-
right
:
10
px
;
"><?=
$block->escapeHtml
(
$_option['label']
) ?>:</strong>
<?php if (isset(
$_formatedOptionValue['full_view']
)) :?>
<?=
$block->escapeHtml
(
$_formatedOptionValue['full_view']
) ?>
<?php else :?>
<?=
$block->escapeHtml
(
$_formatedOptionValue['value']
, ['span', 'a']) ?>
<?php endif; ?>
</span><br />
<?php
$countOpt
= count(
$_options
);
?>
<?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
$objectManager
= \Magento\Framework\App\ObjectManager::getInstance();
$resource
=
$objectManager->get
('Magento\Framework\App\ResourceConnection');
$connection
=
$resource->getConnection
();
?>
<?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><br />
<?php endforeach; ?>
</div>
<?php endif;?>
...
...
app/design/frontend/Joshine/breeze/web/css/_custom.less
View file @
0302eb96
...
...
@@ -827,7 +827,9 @@ p.shopbycate-title {
.checkout-index-index .method-content{
text-align: left;
}
.checkout-cart-index span.item-options-line {
color: #555;
}
.no-enabled{
color:#cacaca!important;
}
...
...
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