Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] Issue in adding the wishlist of "zero price" product #2

Closed
wants to merge 126 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
335bca4
Update CustomerFlushFormKey.php
ronak2ram Jul 8, 2018
f9ccb51
Prevent running SQL query on every item in the database when the quot…
LordZardeck Jul 10, 2018
3d27dff
Fixed extends and removed unnecessary variables
Igloczek Mar 27, 2018
cd20f8e
ENGCOM-2406: [Backport] Fixed extends and removed unnecessary variabl…
magento-engcom-team Jul 18, 2018
727503d
Use constant time string comparison in FormKey validator
p0pr0ck5 Feb 6, 2018
38e2133
Polish up implementation
orlangur Jun 26, 2018
48e9b1b
Set proper text-aligh for the <th> element of the Subtotal column
TomashKhamlai Jul 25, 2018
446031a
ENGCOM-2550: [Backport] Set proper text-aligh for the <th> element of…
magento-engcom-team Jul 26, 2018
d2f4820
Declare module namespace before template path name
mage2pratik Jul 26, 2018
11d5242
ENGCOM-2395: [Backport] Prevent running SQL query on every item in th…
magento-engcom-team Jul 26, 2018
b335d0a
Updated Magento_Newsletter's block file.
sanganinamrata Jul 9, 2018
acdfcaa
Corrected block name in Magento_Framework's test xml file.
sanganinamrata Jul 9, 2018
9d645b0
hide cookie notice instead of reloading site
torhoehn Jul 17, 2018
dbced45
Fix confirmation for registered customer
anvasiliev May 18, 2018
e526b4e
Fix confirmation for registered customer
anvasiliev May 18, 2018
22c4e4f
Fix unit test
anvasiliev May 18, 2018
c6096ff
Merge pull request https://github.com/magento/magento2/pull/17176 to …
magento-engcom-team Jul 27, 2018
191d873
Merge pull request https://github.com/magento/magento2/pull/17177 to …
magento-engcom-team Jul 27, 2018
1280d3b
Merge pull request https://github.com/magento/magento2/pull/17178 to …
magento-engcom-team Jul 27, 2018
4148751
Removed API annotation
gelanivishal Jul 27, 2018
ff550b4
DOBISSUE date format changed after customer tries to register with sa…
KaushikChavda May 17, 2018
158e977
DOBISSUE date format changed after customer tries to register with sa…
KaushikChavda May 24, 2018
7359a16
DOBISSUE date format changed after customer tries to register with sa…
KaushikChavda May 24, 2018
f49cf3d
DOBISSUE fix travis-ci error.
KaushikChavda May 24, 2018
f08d932
DOBUSSUE fixed On Create New Customer Account page DOB field always c…
KaushikChavda Jun 13, 2018
fe389c3
ENGCOM-2558: [Backport] DOBISSUE date format changed after customer t…
magento-engcom-team Jul 27, 2018
1ed15d2
Filter test result collection with the cron job code defined in the c…
evktalo Jun 19, 2018
5a99111
Fixed a grammatical error on the vault tooltip
mage2pratik Jul 27, 2018
15ff4d2
Update template.js
angelomaragna Jul 25, 2018
da9afe6
MAGETWO-81310: Fixed ability to set field config from layout xml #11302
vrann Oct 19, 2017
6702cdc
get language code
crissanclick Oct 19, 2017
64bad6b
Merge pull request #23 from magento/2.1-develop
mageprince Jul 27, 2018
50f4051
Update rules.js
mageprince Jul 27, 2018
189a7b1
Categories > Left menu > Item title space fix
rafaelstz Jul 21, 2018
f6dbc7a
Broken Responsive Layout on Top
rodrigoobiassi Jul 20, 2018
b50caeb
Update sidebar.js
0m3r Jun 27, 2018
540cdb5
Fix for #14593 (duo over)
0m3r Jul 2, 2018
d937ca7
Restore sidebar.js
0m3r Jul 2, 2018
9c4dfbd
Credit memo email template file: fixing incorrect object type error
JosephMaxwell Jun 27, 2018
92f6cbc
fix: change "My Dashboard" to "My Account"
Jun 11, 2018
6095013
fix: change "Account Dashboard" to "My Account"
Jul 2, 2018
ebe636d
Remove commented code
mage2pratik Jul 24, 2018
e06e7ac
fix misprint ('_requesetd' > '_requested')
likemusic Jul 20, 2018
b957e32
Mobile device style groups incorrect order
tejash-wagento Jul 20, 2018
5685d19
Modify Report processor to return 500
andrewhowdencom Oct 17, 2017
1220688
Add VAT number to email source variables
Sep 22, 2017
c5d85e0
Skip store code admin from being detected in case of store code in ur…
sylvainraye Oct 14, 2017
f9696c9
Update PathInfoProcessor.php
Oct 15, 2017
f1120da
FIXED: FTP user and password strings urldecoded
javierperezm Jul 17, 2018
cd7fbb6
Fixed: urldecode user & pass from FTP connection string
javierperezm Jul 18, 2018
6ac979f
ENGCOM-2564: [Backport] Fix misprint ('_requesetd' > '_requested') #1…
magento-engcom-team Jul 28, 2018
4df1e1b
ENGCOM-2565: [Backport] Modify Report processor to return 500 #17241
magento-engcom-team Jul 28, 2018
e65d3e5
ENGCOM-2569: [Backport] FIXED: FTP user and password strings urldecod…
magento-engcom-team Jul 28, 2018
fd00746
ENGCOM-2571: [Backport] Remove commented code #17237
magento-engcom-team Jul 28, 2018
ce5e870
ENGCOM-2572: [Backport] Credit memo email template file: fixing incor…
magento-engcom-team Jul 28, 2018
6fba08f
ENGCOM-2575: [Backport] [ISSUE-11140][BUGFIX] Skip store code admin f…
magento-engcom-team Jul 28, 2018
b17a079
ENGCOM-2577: [Backport] Add VAT number to email source variables #17242
magento-engcom-team Jul 28, 2018
175d023
ENGCOM-2579: [Backport] Broken Responsive Layout on Top page #17218
magento-engcom-team Jul 28, 2018
cf02016
ENGCOM-2582: [Backport] Categories > Left menu > Item title space fix…
magento-engcom-team Jul 28, 2018
461888c
ENGCOM-2584: [Backport 2.1] Fix 'pattern' UI Component validation #17213
magento-engcom-team Jul 28, 2018
31ad91c
ENGCOM-2586: [Backport] Magento sets ISO invalid language code #17212
magento-engcom-team Jul 28, 2018
19d0412
ENGCOM-2587: [Backport] Fixed ability to set field config from layout…
magento-engcom-team Jul 28, 2018
aebee51
ENGCOM-2595: [Backport] Fix for #14593 (second try #16431) #17223
magento-engcom-team Jul 28, 2018
5b96947
Update customer_account.xml
gelanivishal Jul 29, 2018
3daf3f0
ENGCOM-2571: [Backport] Remove commented code #17237
Jul 29, 2018
1ca9f39
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jul 29, 2018
79b4354
Fixed a grammatical error on the vault tooltip
mage2pratik Jul 29, 2018
5818d00
ENGCOM-2564: [Backport] Fix misprint ('_requesetd' > '_requested') #1…
Jul 29, 2018
3d8d2b5
ENGCOM-2598: [Backport] Fixed a grammatical error on the vault toolti…
magento-engcom-team Jul 29, 2018
6333748
Using interface instead of model directly
woutersamaey Jul 25, 2018
0cacd45
Add meta NOINDEX,NOFOLLOW to admin scope to avoid accidental crawling
mage2pratik Jul 29, 2018
7d0ab7c
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jul 29, 2018
729ed9d
Merge pull request https://github.com/magento/magento2/pull/17263 to …
magento-engcom-team Jul 29, 2018
95f5abb
ENGCOM-2600: [Backport] Using interface instead of model directly #17260
magento-engcom-team Jul 30, 2018
2f8c95b
ENGCOM-2600: [Backport] Using interface instead of model directly #17260
Jul 30, 2018
ebb577a
ENGCOM-2558: [Backport] DOBISSUE date format changed after customer t…
Jul 30, 2018
3126d53
ENGCOM-2395: [Backport] Prevent running SQL query on every item in th…
Jul 30, 2018
267d91d
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jul 30, 2018
ad8bcd9
ENGCOM-2577: [Backport] Add VAT number to email source variables #17242
Jul 30, 2018
ec5d57b
ENGCOM-2565: [Backport] Modify Report processor to return 500 #17241
Jul 30, 2018
cba356f
ENGCOM-2605: [Backport] Resolved : Mobile device style groups incorre…
magento-engcom-team Jul 30, 2018
03807d9
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jul 30, 2018
9c146b9
ENGCOM-2598: [Backport] Fixed a grammatical error on the vault toolti…
Jul 30, 2018
228dfc6
ENGCOM-2575: [Backport] [ISSUE-11140][BUGFIX] Skip store code admin f…
Jul 30, 2018
55a1b1c
ENGCOM-2572: [Backport] Credit memo email template file: fixing incor…
Jul 30, 2018
949d98d
ENGCOM-2550: [Backport] Set proper text-aligh for the <th> element of…
Jul 30, 2018
cbb9870
ENGCOM-2569: Fix static tests failure.
nmalevanec Jul 30, 2018
34705e6
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jul 31, 2018
29e57ab
ENGCOM-2569: [Backport] FIXED: FTP user and password strings urldecod…
Jul 31, 2018
bd28511
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jul 31, 2018
24f87cc
[Backport] Update template.js #17202
VladimirZaets Jul 31, 2018
689fd96
ENGCOM-2589: [Backport] Update template.js #17202
magento-engcom-team Jul 31, 2018
b57a9a2
ENGCOM-2589: [Backport] Update template.js #17202
Jul 31, 2018
c26240a
ENGCOM-2582: [Backport] Categories > Left menu > Item title space fix…
Jul 31, 2018
b60ed01
ENGCOM-2579: [Backport] Broken Responsive Layout on Top page #17218
Jul 31, 2018
334a651
ENGCOM-2608: [Backport] fix: change 'My Dashboard' to 'My Account', f…
magento-engcom-team Jul 31, 2018
0b60302
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Jul 31, 2018
24a00c6
ENGCOM-2605: [Backport] Resolved : Mobile device style groups incorre…
Jul 31, 2018
00a357b
ENGCOM-2595: [Backport] Fix for #14593 (second try #16431) #17223
Jul 31, 2018
ece58a4
ENGCOM-2587: [Backport] Fixed ability to set field config from layout…
Jul 31, 2018
aa6ac3f
ENGCOM-2586: [Backport] Magento sets ISO invalid language code #17212
Jul 31, 2018
02963cc
ENGCOM-2584: [Backport 2.1] Fix "pattern" UI Component validation #17213
Jul 31, 2018
83044ca
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Aug 1, 2018
c786ede
ENGCOM-2614: [Backport] Fix newsletter subscription behaviour for reg…
magento-engcom-team Aug 1, 2018
588358e
ENGCOM-2615: Declare module namespace before template path name #17172
magento-engcom-team Aug 1, 2018
0a13675
ENGCOM-2617: [Backport] Filter test result collection with the cron j…
magento-engcom-team Aug 1, 2018
c483725
ENGCOM-2617: [Backport] Filter test result collection with the cron j…
Aug 1, 2018
efab494
ENGCOM-2615: Declare module namespace before template path name #17172
Aug 1, 2018
79e11cb
ENGCOM-2608: [Backport] fix: change "My Dashboard" to "My Account", f…
Aug 1, 2018
15b9b26
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Aug 1, 2018
11de4a2
ENGCOM-2626: [Backport] Login with wishlist raise report after logout…
magento-engcom-team Aug 2, 2018
895e492
ENGCOM-2626: [Backport] Login with wishlist raise report after logout…
Aug 2, 2018
937cd43
ENGCOM-2614: [Backport] Fix newsletter subscription behaviour for reg…
Aug 2, 2018
0883bbb
ENGCOM-2406: [Backport] Fixed extends and removed unnecessary variabl…
Aug 2, 2018
2ddec42
fix: remove unused ID
DanielRuf Aug 2, 2018
b49447b
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Aug 2, 2018
74ecb0b
ENGCOM-2639: fix: remove unused ID #17335
magento-engcom-team Aug 2, 2018
ccbef92
ENGCOM-2639: fix: remove unused ID #17335
Aug 5, 2018
cce5feb
ENGCOM-2656: [Backport] Use constant time string comparison in FormKe…
magento-engcom-team Aug 5, 2018
e42fd2e
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Aug 5, 2018
ebdc7c3
#15308 extraneous margin
StevenGuapaBV Jun 7, 2018
9a27beb
ENGCOM-2659: [Backport] #15308 removed extraneous margin #17379
magento-engcom-team Aug 6, 2018
5a07347
ENGCOM-2659: [Backport] #15308 removed extraneous margin #17379
Aug 6, 2018
bd825eb
ENGCOM-2656: [Backport] Use constant time string comparison in FormKe…
Aug 6, 2018
87b631e
:arrows_clockwise: [EngCom] Public Pull Requests - 2.1-develop
Aug 6, 2018
95b0e20
Fixed add to wishlist issue on product price 0
gelanivishal Jul 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</span>
<div class="field-tooltip-content"
data-target="dropdown"
translate="'We store you payment information securely on Braintree servers via SSL.'"></div>
translate="'We store your payment information securely on Braintree servers via SSL.'"></div>
</div>
</div>
<!-- /ko -->
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Catalog/Pricing/Price/RegularPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class RegularPrice extends AbstractPrice implements BasePriceProviderInterface
/**
* Get price value
*
* @return float|bool
* @return float
*/
public function getValue()
{
if ($this->value === null) {
$price = $this->product->getPrice();
$priceInCurrentCurrency = $this->priceCurrency->convertAndRound($price);
$this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : false;
$this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : 0;
}
return $this->value;
}
Expand Down
27 changes: 13 additions & 14 deletions app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,19 @@ protected function getFieldConfig(

$element = [
'component' => isset($additionalConfig['component']) ? $additionalConfig['component'] : $uiComponent,
'config' => [
// customScope is used to group elements within a single form (e.g. they can be validated separately)
'customScope' => $dataScopePrefix,
'customEntry' => isset($additionalConfig['config']['customEntry'])
? $additionalConfig['config']['customEntry']
: null,
'template' => 'ui/form/field',
'elementTmpl' => isset($additionalConfig['config']['elementTmpl'])
? $additionalConfig['config']['elementTmpl']
: $elementTemplate,
'tooltip' => isset($additionalConfig['config']['tooltip'])
? $additionalConfig['config']['tooltip']
: null
],
'config' => $this->mergeConfigurationNode(
'config',
$additionalConfig,
[
'config' => [
// customScope is used to group elements within a single
// form (e.g. they can be validated separately)
'customScope' => $dataScopePrefix,
'template' => 'ui/form/field',
'elementTmpl' => $elementTemplate,
],
]
),
'dataScope' => $dataScopePrefix . '.' . $attributeCode,
'label' => $attributeConfig['label'],
'provider' => $providerName,
Expand Down
6 changes: 4 additions & 2 deletions app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ define([
confirm: function () {
self._removeItem($(event.currentTarget));
},
always: function (event) {
event.stopImmediatePropagation();

/** @inheritdoc */
always: function (e) {
e.stopImmediatePropagation();
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<form data-hasrequired="* Required Fields">
<fieldset data-bind="attr: { id:'billing-new-address-form-'+index, value:index}" class="fieldset address">
<fieldset class="fieldset address" data-form="billing-new-address">
<!-- ko foreach: getRegion('additional-fieldsets') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Cookie/view/frontend/web/js/notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define([
});

if ($.mage.cookies.get(this.options.cookieName)) {
window.location.reload();
this.element.hide();
} else {
window.location.href = this.options.noCookiesUrl;
}
Expand Down
3 changes: 2 additions & 1 deletion app/code/Magento/Customer/Block/Widget/Dob.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ protected function getFormFilter()
protected function applyOutputFilter($value)
{
$filter = $this->getFormFilter();
if ($filter) {
if ($filter && $value) {
$value = date('Y-m-d', $this->getTime());
$value = $filter->outputFilter($value);
}
return $value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function aroundExecute(FlushFormKey $subject, callable $proceed, Observer
$currentFormKey = $this->dataFormKey->getFormKey();
$proceed($observer);
$beforeParams = $this->session->getBeforeRequestParams();
if ($beforeParams['form_key'] == $currentFormKey) {
if (isset($beforeParams['form_key']) && $beforeParams['form_key'] === $currentFormKey) {
$beforeParams['form_key'] = $this->dataFormKey->getFormKey();
$this->session->setBeforeRequestParams($beforeParams);
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/etc/frontend/page_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<type id="customer_account_createpassword" label="Reset a Password"/>
<type id="customer_account_edit" label="Customer Account Edit Form"/>
<type id="customer_account_forgotpassword" label="Customer Forgot Password Form"/>
<type id="customer_account_index" label="Customer My Account Dashboard"/>
<type id="customer_account_index" label="Customer My Account"/>
<type id="customer_account_login" label="Customer Account Login Form"/>
<type id="customer_account_logoutsuccess" label="Customer Account Logout Success"/>
<type id="customer_address_form" label="Customer My Account Address Edit Form"/>
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Customer/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,8 @@ Type,Type
"Send Welcome Email From","Send Welcome Email From"
Addresses,Addresses
"Are you sure you want to delete this item?","Are you sure you want to delete this item?"
"Account Dashboard","Account Dashboard"
"Edit Account Information","Edit Account Information"
"Password forgotten","Password forgotten"
"My Dashboard","My Dashboard"
"You are signed out","You are signed out"
"No Password","No Password"
"Weak","Weak"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<block class="Magento\Framework\View\Element\Html\Links" name="customer_account_navigation" before="-" template="Magento_Customer::account/navigation.phtml">
<block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-account-link">
<arguments>
<argument name="label" xsi:type="string" translate="true">Account Dashboard</argument>
<argument name="label" xsi:type="string" translate="true">My Account</argument>
<argument name="path" xsi:type="string">customer/account</argument>
</arguments>
</block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<referenceBlock name="page.main.title">
<action method="setPageTitle">
<argument translate="true" name="title" xsi:type="string">My Dashboard</argument>
<argument translate="true" name="title" xsi:type="string">My Account</argument>
</action>
</referenceBlock>
<referenceContainer name="content">
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Email/Model/Source/Variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function __construct()
['value' => 'general/store_information/city', 'label' => __('City')],
['value' => 'general/store_information/street_line1', 'label' => __('Street Address 1')],
['value' => 'general/store_information/street_line2', 'label' => __('Street Address 2')],
['value' => 'general/store_information/merchant_vat_number', 'label' => __('VAT Number')],
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ protected function setup()
['value' => 'general/store_information/city', 'label' => __('City')],
['value' => 'general/store_information/street_line1', 'label' => __('Street Address 1')],
['value' => 'general/store_information/street_line2', 'label' => __('Street Address 2')],
['value' => 'general/store_information/merchant_vat_number', 'label' => __('VAT Number')],
];
}

Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Email/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Region/State,Region/State
City,City
"Street Address 1","Street Address 1"
"Street Address 2","Street Address 2"
"VAT Number","VAT Number"
"Store Contact Information","Store Contact Information"
%1,%1
"Template Variables","Template Variables"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function getForm()
}

/**
* Return return template name for JS
* Return template name for JS
*
* @return string
*/
Expand Down
13 changes: 2 additions & 11 deletions app/code/Magento/Newsletter/Model/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ public function subscribe($email)
self::XML_PATH_CONFIRMATION_FLAG,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
) == 1 ? true : false;
$isOwnSubscribes = false;

$isSubscribeOwnEmail = $this->_customerSession->isLoggedIn()
&& $this->_customerSession->getCustomerDataObject()->getEmail() == $email;
Expand All @@ -426,13 +425,7 @@ public function subscribe($email)
|| $this->getStatus() == self::STATUS_NOT_ACTIVE
) {
if ($isConfirmNeed === true) {
// if user subscribes own login email - confirmation is not needed
$isOwnSubscribes = $isSubscribeOwnEmail;
if ($isOwnSubscribes == true) {
$this->setStatus(self::STATUS_SUBSCRIBED);
} else {
$this->setStatus(self::STATUS_NOT_ACTIVE);
}
$this->setStatus(self::STATUS_NOT_ACTIVE);
} else {
$this->setStatus(self::STATUS_SUBSCRIBED);
}
Expand All @@ -458,9 +451,7 @@ public function subscribe($email)
try {
/* Save model before sending out email */
$this->save();
if ($isConfirmNeed === true
&& $isOwnSubscribes === false
) {
if ($isConfirmNeed === true) {
$this->sendConfirmationRequestEmail();
} else {
$this->sendConfirmationSuccessEmail();
Expand Down
24 changes: 13 additions & 11 deletions app/code/Magento/Newsletter/Test/Unit/Model/SubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
namespace Magento\Newsletter\Test\Unit\Model;

use Magento\Newsletter\Model\Subscriber;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
Expand Down Expand Up @@ -134,7 +136,7 @@ public function testSubscribe()
$email = 'subscriber_email@magento.com';
$this->resource->expects($this->any())->method('loadByEmail')->willReturn(
[
'subscriber_status' => 3,
'subscriber_status' => Subscriber::STATUS_UNSUBSCRIBED,
'subscriber_email' => $email,
'name' => 'subscriber_name'
]
Expand All @@ -151,15 +153,15 @@ public function testSubscribe()
$this->sendEmailCheck();
$this->resource->expects($this->atLeastOnce())->method('save')->willReturnSelf();

$this->assertEquals(1, $this->subscriber->subscribe($email));
$this->assertEquals(Subscriber::STATUS_NOT_ACTIVE, $this->subscriber->subscribe($email));
}

public function testSubscribeNotLoggedIn()
{
$email = 'subscriber_email@magento.com';
$this->resource->expects($this->any())->method('loadByEmail')->willReturn(
[
'subscriber_status' => 3,
'subscriber_status' => Subscriber::STATUS_UNSUBSCRIBED,
'subscriber_email' => $email,
'name' => 'subscriber_name'
]
Expand All @@ -176,7 +178,7 @@ public function testSubscribeNotLoggedIn()
$this->sendEmailCheck();
$this->resource->expects($this->atLeastOnce())->method('save')->willReturnSelf();

$this->assertEquals(2, $this->subscriber->subscribe($email));
$this->assertEquals(Subscriber::STATUS_NOT_ACTIVE, $this->subscriber->subscribe($email));
}

public function testUpdateSubscription()
Expand All @@ -193,7 +195,7 @@ public function testUpdateSubscription()
->willReturn(
[
'subscriber_id' => 1,
'subscriber_status' => 1
'subscriber_status' => Subscriber::STATUS_SUBSCRIBED
]
);
$customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id');
Expand Down Expand Up @@ -228,7 +230,7 @@ public function testUnsubscribeCustomerById()
->willReturn(
[
'subscriber_id' => 1,
'subscriber_status' => 1
'subscriber_status' => Subscriber::STATUS_SUBSCRIBED
]
);
$customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id');
Expand All @@ -254,7 +256,7 @@ public function testSubscribeCustomerById()
->willReturn(
[
'subscriber_id' => 1,
'subscriber_status' => 3
'subscriber_status' => Subscriber::STATUS_UNSUBSCRIBED
]
);
$customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id');
Expand All @@ -280,7 +282,7 @@ public function testSubscribeCustomerById1()
->willReturn(
[
'subscriber_id' => 1,
'subscriber_status' => 3
'subscriber_status' => Subscriber::STATUS_UNSUBSCRIBED
]
);
$customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id');
Expand All @@ -294,7 +296,7 @@ public function testSubscribeCustomerById1()
$this->scopeConfig->expects($this->atLeastOnce())->method('getValue')->with()->willReturn(true);

$this->subscriber->subscribeCustomerById($customerId);
$this->assertEquals(\Magento\Newsletter\Model\Subscriber::STATUS_NOT_ACTIVE, $this->subscriber->getStatus());
$this->assertEquals(Subscriber::STATUS_NOT_ACTIVE, $this->subscriber->getStatus());
}

public function testSubscribeCustomerByIdAfterConfirmation()
Expand All @@ -311,7 +313,7 @@ public function testSubscribeCustomerByIdAfterConfirmation()
->willReturn(
[
'subscriber_id' => 1,
'subscriber_status' => 4
'subscriber_status' => Subscriber::STATUS_UNCONFIRMED
]
);
$customerDataMock->expects($this->atLeastOnce())->method('getId')->willReturn('id');
Expand All @@ -323,7 +325,7 @@ public function testSubscribeCustomerByIdAfterConfirmation()
$this->scopeConfig->expects($this->atLeastOnce())->method('getValue')->with()->willReturn(true);

$this->subscriber->updateSubscription($customerId);
$this->assertEquals(\Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED, $this->subscriber->getStatus());
$this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->subscriber->getStatus());
}

public function testUnsubscribe()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ class Banktransfer extends \Magento\OfflinePayments\Block\Form\AbstractInstructi
*
* @var string
*/
protected $_template = 'form/banktransfer.phtml';
protected $_template = 'Magento_OfflinePayments::form/banktransfer.phtml';
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ class Cashondelivery extends \Magento\OfflinePayments\Block\Form\AbstractInstruc
*
* @var string
*/
protected $_template = 'form/cashondelivery.phtml';
protected $_template = 'Magento_OfflinePayments::form/cashondelivery.phtml';
}
2 changes: 1 addition & 1 deletion app/code/Magento/Payment/Block/Info/Instructions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Instructions extends \Magento\Payment\Block\Info
/**
* @var string
*/
protected $_template = 'info/instructions.phtml';
protected $_template = 'Magento_Payment::info/instructions.phtml';

/**
* Get instructions text from order payment
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/ProductAlert/Block/Email/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Price extends \Magento\ProductAlert\Block\Email\AbstractEmail
/**
* @var string
*/
protected $_template = 'email/price.phtml';
protected $_template = 'Magento_ProductAlert::email/price.phtml';

/**
* Retrieve unsubscribe url for product
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/ProductAlert/Block/Email/Stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Stock extends \Magento\ProductAlert\Block\Email\AbstractEmail
/**
* @var string
*/
protected $_template = 'email/stock.phtml';
protected $_template = 'Magento_ProductAlert::email/stock.phtml';

/**
* Retrieve unsubscribe url for product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ protected function _assignProducts()
*/
private function removeItemsWithAbsentProducts()
{
if (count($this->_productIds) === 0) {
return;
}

$productCollection = $this->_productCollectionFactory->create()->addIdFilter($this->_productIds);
$existingProductsIds = $productCollection->getAllIds();
$absentProductsIds = array_diff($this->_productIds, $existingProductsIds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public function setStoreFilter($storeId)
'main_table.rating_id = store.rating_id',
[]
);
// ->group('main_table.rating_id')
$this->_isStoreJoined = true;
}
$inCondition = $connection->prepareSqlCondition('store.store_id', ['in' => $storeId]);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Rss/Block/Feeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Feeds extends \Magento\Framework\View\Element\Template
/**
* @var string
*/
protected $_template = 'feeds.phtml';
protected $_template = 'Magento_Rss::feeds.phtml';

/**
* @var \Magento\Framework\App\Rss\RssManagerInterface
Expand Down
Loading