File tree Expand file tree Collapse file tree 6 files changed +65
-28
lines changed
app/code/Magento/Checkout/view/frontend Expand file tree Collapse file tree 6 files changed +65
-28
lines changed Original file line number Diff line number Diff line change 46
46
<item name =" component" xsi : type =" string" >Magento_Checkout/js/view/progress-bar</item >
47
47
<item name =" displayArea" xsi : type =" string" >progressBar</item >
48
48
</item >
49
+ <item name =" estimation" xsi : type =" array" >
50
+ <item name =" sortOrder" xsi : type =" string" >10</item >
51
+ <item name =" component" xsi : type =" string" >Magento_Checkout/js/view/estimation</item >
52
+ <item name =" displayArea" xsi : type =" string" >estimation</item >
53
+ <item name =" config" xsi : type =" array" >
54
+ <item name =" template" xsi : type =" string" >Magento_Checkout/estimation</item >
55
+ </item >
56
+ </item >
49
57
<item name =" steps" xsi : type =" array" >
50
58
<item name =" component" xsi : type =" string" >uiComponent</item >
51
59
<item name =" displayArea" xsi : type =" string" >steps</item >
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright © 2015 Magento. All rights reserved.
3
+ * See COPYING.txt for license details.
4
+ */
5
+ define (
6
+ [
7
+ 'Magento_Checkout/js/view/summary/abstract-total' ,
8
+ 'Magento_Checkout/js/model/totals'
9
+ ] ,
10
+ function ( Component , totals ) {
11
+ 'use strict' ;
12
+ return Component . extend ( {
13
+ getQuantity : function ( ) {
14
+ if ( totals . totals ( ) ) {
15
+ return parseFloat ( totals . totals ( ) . items_qty ) ;
16
+ }
17
+ return 0 ;
18
+ } ,
19
+ getPureValue : function ( ) {
20
+ if ( totals . totals ( ) ) {
21
+ return parseFloat ( totals . getSegment ( 'grand_total' ) . value ) ;
22
+ }
23
+ return 0 ;
24
+ } ,
25
+ getValue : function ( ) {
26
+ return this . getFormattedPrice ( this . getPureValue ( ) ) ;
27
+ }
28
+
29
+ } ) ;
30
+ }
31
+ ) ;
32
+
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ define(
21
21
totals : totals . totals ( ) ,
22
22
getItems : totals . getItems ( ) ,
23
23
getItemsQty : function ( ) {
24
- return parseInt ( this . totals . items_qty ) || 0 ;
24
+ return parseFloat ( this . totals . items_qty ) ;
25
25
} ,
26
26
isItemsBlockExpanded : function ( ) {
27
27
return quote . isVirtual ( ) || stepNavigator . isProcessed ( 'shipping' ) ;
Original file line number Diff line number Diff line change 6
6
/*global alert*/
7
7
define (
8
8
[
9
- 'uiComponent' ,
10
- '../../../model/quote' ,
11
- 'Magento_Catalog/js/price-utils'
9
+ 'uiComponent'
12
10
] ,
13
- function ( Component , quote , priceUtils ) {
11
+ function ( Component ) {
14
12
"use strict" ;
15
13
return Component . extend ( {
16
14
defaults : {
Original file line number Diff line number Diff line change
1
+ <!--
2
+ /**
3
+ * Copyright © 2015 Magento. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ -->
7
+ < div class ="opc-estimated-wrapper ">
8
+ < div class ="estimated-block ">
9
+ < span class ="estimated-label " data-bind ="text: $t('Estimated Total') "> </ span >
10
+ < span class ="estimated-price " data-bind ="text: getValue() "> $120.00</ span >
11
+ </ div >
12
+ < div class ="minicart-wrapper ">
13
+ < button type ="button " class ="action showcart " data-toggle ="opc-summary ">
14
+ < span class ="counter qty ">
15
+ < span class ="counter-number " data-bind ="text: getQuantity() "> </ span >
16
+ </ span >
17
+ </ button >
18
+ </ div >
19
+ </ div >
Original file line number Diff line number Diff line change 12
12
<!-- ko template: getTemplate() --> <!-- /ko -->
13
13
<!--/ko-->
14
14
15
- <!-- Temp MAGETWO-36025 markup -->
16
- < div class ="opc-estimated-wrapper ">
17
- <!-- Markup for MAGETWO-38644 -->
18
- < div class ="estimated-block ">
19
- < span class ="estimated-label " data-bind ="text: $t('Estimated Total') "> </ span >
20
- < span class ="estimated-price "> $100.00</ span >
21
- </ div >
22
- < div class ="minicart-wrapper ">
23
- < button type ="button " class ="action showcart " data-toggle ="opc-summary ">
24
- < span class ="counter qty ">
25
- < span class ="counter-number "> 6</ span >
26
- </ span >
27
- </ button >
28
- </ div >
29
- <!-- Temp MAGETWO-36025 markup
30
- <button
31
- type="button"
32
- class="action showcart"
33
- data-toggle="opc-summary">
34
- <span data-bind="text: $t('View order summary')"></span>
35
- </button>-->
36
- </ div >
37
- <!-- /Temp MAGETWO-36025 markup -->
15
+ <!-- ko foreach: getRegion('estimation') -->
16
+ <!-- ko template: getTemplate() --> <!-- /ko -->
17
+ <!--/ko-->
38
18
39
19
<!-- ko foreach: getRegion('messages') -->
40
20
<!-- ko template: getTemplate() --> <!-- /ko -->
You can’t perform that action at this time.
0 commit comments