Commit 419633ff by dhn

结算页顶部展示商品

parent 843bfca7
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</item> </item>
</item> </item>
</item> </item>
-->
<item name="estimation" xsi:type="array"> <item name="estimation" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/estimation</item> <item name="component" xsi:type="string">Magento_Checkout/js/view/estimation</item>
<item name="displayArea" xsi:type="string">estimation</item> <item name="displayArea" xsi:type="string">estimation</item>
...@@ -69,6 +69,30 @@ ...@@ -69,6 +69,30 @@
</item> </item>
</item> </item>
</item> </item>
-->
<item name="cart_items" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/cart-items</item>
<item name="displayArea" xsi:type="string">estimation</item>
<item name="children" xsi:type="array">
<item name="details" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/item/details</item>
<item name="children" xsi:type="array">
<item name="thumbnail" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/item/details/thumbnail</item>
<item name="displayArea" xsi:type="string">before_details</item>
</item>
<item name="subtotal" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/item/details/subtotal</item>
<item name="displayArea" xsi:type="string">after_details</item>
</item>
<item name="message" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/item/details/message</item>
<item name="displayArea" xsi:type="string">item_message</item>
</item>
</item>
</item>
</item>
</item>
<item name="steps" xsi:type="array"> <item name="steps" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item> <item name="component" xsi:type="string">uiComponent</item>
<item name="displayArea" xsi:type="string">steps</item> <item name="displayArea" xsi:type="string">steps</item>
...@@ -399,30 +423,8 @@ ...@@ -399,30 +423,8 @@
</item> </item>
</item> </item>
<!--<item name="cart_items" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/cart-items</item>
<item name="sortOrder" xsi:type="string">2</item>
<item name="children" xsi:type="array">
<item name="details" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/item/details</item>
<item name="children" xsi:type="array">
<item name="thumbnail" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/item/details/thumbnail</item>
<item name="displayArea" xsi:type="string">before_details</item>
</item>
<item name="subtotal" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/item/details/subtotal</item>
<item name="displayArea" xsi:type="string">after_details</item>
</item>
<item name="message" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/item/details/message</item>
<item name="displayArea" xsi:type="string">item_message</item>
</item>
</item>
</item>
</item>
</item>
-->
<item name="itemsAfter" xsi:type="array"> <item name="itemsAfter" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item> <item name="component" xsi:type="string">uiComponent</item>
<item name="children" xsi:type="array"> <item name="children" xsi:type="array">
......
...@@ -8,8 +8,9 @@ define([ ...@@ -8,8 +8,9 @@ define([
'Magento_Checkout/js/model/totals', 'Magento_Checkout/js/model/totals',
'uiComponent', 'uiComponent',
'Magento_Checkout/js/model/step-navigator', 'Magento_Checkout/js/model/step-navigator',
'Magento_Checkout/js/model/quote' 'Magento_Checkout/js/model/quote',
], function (ko, totals, Component, stepNavigator, quote) { 'Magento_Catalog/js/price-utils',
], function (ko, totals, Component, stepNavigator, quote,priceUtils) {
'use strict'; 'use strict';
var useQty = window.checkoutConfig.useQty; var useQty = window.checkoutConfig.useQty;
...@@ -66,8 +67,14 @@ define([ ...@@ -66,8 +67,14 @@ define([
totals.getItems().subscribe(function (items) { totals.getItems().subscribe(function (items) {
this.setItems(items); this.setItems(items);
}.bind(this)); }.bind(this));
console.log(totals.totals())
},
getFormattedPrice: function (price) {
return priceUtils.formatPrice(price, quote.getPriceFormat());
},
getGrandTotal:function(){
return this.getFormattedPrice(this.totals['grand_total']);
}, },
/** /**
* Set items to observable field * Set items to observable field
* *
......
...@@ -377,7 +377,7 @@ $full_free_ship = $_helper->currency($full_free, true, false); ...@@ -377,7 +377,7 @@ $full_free_ship = $_helper->currency($full_free, true, false);
gap: 0rem; gap: 0rem;
} }
.checkout-index-index .block.items-in-cart{ .checkout-index-index .block.items-in-cart{
border-bottom: 1px solid #ddd; display: none;
} }
.checkout-index-index table tr,.checkout-index-index table tr .mark .title{ .checkout-index-index table tr,.checkout-index-index table tr .mark .title{
border:none; border:none;
...@@ -503,6 +503,7 @@ $full_free_ship = $_helper->currency($full_free, true, false); ...@@ -503,6 +503,7 @@ $full_free_ship = $_helper->currency($full_free, true, false);
} }
.checkout-index-index .authentication-wrapper{ .checkout-index-index .authentication-wrapper{
padding: 5px 20px; padding: 5px 20px;
border-bottom: 1px solid #ddd;
} }
.button-fix { .button-fix {
width:100%!important; width:100%!important;
...@@ -518,6 +519,20 @@ $full_free_ship = $_helper->currency($full_free, true, false); ...@@ -518,6 +519,20 @@ $full_free_ship = $_helper->currency($full_free, true, false);
#checkout_place_order .fix-content.button-fix .now-order-total{ #checkout_place_order .fix-content.button-fix .now-order-total{
display:block; display:block;
} }
.checkout-index-index .block.items-in-cart{
border-bottom: 1px solid #ddd;
background-color: #fff;
margin-bottom: 1rem;
padding: 0.35rem 0rem;
display: block;
}
.checkout-index-index .block.items-in-cart .title{
padding-left:1rem;
}
/***************payment end******************/ /***************payment end******************/
} }
#checkout_place_order .fix-content .now-order-total{ #checkout_place_order .fix-content .now-order-total{
......
...@@ -4,14 +4,11 @@ ...@@ -4,14 +4,11 @@
* See COPYING.txt for license details. * See COPYING.txt for license details.
*/ */
--> -->
<div class="block items-in-cart" data-bind="mageInit: {'collapsible':{'closeOnOuter':false,'openedState': 'active', 'active': isItemsBlockExpanded()}}"> <div class="block items-in-cart" data-bind="mageInit: {'collapsible':{'closeOnOuter':false,'openedState': 'false', 'active': false}}">
<div class="title" data-role="title"> <div class="title" data-role="title">
<strong role="heading" aria-level="1"> <strong role="heading" aria-level="1">
<translate args="maxCartItemsToDisplay" if="maxCartItemsToDisplay < getCartLineItemsCount()"></translate> <span class="estimated-label" data-bind="i18n: 'Estimated Total'"></span>
<translate args="'of'" if="maxCartItemsToDisplay < getCartLineItemsCount()"></translate> <span class="estimated-price" data-bind="text: getGrandTotal()"></span>
<span data-bind="text: getCartSummaryItemsCount()"></span>
<translate args="'Item in Cart'" if="getCartSummaryItemsCount() === 1"></translate>
<translate args="'Items in Cart'" if="getCartSummaryItemsCount() > 1"></translate>
</strong> </strong>
</div> </div>
<div class="content minicart-items" data-role="content"> <div class="content minicart-items" data-role="content">
......
...@@ -1045,7 +1045,10 @@ p.shopbycate-title { ...@@ -1045,7 +1045,10 @@ p.shopbycate-title {
max-width:60%; max-width:60%;
} }
.checkout-index-index .authentication-wrapper { .checkout-index-index .authentication-wrapper {
padding: 6px 20px!important; padding: 0.23px 20px!important;
}
.checkout-index-index .minicart-items-wrapper > .minicart-items{
padding: 0 0.45rem 0.375rem;
} }
} }
......
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