Skip to content

Commit 4cc81e9

Browse files
author
Akimov, Alexander(aakimov)
committed
Merge pull request #602 from magento-folks/checkout_notifications
[Folks] Sprint 75
2 parents 0a87feb + 4d40328 commit 4cc81e9

File tree

234 files changed

+904
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+904
-224
lines changed

app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ define(
4848
var self = this;
4949
if (this.validateHandler() && additionalValidators.validate()) {
5050
this.isPlaceOrderActionAllowed(false);
51-
$.when(setPaymentInformationAction()).done(function() {
51+
$.when(setPaymentInformationAction(this.messageContainer)).done(function() {
5252
self.placeOrderHandler();
5353
}).fail(function() {
5454
self.isPlaceOrderActionAllowed(true);

app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
</label>
1616
</div>
1717
<div class="payment-method-content">
18+
<!-- ko foreach: getRegion('messages') -->
19+
<!-- ko template: getTemplate() --><!-- /ko -->
20+
<!--/ko-->
1821
<div class="payment-method-billing-address">
1922
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
2023
<!-- ko template: getTemplate() --><!-- /ko -->

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/braintree-paypal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ define(
103103
}
104104
});
105105
} else {
106-
messageList.addErrorMessage({'message': 'Can not initialize PayPal (Braintree)'});
106+
this.messageContainer.addErrorMessage({'message': $t('Can not initialize PayPal (Braintree)')});
107107
}
108108
},
109109
isValid: function () {

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ define(
103103
clientToken: this.clientToken
104104
});
105105
} else {
106-
messageList.addErrorMessage({'message': 'Can not initialize PayPal (Braintree)'});
106+
this.messageContainer.addErrorMessage({'message': $t('Can not initialize PayPal (Braintree)')});
107107
}
108108

109109
return this;
@@ -116,7 +116,7 @@ define(
116116
var self = this,
117117
cardInfo = null;
118118

119-
messageList.clear();
119+
this.messageContainer.clear();
120120
this.quoteBaseGrandTotals = quote.totals().base_grand_total;
121121

122122
this.isPaymentProcessing = $.Deferred();
@@ -194,9 +194,9 @@ define(
194194
this.paymentMethodNonce('');
195195

196196
if (_.isObject(error)) {
197-
messageList.addErrorMessage(error);
197+
this.messageContainer.addErrorMessage(error);
198198
} else {
199-
messageList.addErrorMessage({
199+
this.messageContainer.addErrorMessage({
200200
message: error
201201
});
202202
}

app/code/Magento/Braintree/view/frontend/web/template/payment/braintree-paypal-form.html

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
</div>
1818

1919
<div class="payment-method-content">
20+
<!-- ko foreach: getRegion('messages') -->
21+
<!-- ko template: getTemplate() --><!-- /ko -->
22+
<!--/ko-->
2023
<fieldset class="fieldset" data-bind='attr: {id: "payment_form_" + getCode()}'>
2124
<div data-bind="afterRender: initPayPalContainer.bind($data)"></div>
2225
</fieldset>

app/code/Magento/Braintree/view/frontend/web/template/payment/cc-form.html

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
</div>
2323

2424
<div class="payment-method-content">
25+
<!-- ko foreach: getRegion('messages') -->
26+
<!-- ko template: getTemplate() --><!-- /ko -->
27+
<!--/ko-->
2528
<div class="payment-method-billing-address">
2629
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
2730
<!-- ko template: getTemplate() --><!-- /ko -->

app/code/Magento/Checkout/Block/Adminhtml/CartTab.php

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Class CartTab
1515
*
1616
* @package Magento\Checkout\Block\Adminhtml
17+
* @codeCoverageIgnore
1718
*/
1819
class CartTab extends TabWrapper
1920
{

app/code/Magento/Checkout/Block/Cart.php

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Cart extends \Magento\Checkout\Block\Cart\AbstractCart
3535
* @param \Magento\Checkout\Helper\Cart $cartHelper
3636
* @param \Magento\Framework\App\Http\Context $httpContext
3737
* @param array $data
38+
* @codeCoverageIgnore
3839
*/
3940
public function __construct(
4041
\Magento\Framework\View\Element\Template\Context $context,
@@ -55,6 +56,7 @@ public function __construct(
5556
/**
5657
* Prepare Quote Item Product URLs
5758
*
59+
* @codeCoverageIgnore
5860
* @return void
5961
*/
6062
protected function _construct()
@@ -106,6 +108,7 @@ public function prepareItemUrls()
106108
}
107109

108110
/**
111+
* @codeCoverageIgnore
109112
* @return bool
110113
*/
111114
public function hasError()
@@ -114,6 +117,7 @@ public function hasError()
114117
}
115118

116119
/**
120+
* @codeCoverageIgnore
117121
* @return int
118122
*/
119123
public function getItemsSummaryQty()
@@ -122,6 +126,7 @@ public function getItemsSummaryQty()
122126
}
123127

124128
/**
129+
* @codeCoverageIgnore
125130
* @return bool
126131
*/
127132
public function isWishlistActive()
@@ -140,6 +145,7 @@ public function isWishlistActive()
140145
}
141146

142147
/**
148+
* @codeCoverageIgnore
143149
* @return string
144150
*/
145151
public function getCheckoutUrl()
@@ -165,6 +171,7 @@ public function getContinueShoppingUrl()
165171

166172
/**
167173
* @return bool
174+
* @codeCoverageIgnore
168175
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
169176
*/
170177
public function getIsVirtual()
@@ -218,6 +225,7 @@ public function getItems()
218225
}
219226

220227
/**
228+
* @codeCoverageIgnore
221229
* @return int
222230
*/
223231
public function getItemsCount()

app/code/Magento/Checkout/Block/Cart/AbstractCart.php

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class AbstractCart extends \Magento\Framework\View\Element\Template
4949
* @param \Magento\Customer\Model\Session $customerSession
5050
* @param \Magento\Checkout\Model\Session $checkoutSession
5151
* @param array $data
52+
* @codeCoverageIgnore
5253
*/
5354
public function __construct(
5455
\Magento\Framework\View\Element\Template\Context $context,
@@ -114,6 +115,7 @@ public function getQuote()
114115
* Get all cart items
115116
*
116117
* @return array
118+
* @codeCoverageIgnore
117119
*/
118120
public function getItems()
119121
{
@@ -134,6 +136,7 @@ public function getItemHtml(\Magento\Quote\Model\Quote\Item $item)
134136

135137
/**
136138
* @return array
139+
* @codeCoverageIgnore
137140
*/
138141
public function getTotals()
139142
{

app/code/Magento/Checkout/Block/Cart/Additional/Info.php

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Info extends \Magento\Framework\View\Element\Template
1616
/**
1717
* @param \Magento\Quote\Model\Quote\Item\AbstractItem $item
1818
* @return $this
19+
* @codeCoverageIgnore
1920
*/
2021
public function setItem(\Magento\Quote\Model\Quote\Item\AbstractItem $item)
2122
{
@@ -25,6 +26,7 @@ public function setItem(\Magento\Quote\Model\Quote\Item\AbstractItem $item)
2526

2627
/**
2728
* @return \Magento\Quote\Model\Quote\Item\AbstractItem
29+
* @codeCoverageIgnore
2830
*/
2931
public function getItem()
3032
{

app/code/Magento/Checkout/Block/Cart/Coupon.php

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Coupon extends \Magento\Checkout\Block\Cart\AbstractCart
1212
* @param \Magento\Customer\Model\Session $customerSession
1313
* @param \Magento\Checkout\Model\Session $checkoutSession
1414
* @param array $data
15+
* @codeCoverageIgnore
1516
*/
1617
public function __construct(
1718
\Magento\Framework\View\Element\Template\Context $context,
@@ -25,6 +26,7 @@ public function __construct(
2526

2627
/**
2728
* @return string
29+
* @codeCoverageIgnore
2830
*/
2931
public function getCouponCode()
3032
{

app/code/Magento/Checkout/Block/Cart/Crosssell.php

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct
5555
* @param StockHelper $stockHelper
5656
* @param array $data
5757
*
58+
* @codeCoverageIgnore
5859
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
5960
*/
6061
public function __construct(
@@ -131,6 +132,7 @@ public function getItems()
131132
* Count items
132133
*
133134
* @return int
135+
* @codeCoverageIgnore
134136
*/
135137
public function getItemCount()
136138
{
@@ -162,6 +164,7 @@ protected function _getCartProductIds()
162164
* Get last product ID that was added to cart and remove this information from session
163165
*
164166
* @return int
167+
* @codeCoverageIgnore
165168
*/
166169
protected function _getLastAddedProductId()
167170
{
@@ -172,6 +175,7 @@ protected function _getLastAddedProductId()
172175
* Get quote instance
173176
*
174177
* @return \Magento\Quote\Model\Quote
178+
* @codeCoverageIgnore
175179
*/
176180
public function getQuote()
177181
{

app/code/Magento/Checkout/Block/Cart/Item/Renderer.php

+13
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class Renderer extends \Magento\Framework\View\Element\Template implements
102102
* @param InterpretationStrategyInterface $messageInterpretationStrategy
103103
* @param array $data
104104
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
105+
* @codeCoverageIgnore
105106
*/
106107
public function __construct(
107108
\Magento\Framework\View\Element\Template\Context $context,
@@ -132,6 +133,7 @@ public function __construct(
132133
*
133134
* @param AbstractItem $item
134135
* @return $this
136+
* @codeCoverageIgnore
135137
*/
136138
public function setItem(AbstractItem $item)
137139
{
@@ -143,6 +145,7 @@ public function setItem(AbstractItem $item)
143145
* Get quote item
144146
*
145147
* @return AbstractItem
148+
* @codeCoverageIgnore
146149
*/
147150
public function getItem()
148151
{
@@ -153,6 +156,7 @@ public function getItem()
153156
* Get item product
154157
*
155158
* @return \Magento\Catalog\Model\Product
159+
* @codeCoverageIgnore
156160
*/
157161
public function getProduct()
158162
{
@@ -163,6 +167,7 @@ public function getProduct()
163167
* Identify the product from which thumbnail should be taken.
164168
*
165169
* @return \Magento\Catalog\Model\Product
170+
* @codeCoverageIgnore
166171
*/
167172
public function getProductForThumbnail()
168173
{
@@ -172,6 +177,7 @@ public function getProductForThumbnail()
172177
/**
173178
* @param string $productUrl
174179
* @return $this
180+
* @codeCoverageIgnore
175181
*/
176182
public function overrideProductUrl($productUrl)
177183
{
@@ -265,6 +271,7 @@ public function getProductOptions()
265271
* Get list of all otions for product
266272
*
267273
* @return array
274+
* @codeCoverageIgnore
268275
*/
269276
public function getOptionList()
270277
{
@@ -288,6 +295,7 @@ public function getQty()
288295
* Get checkout session
289296
*
290297
* @return \Magento\Checkout\Model\Session
298+
* @codeCoverageIgnore
291299
*/
292300
public function getCheckoutSession()
293301
{
@@ -368,6 +376,7 @@ public function getFormatedOptionValue($optionValue)
368376
* Check whether Product is visible in site
369377
*
370378
* @return bool
379+
* @codeCoverageIgnore
371380
*/
372381
public function isProductVisible()
373382
{
@@ -378,6 +387,7 @@ public function isProductVisible()
378387
* Return product additional information block
379388
*
380389
* @return AbstractBlock
390+
* @codeCoverageIgnore
381391
*/
382392
public function getProductAdditionalInformationBlock()
383393
{
@@ -389,6 +399,7 @@ public function getProductAdditionalInformationBlock()
389399
*
390400
* @param bool $strict
391401
* @return $this
402+
* @codeCoverageIgnore
392403
*/
393404
public function setQtyMode($strict)
394405
{
@@ -401,6 +412,7 @@ public function setQtyMode($strict)
401412
*
402413
* @param bool $ignore
403414
* @return $this
415+
* @codeCoverageIgnore
404416
*/
405417
public function setIgnoreProductUrl($ignore = true)
406418
{
@@ -451,6 +463,7 @@ public function getProductPriceHtml(\Magento\Catalog\Model\Product $product)
451463

452464
/**
453465
* @return \Magento\Framework\Pricing\Render
466+
* @codeCoverageIgnore
454467
*/
455468
protected function getPriceRender()
456469
{

app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Actions extends Text
2020
* Returns current quote item
2121
*
2222
* @return AbstractItem
23+
* @codeCoverageIgnore
2324
*/
2425
public function getItem()
2526
{
@@ -31,6 +32,7 @@ public function getItem()
3132
*
3233
* @param AbstractItem $item
3334
* @return $this
35+
* @codeCoverageIgnore
3436
*/
3537
public function setItem(AbstractItem $item)
3638
{

app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Generic.php

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Generic extends Template
1919
* Returns current quote item
2020
*
2121
* @return AbstractItem
22+
* @codeCoverageIgnore
2223
*/
2324
public function getItem()
2425
{
@@ -30,6 +31,7 @@ public function getItem()
3031
*
3132
* @param AbstractItem $item
3233
* @return $this
34+
* @codeCoverageIgnore
3335
*/
3436
public function setItem(AbstractItem $item)
3537
{
@@ -41,6 +43,7 @@ public function setItem(AbstractItem $item)
4143
* Check if product is visible in site visibility
4244
*
4345
* @return bool
46+
* @codeCoverageIgnore
4447
*/
4548
public function isProductVisibleInSiteVisibility()
4649
{
@@ -51,6 +54,7 @@ public function isProductVisibleInSiteVisibility()
5154
* Check if cart item is virtual
5255
*
5356
* @return bool
57+
* @codeCoverageIgnore
5458
*/
5559
public function isVirtual()
5660
{

0 commit comments

Comments
 (0)