File tree Expand file tree Collapse file tree 5 files changed +19
-8
lines changed
Braintree/view/frontend/web
js/view/payment/method-renderer
OfflineShipping/Model/SalesRule Expand file tree Collapse file tree 5 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ define([
61
61
} ,
62
62
63
63
/**
64
- * @returns {Bool }
64
+ * @returns {Boolean }
65
65
*/
66
66
isVaultEnabled : function ( ) {
67
67
return this . vaultEnabler . isVaultEnabled ( ) ;
@@ -144,10 +144,19 @@ define([
144
144
} ,
145
145
146
146
/**
147
- * Trigger order placing
147
+ * Returns state of place order button
148
+ * @returns {Boolean }
149
+ */
150
+ isButtonActive : function ( ) {
151
+ return this . isActive ( ) && this . isPlaceOrderActionAllowed ( ) ;
152
+ } ,
153
+
154
+ /**
155
+ * Triggers order placing
148
156
*/
149
157
placeOrderClick : function ( ) {
150
158
if ( this . validateCardType ( ) ) {
159
+ this . isPlaceOrderActionAllowed ( false ) ;
151
160
$ ( this . getSelector ( 'submit' ) ) . trigger ( 'click' ) ;
152
161
}
153
162
} ,
Original file line number Diff line number Diff line change 139
139
< button class ="action primary checkout "
140
140
type ="submit "
141
141
data-bind ="
142
- click: placeOrderClick,
143
- attr: {title: $t('Place Order')},
144
- css: {disabled: !isPlaceOrderActionAllowed()},
145
- enable: isActive()
142
+ click: placeOrderClick,
143
+ attr: {title: $t('Place Order')},
144
+ enable: isButtonActive()
146
145
"
147
146
disabled >
148
147
< span data-bind ="i18n: 'Place Order' "> </ span >
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ Error!,Error!
62
62
"DB exception","DB exception"
63
63
"Wrong minimum amount.","Wrong minimum amount."
64
64
Message,Message
65
- "<a href=""%1"" onclick=""this.target=\'_blank\'"" class=""print""> Print receipt</a> ","<a href=""%1"" onclick=""this.target=\'_blank\'"" class=""print""> Print receipt</a> "
65
+ "Print receipt","Print receipt"
66
66
"Apply Discount Code","Apply Discount Code"
67
67
"Enter discount code","Enter discount code"
68
68
"Apply Discount","Apply Discount"
Original file line number Diff line number Diff line change 10
10
<?php /** @var $block \Magento\Checkout\Block\Onepage\Success */ ?>
11
11
12
12
<?php if ($ block ->getCanViewOrder () && $ block ->getCanPrintOrder ()) :?>
13
- <?php /* @escapeNotVerified */ echo __ ('<a href="%1" onclick="this.target= \'_blank \'" class="print">Print receipt</a> ' , $ block ->getPrintUrl ()) ?>
13
+ <a href="<?php /* @escapeNotVerified */ echo $ block ->getPrintUrl () ?> " target="_blank" class="print">
14
+ <?php /* @escapeNotVerified */ echo __ ('Print receipt ' ) ?>
15
+ </a>
14
16
<?php echo $ block ->getChildHtml () ?>
15
17
<?php endif ;?>
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ public function processFreeShipping(\Magento\Quote\Model\Quote\Item\AbstractItem
45
45
46
46
case Rule::FREE_SHIPPING_ADDRESS :
47
47
$ address ->setFreeShipping (true );
48
+ $ item ->setFreeShipping (true );
48
49
break ;
49
50
}
50
51
if ($ rule ->getStopRulesProcessing ()) {
You can’t perform that action at this time.
0 commit comments