Commit 487a13ea by liumengfei

Merge branch 'developer' into production

parents 90c6d153 e315c97f
...@@ -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 {*}
......
...@@ -56,11 +56,21 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima ...@@ -56,11 +56,21 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?> <?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
<span style="margin-top: 0px;"><?= $block->escapeHtml($_option['label']) ?></span> <span style="margin-top: 0px;"><?= $block->escapeHtml($_option['label']) ?></span>
<span> <span>
<?php if ($_option['label'] != 'Size'){ ?>
<?php if (isset($_formatedOptionValue['full_view'])) :?> <?php if (isset($_formatedOptionValue['full_view'])) :?>
<?= $block->escapeHtml($_formatedOptionValue['full_view']) ?> <?= $block->escapeHtml($_formatedOptionValue['full_view']) ?>
<?php else :?> <?php else :?>
<?= $block->escapeHtml($_formatedOptionValue['value'], ['span', 'a']) ?> <?= $block->escapeHtml($_formatedOptionValue['value'], ['span', 'a']) ?>
<?php endif; ?> <?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> </span>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
......
...@@ -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