Commit 8966b011 by dhn

去除tax

parent 4add18e0
...@@ -68,6 +68,14 @@ define([ ...@@ -68,6 +68,14 @@ define([
isCalculated: function () { isCalculated: function () {
return this.totals() && this.isFullMode() && quote.shippingMethod() != null; //eslint-disable-line eqeqeq 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 {*} * @return {*}
......
...@@ -12,3 +12,11 @@ ...@@ -12,3 +12,11 @@
</td> </td>
</tr> </tr>
<!-- /ko --> <!-- /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
...@@ -22,3 +22,22 @@ ...@@ -22,3 +22,22 @@
</td> </td>
</tr> </tr>
<!-- /ko --> <!-- /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 -->
...@@ -7,6 +7,7 @@ ...@@ -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"> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body> <body>
<!--
<referenceBlock name="checkout.cart.shipping"> <referenceBlock name="checkout.cart.shipping">
<arguments> <arguments>
<argument name="jsLayout" xsi:type="array"> <argument name="jsLayout" xsi:type="array">
...@@ -54,7 +55,9 @@ ...@@ -54,7 +55,9 @@
<item name="component" xsi:type="string">uiComponent</item> <item name="component" xsi:type="string">uiComponent</item>
<item name="sortOrder" xsi:type="string">30</item> <item name="sortOrder" xsi:type="string">30</item>
<item name="children" xsi:type="array"> <item name="children" xsi:type="array">
-->
<!-- merge your components here --> <!-- merge your components here -->
<!--
</item> </item>
</item> </item>
<item name="tax" xsi:type="array"> <item name="tax" xsi:type="array">
...@@ -79,5 +82,6 @@ ...@@ -79,5 +82,6 @@
</argument> </argument>
</arguments> </arguments>
</referenceBlock> </referenceBlock>
-->
</body> </body>
</page> </page>
...@@ -7,6 +7,7 @@ ...@@ -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"> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body> <body>
<!--
<referenceBlock name="checkout.root"> <referenceBlock name="checkout.root">
<arguments> <arguments>
<argument name="jsLayout" xsi:type="array"> <argument name="jsLayout" xsi:type="array">
...@@ -35,8 +36,10 @@ ...@@ -35,8 +36,10 @@
<item name="children" xsi:type="array"> <item name="children" xsi:type="array">
<item name="totals" xsi:type="array"> <item name="totals" xsi:type="array">
<item name="children" xsi:type="array"> <item name="children" xsi:type="array">
-->
<!-- sort order for this totals is configured on admin panel--> <!-- sort order for this totals is configured on admin panel-->
<!-- Stores->Configuration->SALES->Sales->General->Checkout Totals Sort Order --> <!-- Stores->Configuration->SALES->Sales->General->Checkout Totals Sort Order -->
<!--
<item name="subtotal" xsi:type="array"> <item name="subtotal" xsi:type="array">
<item name="component" xsi:type="string">Magento_Tax/js/view/checkout/summary/subtotal</item> <item name="component" xsi:type="string">Magento_Tax/js/view/checkout/summary/subtotal</item>
<item name="config" xsi:type="array"> <item name="config" xsi:type="array">
...@@ -56,7 +59,9 @@ ...@@ -56,7 +59,9 @@
<item name="component" xsi:type="string">uiComponent</item> <item name="component" xsi:type="string">uiComponent</item>
<item name="sortOrder" xsi:type="string">30</item> <item name="sortOrder" xsi:type="string">30</item>
<item name="children" xsi:type="array"> <item name="children" xsi:type="array">
-->
<!-- merge your components here --> <!-- merge your components here -->
<!--
</item> </item>
</item> </item>
<item name="tax" xsi:type="array"> <item name="tax" xsi:type="array">
...@@ -97,5 +102,6 @@ ...@@ -97,5 +102,6 @@
</argument> </argument>
</arguments> </arguments>
</referenceBlock> </referenceBlock>
-->
</body> </body>
</page> </page>
...@@ -49,14 +49,7 @@ define([ ...@@ -49,14 +49,7 @@ define([
isCalculated: function () { isCalculated: function () {
return this.totals() && this.isFullMode() && quote.shippingMethod() != null; return this.totals() && this.isFullMode() && quote.shippingMethod() != null;
}, },
isSaveShowed: function () {
var price = this.totals()['shipping_amount'];
if(price != 0)
{
return false;
}
return true;
},
/** /**
* @return {*} * @return {*}
......
...@@ -12,3 +12,12 @@ ...@@ -12,3 +12,12 @@
</td> </td>
</tr> </tr>
<!-- /ko --> <!-- /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 -->
...@@ -22,3 +22,21 @@ ...@@ -22,3 +22,21 @@
</td> </td>
</tr> </tr>
<!-- /ko --> <!-- /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 -->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment