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
487a13ea
Commit
487a13ea
authored
Mar 21, 2023
by
liumengfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into production
parents
90c6d153
e315c97f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
84 additions
and
8 deletions
+84
-8
app/code/Magento/Checkout/view/frontend/web/js/view/summary/shipping.js
+8
-0
app/code/Magento/Checkout/view/frontend/web/template/cart/totals/shipping.html
+9
-0
app/code/Magento/Checkout/view/frontend/web/template/summary/shipping.html
+19
-0
app/code/Magento/Tax/view/frontend/layout/checkout_cart_index.xml
+4
-0
app/code/Magento/Tax/view/frontend/layout/checkout_index_index.xml
+6
-0
app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/shipping.js
+1
-8
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
+10
-0
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/cart/totals/shipping.html
+9
-0
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/summary/shipping.html
+18
-0
No files found.
app/code/Magento/Checkout/view/frontend/web/js/view/summary/shipping.js
View file @
487a13ea
...
...
@@ -68,6 +68,14 @@ define([
isCalculated
:
function
()
{
return
this
.
totals
()
&&
this
.
isFullMode
()
&&
quote
.
shippingMethod
()
!=
null
;
//eslint-disable-line eqeqeq
},
isSaveShowed
:
function
()
{
var
price
=
this
.
totals
()[
'shipping_amount'
];
if
(
price
!=
0
)
{
return
false
;
}
return
true
;
},
/**
* @return {*}
...
...
app/code/Magento/Checkout/view/frontend/web/template/cart/totals/shipping.html
View file @
487a13ea
...
...
@@ -12,3 +12,11 @@
</td>
</tr>
<!-- /ko -->
<!-- ko if: isCalculated() && isSaveShowed() -->
<tr
class=
"totals shipping excl shipping-save aj"
>
<th
class=
"mark"
colspan=
"1"
scope=
"row"
data-bind=
"text: title + ' (' + getShippingSaveMethodTitle() + ')'"
></th>
<td
class=
"amount"
>
<span
class=
"price"
data-bind=
"text: getSaveValue()"
></span>
</td>
</tr>
<!-- /ko -->
\ No newline at end of file
app/code/Magento/Checkout/view/frontend/web/template/summary/shipping.html
View file @
487a13ea
...
...
@@ -22,3 +22,22 @@
</td>
</tr>
<!-- /ko -->
<!-- ko if: quoteIsVirtual == 0 && isSaveShowed()-->
<tr
class=
"totals shipping excl shipping-save ak"
>
<th
class=
"mark"
scope=
"row"
>
<span
class=
"label"
data-bind=
"i18n: title"
></span>
<span
class=
"value"
data-bind=
"text: getShippingSaveMethodTitle()"
></span>
</th>
<td
class=
"amount"
>
<!-- ko if: isCalculated() -->
<span
class=
"price"
data-bind=
"text: getSaveValue(), attr: {'data-th': title}"
></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span
class=
"not-calculated"
data-bind=
"text: getSaveValue(), attr: {'data-th': title}"
></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
app/code/Magento/Tax/view/frontend/layout/checkout_cart_index.xml
View file @
487a13ea
...
...
@@ -7,6 +7,7 @@
-->
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<!--
<referenceBlock name="checkout.cart.shipping">
<arguments>
<argument name="jsLayout" xsi:type="array">
...
...
@@ -54,7 +55,9 @@
<item name="component" xsi:type="string">uiComponent</item>
<item name="sortOrder" xsi:type="string">30</item>
<item name="children" xsi:type="array">
-->
<!-- merge your components here -->
<!--
</item>
</item>
<item name="tax" xsi:type="array">
...
...
@@ -79,5 +82,6 @@
</argument>
</arguments>
</referenceBlock>
-->
</body>
</page>
app/code/Magento/Tax/view/frontend/layout/checkout_index_index.xml
View file @
487a13ea
...
...
@@ -7,6 +7,7 @@
-->
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<!--
<referenceBlock name="checkout.root">
<arguments>
<argument name="jsLayout" xsi:type="array">
...
...
@@ -35,8 +36,10 @@
<item name="children" xsi:type="array">
<item name="totals" xsi:type="array">
<item name="children" xsi:type="array">
-->
<!-- sort order for this totals is configured on admin panel-->
<!-- Stores->Configuration->SALES->Sales->General->Checkout Totals Sort Order -->
<!--
<item name="subtotal" xsi:type="array">
<item name="component" xsi:type="string">Magento_Tax/js/view/checkout/summary/subtotal</item>
<item name="config" xsi:type="array">
...
...
@@ -56,7 +59,9 @@
<item name="component" xsi:type="string">uiComponent</item>
<item name="sortOrder" xsi:type="string">30</item>
<item name="children" xsi:type="array">
-->
<!-- merge your components here -->
<!--
</item>
</item>
<item name="tax" xsi:type="array">
...
...
@@ -97,5 +102,6 @@
</argument>
</arguments>
</referenceBlock>
-->
</body>
</page>
app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/shipping.js
View file @
487a13ea
...
...
@@ -49,14 +49,7 @@ define([
isCalculated
:
function
()
{
return
this
.
totals
()
&&
this
.
isFullMode
()
&&
quote
.
shippingMethod
()
!=
null
;
},
isSaveShowed
:
function
()
{
var
price
=
this
.
totals
()[
'shipping_amount'
];
if
(
price
!=
0
)
{
return
false
;
}
return
true
;
},
/**
* @return {*}
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/templates/cart/item/default.phtml
View file @
487a13ea
...
...
@@ -56,11 +56,21 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
<?php
$_formatedOptionValue
=
$block->getFormatedOptionValue
(
$_option
) ?>
<span style="
margin
-
top
:
0
px
;
"><?=
$block->escapeHtml
(
$_option['label']
) ?></span>
<span>
<?php if (
$_option['label']
!= 'Size'){ ?>
<?php if (isset(
$_formatedOptionValue['full_view']
)) :?>
<?=
$block->escapeHtml
(
$_formatedOptionValue['full_view']
) ?>
<?php else :?>
<?=
$block->escapeHtml
(
$_formatedOptionValue['value']
, ['span', 'a']) ?>
<?php endif; ?>
<?php }else{
$objectManager
= \Magento\Framework\App\ObjectManager::getInstance();
$resource
=
$objectManager->get
('Magento\Framework\App\ResourceConnection');
$connection
=
$resource->getConnection
();
$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
);
echo
$result['value']
;
} ?>
</span>
</div>
<?php endforeach; ?>
...
...
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/cart/totals/shipping.html
View file @
487a13ea
...
...
@@ -12,3 +12,12 @@
</td>
</tr>
<!-- /ko -->
<!-- ko if: isCalculated() && isSaveShowed() -->
<tr
class=
"totals shipping excl shipping-save as"
>
<th
class=
"mark"
colspan=
"1"
scope=
"row"
data-bind=
"text: title + ' (' + getShippingSaveMethodTitle() + ')'"
></th>
<td
class=
"amount"
>
<span
class=
"price"
data-bind=
"text: getSaveValue()"
></span>
</td>
</tr>
<!-- /ko -->
app/design/frontend/Joshine/breeze/Magento_Checkout/web/template/summary/shipping.html
View file @
487a13ea
...
...
@@ -22,3 +22,21 @@
</td>
</tr>
<!-- /ko -->
<!-- ko if: quoteIsVirtual == 0 && isSaveShowed()-->
<tr
class=
"totals shipping excl shipping-save ak"
>
<th
class=
"mark"
scope=
"row"
>
<span
class=
"label"
data-bind=
"i18n: title"
></span>
<span
class=
"value"
data-bind=
"text: getShippingSaveMethodTitle()"
></span>
</th>
<td
class=
"amount"
>
<!-- ko if: isCalculated() -->
<span
class=
"price"
data-bind=
"text: getSaveValue(), attr: {'data-th': title}"
></span>
<!-- /ko -->
<!-- ko ifnot: isCalculated() -->
<span
class=
"not-calculated"
data-bind=
"text: getSaveValue(), attr: {'data-th': title}"
></span>
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
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