From 2ac0fe3ac5c5accab736a3001c70817eaf785117 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 16 Aug 2019 15:53:52 +0530 Subject: [PATCH 001/153] force change files --- app/etc/NonComposerComponentRegistration.php | 0 app/etc/db_schema.xml | 0 app/etc/di.xml | 0 app/etc/registration_globlist.php | 0 app/etc/vendor_path.php | 0 generated/.htaccess | 0 pub/media/.htaccess | 0 pub/media/customer/.htaccess | 0 pub/media/downloadable/.htaccess | 0 pub/media/import/.htaccess | 0 pub/media/theme_customization/.htaccess | 0 pub/static/.htaccess | 0 var/.htaccess | 0 13 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 app/etc/NonComposerComponentRegistration.php mode change 100644 => 100755 app/etc/db_schema.xml mode change 100644 => 100755 app/etc/di.xml mode change 100644 => 100755 app/etc/registration_globlist.php mode change 100644 => 100755 app/etc/vendor_path.php mode change 100644 => 100755 generated/.htaccess mode change 100644 => 100755 pub/media/.htaccess mode change 100644 => 100755 pub/media/customer/.htaccess mode change 100644 => 100755 pub/media/downloadable/.htaccess mode change 100644 => 100755 pub/media/import/.htaccess mode change 100644 => 100755 pub/media/theme_customization/.htaccess mode change 100644 => 100755 pub/static/.htaccess mode change 100644 => 100755 var/.htaccess diff --git a/app/etc/NonComposerComponentRegistration.php b/app/etc/NonComposerComponentRegistration.php old mode 100644 new mode 100755 diff --git a/app/etc/db_schema.xml b/app/etc/db_schema.xml old mode 100644 new mode 100755 diff --git a/app/etc/di.xml b/app/etc/di.xml old mode 100644 new mode 100755 diff --git a/app/etc/registration_globlist.php b/app/etc/registration_globlist.php old mode 100644 new mode 100755 diff --git a/app/etc/vendor_path.php b/app/etc/vendor_path.php old mode 100644 new mode 100755 diff --git a/generated/.htaccess b/generated/.htaccess old mode 100644 new mode 100755 diff --git a/pub/media/.htaccess b/pub/media/.htaccess old mode 100644 new mode 100755 diff --git a/pub/media/customer/.htaccess b/pub/media/customer/.htaccess old mode 100644 new mode 100755 diff --git a/pub/media/downloadable/.htaccess b/pub/media/downloadable/.htaccess old mode 100644 new mode 100755 diff --git a/pub/media/import/.htaccess b/pub/media/import/.htaccess old mode 100644 new mode 100755 diff --git a/pub/media/theme_customization/.htaccess b/pub/media/theme_customization/.htaccess old mode 100644 new mode 100755 diff --git a/pub/static/.htaccess b/pub/static/.htaccess old mode 100644 new mode 100755 diff --git a/var/.htaccess b/var/.htaccess old mode 100644 new mode 100755 From d78361ee7b1ecfd207a0415f982055beceb9fa5e Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 16 Aug 2019 17:26:04 +0530 Subject: [PATCH 002/153] Admin Order - Email is Now Required - Magento 2.3 Updated --- .../Magento/Customer/etc/adminhtml/system.xml | 5 ++++ app/code/Magento/Customer/etc/config.xml | 1 + .../Adminhtml/Order/Create/Form/Account.php | 17 ++++++++++- .../Magento/Sales/Model/AdminOrder/Create.php | 28 +++++++++++++++++-- 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Customer/etc/adminhtml/system.xml b/app/code/Magento/Customer/etc/adminhtml/system.xml index 2bd1041214801..325de3680b463 100644 --- a/app/code/Magento/Customer/etc/adminhtml/system.xml +++ b/app/code/Magento/Customer/etc/adminhtml/system.xml @@ -86,6 +86,11 @@ To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes. Magento\Config\Model\Config\Source\Yesno + + + If set YES Email field will be required during Admin order creation for new Customer. + Magento\Config\Model\Config\Source\Yesno + diff --git a/app/code/Magento/Customer/etc/config.xml b/app/code/Magento/Customer/etc/config.xml index da4b80536e631..d979cf19fc5f7 100644 --- a/app/code/Magento/Customer/etc/config.xml +++ b/app/code/Magento/Customer/etc/config.xml @@ -15,6 +15,7 @@ 0 1 billing + 0 example.com general customer_create_account_email_template diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 03915c0499367..28b1cc9c80a91 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -39,6 +39,8 @@ class Account extends AbstractForm */ protected $_extensibleDataObjectConverter; + private const XML_PATH_EMAIL_REQUIRED_CREATE_ORDER = 'customer/create_account/email_required_create_order'; + /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Model\Session\Quote $sessionQuote @@ -147,7 +149,7 @@ protected function _addAdditionalFormElementData(AbstractElement $element) { switch ($element->getId()) { case 'email': - $element->setRequired(1); + $element->setRequired($this->isEmailRequiredCreateOrder()); $element->setClass('validate-email admin__control-text'); break; } @@ -204,4 +206,17 @@ private function extractValuesFromAttributes(array $attributes): array return $formValues; } + + /** + * Retrieve email is required field for admin order creation + * + * @return bool + */ + private function isEmailRequiredCreateOrder() + { + return $this->_scopeConfig->getValue( + self::XML_PATH_EMAIL_REQUIRED_CREATE_ORDER, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + } } diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php index 01f1fe850b837..211c6f75dad18 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -33,6 +33,7 @@ class Create extends \Magento\Framework\DataObject implements \Magento\Checkout\ */ const XML_PATH_DEFAULT_EMAIL_DOMAIN = 'customer/create_account/email_domain'; + private const XML_PATH_EMAIL_REQUIRED_CREATE_ORDER = 'customer/create_account/email_required_create_order'; /** * Quote session object * @@ -1369,7 +1370,7 @@ protected function _setQuoteAddress(\Magento\Quote\Model\Quote\Address $address, $data = isset($data['region']) && is_array($data['region']) ? array_merge($data, $data['region']) : $data; $addressForm = $this->_metadataFormFactory->create( - + AddressMetadataInterface::ENTITY_TYPE_ADDRESS, 'adminhtml_customer_address', $data, @@ -2037,7 +2038,30 @@ protected function _validate() */ protected function _getNewCustomerEmail() { - return $this->getData('account/email'); + $emailrequired = $this->_scopeConfig->getValue( + self::XML_PATH_EMAIL_REQUIRED_CREATE_ORDER, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + + if($emailrequired) { + return $this->getData('account/email'); + } else { + $email = $this->getData('account/email'); + if (empty($email)) { + $host = $this->_scopeConfig->getValue( + self::XML_PATH_DEFAULT_EMAIL_DOMAIN, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + $account = time(); + $email = $account . '@' . $host; + $account = $this->getData('account'); + $account['email'] = $email; + $this->setData('account', $account); + } + + return $email; + } + } /** From 078bd695742a96210b16a4e5bd45b98e8a9b0301 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Mon, 9 Sep 2019 17:46:11 +0530 Subject: [PATCH 003/153] Email field translation --- app/code/Magento/Customer/i18n/en_US.csv | 770 +++++++++--------- .../Adminhtml/Order/Create/Form/Account.php | 4 +- .../Magento/Sales/Model/AdminOrder/Create.php | 7 +- 3 files changed, 391 insertions(+), 390 deletions(-) mode change 100644 => 100755 app/code/Magento/Customer/i18n/en_US.csv mode change 100644 => 100755 app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php mode change 100644 => 100755 app/code/Magento/Sales/Model/AdminOrder/Create.php diff --git a/app/code/Magento/Customer/i18n/en_US.csv b/app/code/Magento/Customer/i18n/en_US.csv old mode 100644 new mode 100755 index 3495feb925cb3..74c30a47a835e --- a/app/code/Magento/Customer/i18n/en_US.csv +++ b/app/code/Magento/Customer/i18n/en_US.csv @@ -1,23 +1,23 @@ -"Sign Out","Sign Out" -"Sign In","Sign In" -"You are subscribed to our newsletter.","You are subscribed to our newsletter." -"You aren't subscribed to our newsletter.","You aren't subscribed to our newsletter." -"You have not set a default shipping address.","You have not set a default shipping address." -"You have not set a default billing address.","You have not set a default billing address." -"Address Book","Address Book" -"Edit Address","Edit Address" -"Add New Address","Add New Address" +Sign Out,Sign Out +Sign In,Sign In +You are subscribed to our newsletter.,You are subscribed to our newsletter. +You aren't subscribed to our newsletter.,You aren't subscribed to our newsletter. +You have not set a default shipping address.,You have not set a default shipping address. +You have not set a default billing address.,You have not set a default billing address. +Address Book,Address Book +Edit Address,Edit Address +Add New Address,Add New Address region,region -"Create Order","Create Order" -"Save Customer","Save Customer" -"Delete Customer","Delete Customer" -"Reset Password","Reset Password" -"Are you sure you want to revoke the customer's tokens?","Are you sure you want to revoke the customer's tokens?" -"Force Sign-In","Force Sign-In" -"New Customer","New Customer" -"Save and Continue Edit","Save and Continue Edit" +Create Order,Create Order +Save Customer,Save Customer +Delete Customer,Delete Customer +Reset Password,Reset Password +Are you sure you want to revoke the customer's tokens?,Are you sure you want to revoke the customer's tokens? +Force Sign-In,Force Sign-In +New Customer,New Customer +Save and Continue Edit,Save and Continue Edit Back,Back -"Please select","Please select" +Please select,Please select Reset,Reset ID,ID Product,Product @@ -28,186 +28,186 @@ Total,Total Action,Action Configure,Configure Delete,Delete -"Shopping Cart from %1","Shopping Cart from %1" +Shopping Cart from %1,Shopping Cart from %1 Newsletter,Newsletter -"Newsletter Information","Newsletter Information" -"Subscribed to Newsletter","Subscribed to Newsletter" -"Last Date Subscribed","Last Date Subscribed" -"Last Date Unsubscribed","Last Date Unsubscribed" -"No Newsletter Found","No Newsletter Found" -"Start date","Start date" -"End Date","End Date" -"Receive Date","Receive Date" +Newsletter Information,Newsletter Information +Subscribed to Newsletter,Subscribed to Newsletter +Last Date Subscribed,Last Date Subscribed +Last Date Unsubscribed,Last Date Unsubscribed +No Newsletter Found,No Newsletter Found +Start date,Start date +End Date,End Date +Receive Date,Receive Date Subject,Subject Status,Status Sent,Sent Cancel,Cancel -"Not Sent","Not Sent" +Not Sent,Not Sent Sending,Sending Paused,Paused View,View Unknown,Unknown -"Order #","Order #" +Order #,Order # Purchased,Purchased -"Bill-to Name","Bill-to Name" -"Ship-to Name","Ship-to Name" -"Order Total","Order Total" -"Purchase Point","Purchase Point" -"Customer View","Customer View" -"There are no items in customer's shopping cart.","There are no items in customer's shopping cart." +Bill-to Name,Bill-to Name +Ship-to Name,Ship-to Name +Order Total,Order Total +Purchase Point,Purchase Point +Customer View,Customer View +There are no items in customer's shopping cart.,There are no items in customer's shopping cart. Qty,Qty Confirmed,Confirmed -"Confirmation Required","Confirmation Required" -"Confirmation Not Required","Confirmation Not Required" +Confirmation Required,Confirmation Required +Confirmation Not Required,Confirmation Not Required Indeterminate,Indeterminate -"The customer does not have default billing address.","The customer does not have default billing address." +The customer does not have default billing address.,The customer does not have default billing address. Offline,Offline Online,Online Never,Never Unlocked,Unlocked Locked,Locked -"Deleted Stores","Deleted Stores" -"Add Locale","Add Locale" -"Add Date","Add Date" -"Days in Wish List","Days in Wish List" +Deleted Stores,Deleted Stores +Add Locale,Add Locale +Add Date,Add Date +Days in Wish List,Days in Wish List Unlock,Unlock No,No Yes,Yes -"Delete File","Delete File" +Delete File,Delete File Download,Download -"Delete Image","Delete Image" -"View Full Size","View Full Size" -"All countries","All countries" -"Customer Groups","Customer Groups" -"Add New Customer Group","Add New Customer Group" -"Save Customer Group","Save Customer Group" -"Delete Customer Group","Delete Customer Group" -"New Customer Group","New Customer Group" +Delete Image,Delete Image +View Full Size,View Full Size +All countries,All countries +Customer Groups,Customer Groups +Add New Customer Group,Add New Customer Group +Save Customer Group,Save Customer Group +Delete Customer Group,Delete Customer Group +New Customer Group,New Customer Group "Edit Customer Group ""%1""","Edit Customer Group ""%1""" -"Group Information","Group Information" -"Group Name","Group Name" -"Maximum length must be less then %1 characters.","Maximum length must be less then %1 characters." -"Tax Class","Tax Class" -"The customer is now assigned to Customer Group %s.","The customer is now assigned to Customer Group %s." -"Would you like to change the Customer Group for this order?","Would you like to change the Customer Group for this order?" -"The VAT ID is valid.","The VAT ID is valid." -"The VAT ID entered (%s) is not a valid VAT ID.","The VAT ID entered (%s) is not a valid VAT ID." -"The VAT ID is valid. The current Customer Group will be used.","The VAT ID is valid. The current Customer Group will be used." -"The VAT ID is valid but no Customer Group is assigned for it.","The VAT ID is valid but no Customer Group is assigned for it." +Group Information,Group Information +Group Name,Group Name +Maximum length must be less then %1 characters.,Maximum length must be less then %1 characters. +Tax Class,Tax Class +The customer is now assigned to Customer Group %s.,The customer is now assigned to Customer Group %s. +Would you like to change the Customer Group for this order?,Would you like to change the Customer Group for this order? +The VAT ID is valid.,The VAT ID is valid. +The VAT ID entered (%s) is not a valid VAT ID.,The VAT ID entered (%s) is not a valid VAT ID. +The VAT ID is valid. The current Customer Group will be used.,The VAT ID is valid. The current Customer Group will be used. +The VAT ID is valid but no Customer Group is assigned for it.,The VAT ID is valid but no Customer Group is assigned for it. "Based on the VAT ID, the customer belongs to the Customer Group %s.","Based on the VAT ID, the customer belongs to the Customer Group %s." -"Something went wrong while validating the VAT ID.","Something went wrong while validating the VAT ID." -"The customer would belong to Customer Group %s.","The customer would belong to Customer Group %s." -"There was an error detecting Customer Group.","There was an error detecting Customer Group." -"Validate VAT Number","Validate VAT Number" -"Customer Login","Customer Login" -"Create New Customer Account","Create New Customer Account" -"Date of Birth","Date of Birth" -"Bad request.","Bad request." -"This confirmation key is invalid or has expired.","This confirmation key is invalid or has expired." -"There was an error confirming the account","There was an error confirming the account" +Something went wrong while validating the VAT ID.,Something went wrong while validating the VAT ID. +The customer would belong to Customer Group %s.,The customer would belong to Customer Group %s. +There was an error detecting Customer Group.,There was an error detecting Customer Group. +Validate VAT Number,Validate VAT Number +Customer Login,Customer Login +Create New Customer Account,Create New Customer Account +Date of Birth,Date of Birth +Bad request.,Bad request. +This confirmation key is invalid or has expired.,This confirmation key is invalid or has expired. +There was an error confirming the account,There was an error confirming the account "If you are a registered VAT customer, please click here to enter your shipping address for proper VAT calculation.","If you are a registered VAT customer, please click here to enter your shipping address for proper VAT calculation." "If you are a registered VAT customer, please click here to enter your billing address for proper VAT calculation.","If you are a registered VAT customer, please click here to enter your billing address for proper VAT calculation." -"Thank you for registering with %1.","Thank you for registering with %1." -"Please check your email for confirmation key.","Please check your email for confirmation key." -"This email does not require confirmation.","This email does not require confirmation." -"Wrong email.","Wrong email." -"Your password reset link has expired.","Your password reset link has expired." +Thank you for registering with %1.,Thank you for registering with %1. +Please check your email for confirmation key.,Please check your email for confirmation key. +This email does not require confirmation.,This email does not require confirmation. +Wrong email.,Wrong email. +Your password reset link has expired.,Your password reset link has expired. "You must confirm your account. Please check your email for the confirmation link or click here for a new link.","You must confirm your account. Please check your email for the confirmation link or click here for a new link." "There is already an account with this email address. If you are sure that it is your email address, click here to get your password and access your account.","There is already an account with this email address. If you are sure that it is your email address, click here to get your password and access your account." -"We can't save the customer.","We can't save the customer." -"Please make sure your passwords match.","Please make sure your passwords match." +We can't save the customer.,We can't save the customer. +Please make sure your passwords match.,Please make sure your passwords match. "If you are a registered VAT customer, please click here to enter your shipping address for proper VAT calculation.","If you are a registered VAT customer, please click here to enter your shipping address for proper VAT calculation." "If you are a registered VAT customer, please click here to enter your billing address for proper VAT calculation.","If you are a registered VAT customer, please click here to enter your billing address for proper VAT calculation." -"Account Information","Account Information" -"You saved the account information.","You saved the account information." -"You did not sign in correctly or your account is temporarily disabled.","You did not sign in correctly or your account is temporarily disabled." -"Password confirmation doesn't match entered password.","Password confirmation doesn't match entered password." -"The password doesn't match this account.","The password doesn't match this account." -"Please correct the email address.","Please correct the email address." -"We're unable to send the password reset email.","We're unable to send the password reset email." -"Please enter your email.","Please enter your email." -"If there is an account associated with %1 you will receive an email with a link to reset your password.","If there is an account associated with %1 you will receive an email with a link to reset your password." -"My Account","My Account" +Account Information,Account Information +You saved the account information.,You saved the account information. +You did not sign in correctly or your account is temporarily disabled.,You did not sign in correctly or your account is temporarily disabled. +Password confirmation doesn't match entered password.,Password confirmation doesn't match entered password. +The password doesn't match this account.,The password doesn't match this account. +Please correct the email address.,Please correct the email address. +We're unable to send the password reset email.,We're unable to send the password reset email. +Please enter your email.,Please enter your email. +If there is an account associated with %1 you will receive an email with a link to reset your password.,If there is an account associated with %1 you will receive an email with a link to reset your password. +My Account,My Account "This account is not confirmed. Click here to resend confirmation email.","This account is not confirmed. Click here to resend confirmation email." -"An unspecified error occurred. Please contact us for assistance.","An unspecified error occurred. Please contact us for assistance." -"A login and a password are required.","A login and a password are required." -"New Password and Confirm New Password values didn't match.","New Password and Confirm New Password values didn't match." -"Please enter a new password.","Please enter a new password." -"You updated your password.","You updated your password." -"Something went wrong while saving the new password.","Something went wrong while saving the new password." -"You deleted the address.","You deleted the address." -"We can't delete the address right now.","We can't delete the address right now." -"You saved the address.","You saved the address." -"We can't save the address.","We can't save the address." -"No customer ID defined.","No customer ID defined." -"Please correct the quote items and try again.","Please correct the quote items and try again." -"You have revoked the customer's tokens.","You have revoked the customer's tokens." -"We can't find a customer to revoke.","We can't find a customer to revoke." -"Something went wrong while saving file.","Something went wrong while saving file." -"You deleted the customer group.","You deleted the customer group." -"The customer group no longer exists.","The customer group no longer exists." +An unspecified error occurred. Please contact us for assistance.,An unspecified error occurred. Please contact us for assistance. +A login and a password are required.,A login and a password are required. +New Password and Confirm New Password values didn't match.,New Password and Confirm New Password values didn't match. +Please enter a new password.,Please enter a new password. +You updated your password.,You updated your password. +Something went wrong while saving the new password.,Something went wrong while saving the new password. +You deleted the address.,You deleted the address. +We can't delete the address right now.,We can't delete the address right now. +You saved the address.,You saved the address. +We can't save the address.,We can't save the address. +No customer ID defined.,No customer ID defined. +Please correct the quote items and try again.,Please correct the quote items and try again. +You have revoked the customer's tokens.,You have revoked the customer's tokens. +We can't find a customer to revoke.,We can't find a customer to revoke. +Something went wrong while saving file.,Something went wrong while saving file. +You deleted the customer group.,You deleted the customer group. +The customer group no longer exists.,The customer group no longer exists. Customers,Customers -"New Group","New Group" -"New Customer Groups","New Customer Groups" -"Edit Group","Edit Group" -"Edit Customer Groups","Edit Customer Groups" -"You saved the customer group.","You saved the customer group." -"Please select customer(s).","Please select customer(s)." -"Customer could not be deleted.","Customer could not be deleted." -"You deleted the customer.","You deleted the customer." -"Something went wrong while editing the customer.","Something went wrong while editing the customer." -"Manage Customers","Manage Customers" -"Please correct the data sent.","Please correct the data sent." -"A total of %1 record(s) were updated.","A total of %1 record(s) were updated." -"A total of %1 record(s) were deleted.","A total of %1 record(s) were deleted." -"The customer will receive an email with a link to reset password.","The customer will receive an email with a link to reset password." -"Something went wrong while resetting customer password.","Something went wrong while resetting customer password." -"You saved the customer.","You saved the customer." -"Something went wrong while saving the customer.","Something went wrong while saving the customer." -"Page not found.","Page not found." -"Customer has been unlocked successfully.","Customer has been unlocked successfully." -"Online Customers","Online Customers" -"Customers Now Online","Customers Now Online" -"Please define Wish List item ID.","Please define Wish List item ID." -"Please load Wish List item.","Please load Wish List item." -"Login successful.","Login successful." -"Invalid login or password.","Invalid login or password." +New Group,New Group +New Customer Groups,New Customer Groups +Edit Group,Edit Group +Edit Customer Groups,Edit Customer Groups +You saved the customer group.,You saved the customer group. +Please select customer(s).,Please select customer(s). +Customer could not be deleted.,Customer could not be deleted. +You deleted the customer.,You deleted the customer. +Something went wrong while editing the customer.,Something went wrong while editing the customer. +Manage Customers,Manage Customers +Please correct the data sent.,Please correct the data sent. +A total of %1 record(s) were updated.,A total of %1 record(s) were updated. +A total of %1 record(s) were deleted.,A total of %1 record(s) were deleted. +The customer will receive an email with a link to reset password.,The customer will receive an email with a link to reset password. +Something went wrong while resetting customer password.,Something went wrong while resetting customer password. +You saved the customer.,You saved the customer. +Something went wrong while saving the customer.,Something went wrong while saving the customer. +Page not found.,Page not found. +Customer has been unlocked successfully.,Customer has been unlocked successfully. +Online Customers,Online Customers +Customers Now Online,Customers Now Online +Please define Wish List item ID.,Please define Wish List item ID. +Please load Wish List item.,Please load Wish List item. +Login successful.,Login successful. +Invalid login or password.,Invalid login or password. """%1"" section source is not supported","""%1"" section source is not supported" -"%1 doesn't extend \Magento\Customer\CustomerData\SectionSourceInterface","%1 doesn't extend \Magento\Customer\CustomerData\SectionSourceInterface" -"No confirmation needed.","No confirmation needed." -"Account already active","Account already active" -"Invalid confirmation token","Invalid confirmation token" -"The account is locked.","The account is locked." -"This account is not confirmed.","This account is not confirmed." +%1 doesn't extend \Magento\Customer\CustomerData\SectionSourceInterface,%1 doesn't extend \Magento\Customer\CustomerData\SectionSourceInterface +No confirmation needed.,No confirmation needed. +Account already active,Account already active +Invalid confirmation token,Invalid confirmation token +The account is locked.,The account is locked. +This account is not confirmed.,This account is not confirmed. "Invalid value of ""%value"" provided for the %fieldName field.","Invalid value of ""%value"" provided for the %fieldName field." -"Please enter a password with at most %1 characters.","Please enter a password with at most %1 characters." -"Please enter a password with at least %1 characters.","Please enter a password with at least %1 characters." -"The password can't begin or end with a space.","The password can't begin or end with a space." +Please enter a password with at most %1 characters.,Please enter a password with at most %1 characters. +Please enter a password with at least %1 characters.,Please enter a password with at least %1 characters. +The password can't begin or end with a space.,The password can't begin or end with a space. "Minimum of different classes of characters in password is %1. Classes of characters: Lower Case, Upper Case, Digits, Special Characters.","Minimum of different classes of characters in password is %1. Classes of characters: Lower Case, Upper Case, Digits, Special Characters." -"Password cannot be the same as email address.","Password cannot be the same as email address." -"This customer already exists in this store.","This customer already exists in this store." -"A customer with the same email already exists in an associated website.","A customer with the same email already exists in an associated website." -"%fieldName is a required field.","%fieldName is a required field." -"Reset password token mismatch.","Reset password token mismatch." -"Reset password token expired.","Reset password token expired." -"Please correct the transactional account email type.","Please correct the transactional account email type." +Password cannot be the same as email address.,Password cannot be the same as email address. +This customer already exists in this store.,This customer already exists in this store. +A customer with the same email already exists in an associated website.,A customer with the same email already exists in an associated website. +%fieldName is a required field.,%fieldName is a required field. +Reset password token mismatch.,Reset password token mismatch. +Reset password token expired.,Reset password token expired. +Please correct the transactional account email type.,Please correct the transactional account email type. """%1"" is a required value.","""%1"" is a required value." Global,Global -"Per Website","Per Website" -"We can't share customer accounts globally when the accounts share identical email addresses on more than one website.","We can't share customer accounts globally when the accounts share identical email addresses on more than one website." -"Billing Address","Billing Address" -"Shipping Address","Shipping Address" -"-- Please Select --","-- Please Select --" -"Please enter a valid password reset token.","Please enter a valid password reset token." -"The password can not begin or end with a space.","The password can not begin or end with a space." +Per Website,Per Website +We can't share customer accounts globally when the accounts share identical email addresses on more than one website.,We can't share customer accounts globally when the accounts share identical email addresses on more than one website. +Billing Address,Billing Address +Shipping Address,Shipping Address +-- Please Select --,-- Please Select -- +Please enter a valid password reset token.,Please enter a valid password reset token. +The password can not begin or end with a space.,The password can not begin or end with a space. Admin,Admin -"ALL GROUPS","ALL GROUPS" +ALL GROUPS,ALL GROUPS "No such entity with %fieldName = %fieldValue, %field2Name = %field2Value","No such entity with %fieldName = %fieldValue, %field2Name = %field2Value" -"File can not be saved to the destination folder.","File can not be saved to the destination folder." -"Unable to create directory %1.","Unable to create directory %1." -"Destination folder is not writable or does not exists.","Destination folder is not writable or does not exists." -"Something went wrong while saving the file.","Something went wrong while saving the file." -"Attribute object is undefined","Attribute object is undefined" +File can not be saved to the destination folder.,File can not be saved to the destination folder. +Unable to create directory %1.,Unable to create directory %1. +Destination folder is not writable or does not exists.,Destination folder is not writable or does not exists. +Something went wrong while saving the file.,Something went wrong while saving the file. +Attribute object is undefined,Attribute object is undefined """%1"" invalid type entered.","""%1"" invalid type entered." """%1"" contains non-alphabetic or non-numeric characters.","""%1"" contains non-alphabetic or non-numeric characters." """%1"" is an empty string.","""%1"" is an empty string." @@ -217,19 +217,19 @@ Admin,Admin """%1"" is not a valid hostname.","""%1"" is not a valid hostname." """%1"" uses too many characters.","""%1"" uses too many characters." "'%value%' looks like an IP address, which is not an acceptable format.","'%value%' looks like an IP address, which is not an acceptable format." -"'%value%' looks like a DNS hostname but we cannot match the TLD against known list.","'%value%' looks like a DNS hostname but we cannot match the TLD against known list." -"'%value%' looks like a DNS hostname but contains a dash in an invalid position.","'%value%' looks like a DNS hostname but contains a dash in an invalid position." -"'%value%' looks like a DNS hostname but we cannot match it against the hostname schema for TLD '%tld%'.","'%value%' looks like a DNS hostname but we cannot match it against the hostname schema for TLD '%tld%'." -"'%value%' looks like a DNS hostname but cannot extract TLD part.","'%value%' looks like a DNS hostname but cannot extract TLD part." -"'%value%' does not look like a valid local network name.","'%value%' does not look like a valid local network name." +'%value%' looks like a DNS hostname but we cannot match the TLD against known list.,'%value%' looks like a DNS hostname but we cannot match the TLD against known list. +'%value%' looks like a DNS hostname but contains a dash in an invalid position.,'%value%' looks like a DNS hostname but contains a dash in an invalid position. +'%value%' looks like a DNS hostname but we cannot match it against the hostname schema for TLD '%tld%'.,'%value%' looks like a DNS hostname but we cannot match it against the hostname schema for TLD '%tld%'. +'%value%' looks like a DNS hostname but cannot extract TLD part.,'%value%' looks like a DNS hostname but cannot extract TLD part. +'%value%' does not look like a valid local network name.,'%value%' does not look like a valid local network name. "'%value%' looks like a local network name, which is not an acceptable format.","'%value%' looks like a local network name, which is not an acceptable format." "'%value%' appears to be a DNS hostname, but the given punycode notation cannot be decoded.","'%value%' appears to be a DNS hostname, but the given punycode notation cannot be decoded." """%1"" is not a valid URL.","""%1"" is not a valid URL." """%1"" is not a valid date.","""%1"" is not a valid date." """%1"" does not fit the entered date format.","""%1"" does not fit the entered date format." -"Please enter a valid date between %1 and %2 at %3.","Please enter a valid date between %1 and %2 at %3." -"Please enter a valid date equal to or greater than %1 at %2.","Please enter a valid date equal to or greater than %1 at %2." -"Please enter a valid date less than or equal to %1 at %2.","Please enter a valid date less than or equal to %1 at %2." +Please enter a valid date between %1 and %2 at %3.,Please enter a valid date between %1 and %2 at %3. +Please enter a valid date equal to or greater than %1 at %2.,Please enter a valid date equal to or greater than %1 at %2. +Please enter a valid date less than or equal to %1 at %2.,Please enter a valid date less than or equal to %1 at %2. """%1"" is not a valid file extension.","""%1"" is not a valid file extension." """%1"" is not a valid file.","""%1"" is not a valid file." """%1"" exceeds the allowed file size.","""%1"" exceeds the allowed file size." @@ -239,203 +239,203 @@ Admin,Admin """%1"" length must be equal or greater than %2 characters.","""%1"" length must be equal or greater than %2 characters." """%1"" length must be equal or less than %2 characters.","""%1"" length must be equal or less than %2 characters." label,label -"Please enter a customer email.","Please enter a customer email." -"A customer website ID must be specified when using the website scope.","A customer website ID must be specified when using the website scope." -"Customer Group","Customer Group" +Please enter a customer email.,Please enter a customer email. +A customer website ID must be specified when using the website scope.,A customer website ID must be specified when using the website scope. +Customer Group,Customer Group "You can't delete group ""%1"".","You can't delete group ""%1""." -"Customer Group already exists.","Customer Group already exists." -"Cannot delete group.","Cannot delete group." -"Error during VAT Number verification.","Error during VAT Number verification." -"PHP SOAP extension is required.","PHP SOAP extension is required." -"VAT Number is valid.","VAT Number is valid." -"Please enter a valid VAT number.","Please enter a valid VAT number." -"Your VAT ID was successfully validated.","Your VAT ID was successfully validated." -"You will be charged tax.","You will be charged tax." -"You will not be charged tax.","You will not be charged tax." -"The VAT ID entered (%1) is not a valid VAT ID.","The VAT ID entered (%1) is not a valid VAT ID." -"Your Tax ID cannot be validated.","Your Tax ID cannot be validated." +Customer Group already exists.,Customer Group already exists. +Cannot delete group.,Cannot delete group. +Error during VAT Number verification.,Error during VAT Number verification. +PHP SOAP extension is required.,PHP SOAP extension is required. +VAT Number is valid.,VAT Number is valid. +Please enter a valid VAT number.,Please enter a valid VAT number. +Your VAT ID was successfully validated.,Your VAT ID was successfully validated. +You will be charged tax.,You will be charged tax. +You will not be charged tax.,You will not be charged tax. +The VAT ID entered (%1) is not a valid VAT ID.,The VAT ID entered (%1) is not a valid VAT ID. +Your Tax ID cannot be validated.,Your Tax ID cannot be validated. "If you believe this is an error, please contact us at %1","If you believe this is an error, please contact us at %1" -"No such entity with %fieldName = %fieldValue","No such entity with %fieldName = %fieldValue" +No such entity with %fieldName = %fieldValue,No such entity with %fieldName = %fieldValue Male,Male Female,Female -"Not Specified","Not Specified" -"Thank you for registering with","Thank you for registering with" -"enter your billing address for proper VAT calculation","enter your billing address for proper VAT calculation" -"enter your shipping address for proper VAT calculation","enter your shipping address for proper VAT calculation" -"Please enter new password.","Please enter new password." +Not Specified,Not Specified +Thank you for registering with,Thank you for registering with +enter your billing address for proper VAT calculation,enter your billing address for proper VAT calculation +enter your shipping address for proper VAT calculation,enter your shipping address for proper VAT calculation +Please enter new password.,Please enter new password. message,message NoSuchEntityException,NoSuchEntityException Exception,Exception InputException.,InputException. InputException,InputException -"Exception message","Exception message" -"Validator Exception","Validator Exception" -"Localized Exception","Localized Exception" -"some error","some error" +Exception message,Exception message +Validator Exception,Validator Exception +Localized Exception,Localized Exception +some error,some error frontend_label,frontend_label -"NOT LOGGED IN","NOT LOGGED IN" -"Please enter the state/province.","Please enter the state/province." -"region is a required field.","region is a required field." -"regionId is a required field.","regionId is a required field." +NOT LOGGED IN,NOT LOGGED IN +Please enter the state/province.,Please enter the state/province. +region is a required field.,region is a required field. +regionId is a required field.,regionId is a required field. Label,Label Select...,Select... Edit,Edit Visitor,Visitor Customer,Customer -"No item specified.","No item specified." -"Are you sure you want to remove this item?","Are you sure you want to remove this item?" -"Personal Information","Personal Information" -"Last Logged In:","Last Logged In:" -"Last Logged In (%1):","Last Logged In (%1):" -"Account Lock:","Account Lock:" -"Confirmed email:","Confirmed email:" -"Account Created:","Account Created:" -"Account Created on (%1):","Account Created on (%1):" -"Account Created in:","Account Created in:" -"Customer Group:","Customer Group:" -"Default Billing Address","Default Billing Address" -"Sales Statistics","Sales Statistics" -"Web Site","Web Site" +No item specified.,No item specified. +Are you sure you want to remove this item?,Are you sure you want to remove this item? +Personal Information,Personal Information +Last Logged In:,Last Logged In: +Last Logged In (%1):,Last Logged In (%1): +Account Lock:,Account Lock: +Confirmed email:,Confirmed email: +Account Created:,Account Created: +Account Created on (%1):,Account Created on (%1): +Account Created in:,Account Created in: +Customer Group:,Customer Group: +Default Billing Address,Default Billing Address +Sales Statistics,Sales Statistics +Web Site,Web Site Store,Store -"Store View","Store View" -"Lifetime Sales","Lifetime Sales" -"Average Sale","Average Sale" -"All Store Views","All Store Views" +Store View,Store View +Lifetime Sales,Lifetime Sales +Average Sale,Average Sale +All Store Views,All Store Views Change,Change -"Manage Addresses","Manage Addresses" -"Default Shipping Address","Default Shipping Address" -"Contact Information","Contact Information" -"Change Password","Change Password" +Manage Addresses,Manage Addresses +Default Shipping Address,Default Shipping Address +Contact Information,Contact Information +Change Password,Change Password Newsletters,Newsletters "You are subscribed to ""General Subscription"".","You are subscribed to ""General Subscription""." or,or -"Default Addresses","Default Addresses" -"Change Billing Address","Change Billing Address" -"You have no default billing address in your address book.","You have no default billing address in your address book." -"Change Shipping Address","Change Shipping Address" -"You have no default shipping address in your address book.","You have no default shipping address in your address book." -"Additional Address Entries","Additional Address Entries" -"Delete Address","Delete Address" -"You have no other address entries in your address book.","You have no other address entries in your address book." -"* Required Fields","* Required Fields" +Default Addresses,Default Addresses +Change Billing Address,Change Billing Address +You have no default billing address in your address book.,You have no default billing address in your address book. +Change Shipping Address,Change Shipping Address +You have no default shipping address in your address book.,You have no default shipping address in your address book. +Additional Address Entries,Additional Address Entries +Delete Address,Delete Address +You have no other address entries in your address book.,You have no other address entries in your address book. +* Required Fields,* Required Fields Address,Address -"Street Address","Street Address" -"Street Address %1","Street Address %1" -"VAT Number","VAT Number" +Street Address,Street Address +Street Address %1,Street Address %1 +VAT Number,VAT Number City,City State/Province,State/Province "Please select a region, state or province.","Please select a region, state or province." -"Zip/Postal Code","Zip/Postal Code" +Zip/Postal Code,Zip/Postal Code Country,Country -"It's a default billing address.","It's a default billing address." -"Use as my default billing address","Use as my default billing address" -"It's a default shipping address.","It's a default shipping address." -"Use as my default shipping address","Use as my default shipping address" -"Save Address","Save Address" -"Go back","Go back" -"Please enter your email below and we will send you the confirmation link.","Please enter your email below and we will send you the confirmation link." +It's a default billing address.,It's a default billing address. +Use as my default billing address,Use as my default billing address +It's a default shipping address.,It's a default shipping address. +Use as my default shipping address,Use as my default shipping address +Save Address,Save Address +Go back,Go back +Please enter your email below and we will send you the confirmation link.,Please enter your email below and we will send you the confirmation link. Email,Email -"Send confirmation link","Send confirmation link" -"Back to Sign In","Back to Sign In" -"Change Email","Change Email" -"Change Email and Password","Change Email and Password" -"Current Password","Current Password" -"New Password","New Password" -"Password Strength","Password Strength" -"No Password","No Password" -"Confirm New Password","Confirm New Password" +Send confirmation link,Send confirmation link +Back to Sign In,Back to Sign In +Change Email,Change Email +Change Email and Password,Change Email and Password +Current Password,Current Password +New Password,New Password +Password Strength,Password Strength +No Password,No Password +Confirm New Password,Confirm New Password Save,Save -"Please enter your email address below to receive a password reset link.","Please enter your email address below to receive a password reset link." -"Reset My Password","Reset My Password" -"Registered Customers","Registered Customers" +Please enter your email address below to receive a password reset link.,Please enter your email address below to receive a password reset link. +Reset My Password,Reset My Password +Registered Customers,Registered Customers "If you have an account, sign in with your email address.","If you have an account, sign in with your email address." Password,Password -"Forgot Your Password?","Forgot Your Password?" -"Subscription option","Subscription option" -"General Subscription","General Subscription" -"Sign Up for Newsletter","Sign Up for Newsletter" -"Address Information","Address Information" -"Sign-in Information","Sign-in Information" -"Confirm Password","Confirm Password" -"Create an Account","Create an Account" -"Set a New Password","Set a New Password" -"You have signed out and will go to our homepage in 5 seconds.","You have signed out and will go to our homepage in 5 seconds." -"New Customers","New Customers" +Forgot Your Password?,Forgot Your Password? +Subscription option,Subscription option +General Subscription,General Subscription +Sign Up for Newsletter,Sign Up for Newsletter +Address Information,Address Information +Sign-in Information,Sign-in Information +Confirm Password,Confirm Password +Create an Account,Create an Account +Set a New Password,Set a New Password +You have signed out and will go to our homepage in 5 seconds.,You have signed out and will go to our homepage in 5 seconds. +New Customers,New Customers "Creating an account has many benefits: check out faster, keep more than one address, track orders and more.","Creating an account has many benefits: check out faster, keep more than one address, track orders and more." Company,Company Fax,Fax Gender,Gender Name,Name -"Tax/VAT number","Tax/VAT number" -"Phone Number","Phone Number" -"Welcome to %store_name","Welcome to %store_name" +Tax/VAT number,Tax/VAT number +Phone Number,Phone Number +Welcome to %store_name,Welcome to %store_name "%name,","%name," -"Welcome to %store_name.","Welcome to %store_name." +Welcome to %store_name.,Welcome to %store_name. "To sign in to our site, use these credentials during checkout or on the My Account page:","To sign in to our site, use these credentials during checkout or on the My Account page:" Email:,Email: Password:,Password: -"Password you set when creating account","Password you set when creating account" +Password you set when creating account,Password you set when creating account "Forgot your account password? Click here to reset it.","Forgot your account password? Click here to reset it." "When you sign in to your account, you will be able to:","When you sign in to your account, you will be able to:" -"Proceed through checkout faster","Proceed through checkout faster" -"Check the status of orders","Check the status of orders" -"View past orders","View past orders" -"Store alternative addresses (for shipping to multiple family members and friends)","Store alternative addresses (for shipping to multiple family members and friends)" -"Please confirm your %store_name account","Please confirm your %store_name account" -"You must confirm your %customer_email email before you can sign in (link is only valid once):","You must confirm your %customer_email email before you can sign in (link is only valid once):" -"Confirm Your Account","Confirm Your Account" -"Thank you for confirming your %store_name account.","Thank you for confirming your %store_name account." +Proceed through checkout faster,Proceed through checkout faster +Check the status of orders,Check the status of orders +View past orders,View past orders +Store alternative addresses (for shipping to multiple family members and friends),Store alternative addresses (for shipping to multiple family members and friends) +Please confirm your %store_name account,Please confirm your %store_name account +You must confirm your %customer_email email before you can sign in (link is only valid once):,You must confirm your %customer_email email before you can sign in (link is only valid once): +Confirm Your Account,Confirm Your Account +Thank you for confirming your %store_name account.,Thank you for confirming your %store_name account. "To sign in to our site and set a password, click on the link:","To sign in to our site and set a password, click on the link:" -"Your %store_name email has been changed","Your %store_name email has been changed" +Your %store_name email has been changed,Your %store_name email has been changed "Hello,","Hello," -"We have received a request to change the following information associated with your account at %store_name: email.","We have received a request to change the following information associated with your account at %store_name: email." +We have received a request to change the following information associated with your account at %store_name: email.,We have received a request to change the following information associated with your account at %store_name: email. "If you have not authorized this action, please contact us immediately at %store_email","If you have not authorized this action, please contact us immediately at %store_email" "or call us at %store_phone","or call us at %store_phone" "Thanks,
%store_name","Thanks,
%store_name" -"Your %store_name email and password has been changed","Your %store_name email and password has been changed" +Your %store_name email and password has been changed,Your %store_name email and password has been changed "We have received a request to change the following information associated with your account at %store_name: email, password.","We have received a request to change the following information associated with your account at %store_name: email, password." -"Reset your %store_name password","Reset your %store_name password" -"There was recently a request to change the password for your account.","There was recently a request to change the password for your account." +Reset your %store_name password,Reset your %store_name password +There was recently a request to change the password for your account.,There was recently a request to change the password for your account. "If you requested this change, set a new password here:","If you requested this change, set a new password here:" "If you did not make this request, you can ignore this email and your password will remain the same.","If you did not make this request, you can ignore this email and your password will remain the same." -"Your %store_name password has been changed","Your %store_name password has been changed" -"We have received a request to change the following information associated with your account at %store_name: password.","We have received a request to change the following information associated with your account at %store_name: password." -"Checkout as a new customer","Checkout as a new customer" -"Creating an account has many benefits:","Creating an account has many benefits:" -"See order and shipping status","See order and shipping status" -"Track order history","Track order history" -"Check out faster","Check out faster" -"Checkout using your account","Checkout using your account" -"Email Address","Email Address" -"Are you sure you want to do this?","Are you sure you want to do this?" -"Are you sure you want to delete this address?","Are you sure you want to delete this address?" +Your %store_name password has been changed,Your %store_name password has been changed +We have received a request to change the following information associated with your account at %store_name: password.,We have received a request to change the following information associated with your account at %store_name: password. +Checkout as a new customer,Checkout as a new customer +Creating an account has many benefits:,Creating an account has many benefits: +See order and shipping status,See order and shipping status +Track order history,Track order history +Check out faster,Check out faster +Checkout using your account,Checkout using your account +Email Address,Email Address +Are you sure you want to do this?,Are you sure you want to do this? +Are you sure you want to delete this address?,Are you sure you want to delete this address? Weak,Weak Medium,Medium Strong,Strong -"Very Strong","Very Strong" -"Guest checkout is disabled.","Guest checkout is disabled." -"All Customers","All Customers" -"Now Online","Now Online" -"Customers Section","Customers Section" -"Customer Configuration","Customer Configuration" -"Account Sharing Options","Account Sharing Options" -"Share Customer Accounts","Share Customer Accounts" -"Create New Account Options","Create New Account Options" -"Enable Automatic Assignment to Customer Group","Enable Automatic Assignment to Customer Group" -"Tax Calculation Based On","Tax Calculation Based On" -"Default Group","Default Group" -"Group for Valid VAT ID - Domestic","Group for Valid VAT ID - Domestic" -"Group for Valid VAT ID - Intra-Union","Group for Valid VAT ID - Intra-Union" -"Group for Invalid VAT ID","Group for Invalid VAT ID" -"Validation Error Group","Validation Error Group" -"Validate on Each Transaction","Validate on Each Transaction" -"Default Value for Disable Automatic Group Changes Based on VAT ID","Default Value for Disable Automatic Group Changes Based on VAT ID" -"Show VAT Number on Storefront","Show VAT Number on Storefront" +Very Strong,Very Strong +Guest checkout is disabled.,Guest checkout is disabled. +All Customers,All Customers +Now Online,Now Online +Customers Section,Customers Section +Customer Configuration,Customer Configuration +Account Sharing Options,Account Sharing Options +Share Customer Accounts,Share Customer Accounts +Create New Account Options,Create New Account Options +Enable Automatic Assignment to Customer Group,Enable Automatic Assignment to Customer Group +Tax Calculation Based On,Tax Calculation Based On +Default Group,Default Group +Group for Valid VAT ID - Domestic,Group for Valid VAT ID - Domestic +Group for Valid VAT ID - Intra-Union,Group for Valid VAT ID - Intra-Union +Group for Invalid VAT ID,Group for Invalid VAT ID +Validation Error Group,Validation Error Group +Validate on Each Transaction,Validate on Each Transaction +Default Value for Disable Automatic Group Changes Based on VAT ID,Default Value for Disable Automatic Group Changes Based on VAT ID +Show VAT Number on Storefront,Show VAT Number on Storefront "To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes.","To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes." -"Default Email Domain","Default Email Domain" -"Default Welcome Email","Default Welcome Email" +Default Email Domain,Default Email Domain +Default Welcome Email,Default Welcome Email "Email template chosen based on theme fallback when ""Default"" option is selected.","Email template chosen based on theme fallback when ""Default"" option is selected." -"Default Welcome Email Without Password","Default Welcome Email Without Password" +Default Welcome Email Without Password,Default Welcome Email Without Password " This email will be sent instead of the Default Welcome Email, if a customer was created without password.

Email template chosen based on theme fallback when ""Default"" option is selected. @@ -443,10 +443,10 @@ Strong,Strong This email will be sent instead of the Default Welcome Email, if a customer was created without password.

Email template chosen based on theme fallback when ""Default"" option is selected. " -"Email Sender","Email Sender" -"Require Emails Confirmation","Require Emails Confirmation" -"Confirmation Link Email","Confirmation Link Email" -"Welcome Email","Welcome Email" +Email Sender,Email Sender +Require Emails Confirmation,Require Emails Confirmation +Confirmation Link Email,Confirmation Link Email +Welcome Email,Welcome Email " This email will be sent instead of the Default Welcome Email, after account confirmation.

Email template chosen based on theme fallback when ""Default"" option is selected. @@ -454,88 +454,90 @@ Strong,Strong This email will be sent instead of the Default Welcome Email, after account confirmation.

Email template chosen based on theme fallback when ""Default"" option is selected. " -"Generate Human-Friendly Customer ID","Generate Human-Friendly Customer ID" -"Password Options","Password Options" -"Forgot Email Template","Forgot Email Template" -"Remind Email Template","Remind Email Template" -"Reset Password Template","Reset Password Template" -"Password Template Email Sender","Password Template Email Sender" -"Recovery Link Expiration Period (hours)","Recovery Link Expiration Period (hours)" -"Please enter a number 1 or greater in this field.","Please enter a number 1 or greater in this field." -"Number of Required Character Classes","Number of Required Character Classes" +Generate Human-Friendly Customer ID,Generate Human-Friendly Customer ID +Password Options,Password Options +Forgot Email Template,Forgot Email Template +Remind Email Template,Remind Email Template +Reset Password Template,Reset Password Template +Password Template Email Sender,Password Template Email Sender +Recovery Link Expiration Period (hours),Recovery Link Expiration Period (hours) +Please enter a number 1 or greater in this field.,Please enter a number 1 or greater in this field. +Number of Required Character Classes,Number of Required Character Classes "Number of different character classes required in password: Lowercase, Uppercase, Digits, Special Characters.","Number of different character classes required in password: Lowercase, Uppercase, Digits, Special Characters." -"Minimum Password Length","Minimum Password Length" -"Maximum Login Failures to Lockout Account","Maximum Login Failures to Lockout Account" -"Use 0 to disable account locking.","Use 0 to disable account locking." -"Lockout Time (minutes)","Lockout Time (minutes)" -"Enable Autocomplete on login/forgot password forms","Enable Autocomplete on login/forgot password forms" -"Account Information Options","Account Information Options" -"Change Email Template","Change Email Template" -"Change Email and Password Template","Change Email and Password Template" -"Name and Address Options","Name and Address Options" -"Number of Lines in a Street Address","Number of Lines in a Street Address" -"Leave empty for default (2). Valid range: 1-4","Leave empty for default (2). Valid range: 1-4" -"Show Prefix","Show Prefix" +Minimum Password Length,Minimum Password Length +Maximum Login Failures to Lockout Account,Maximum Login Failures to Lockout Account +Use 0 to disable account locking.,Use 0 to disable account locking. +Lockout Time (minutes),Lockout Time (minutes) +Enable Autocomplete on login/forgot password forms,Enable Autocomplete on login/forgot password forms +Account Information Options,Account Information Options +Change Email Template,Change Email Template +Change Email and Password Template,Change Email and Password Template +Name and Address Options,Name and Address Options +Number of Lines in a Street Address,Number of Lines in a Street Address +Leave empty for default (2). Valid range: 1-4,Leave empty for default (2). Valid range: 1-4 +Show Prefix,Show Prefix "The title that goes before name (Mr., Mrs., etc.)","The title that goes before name (Mr., Mrs., etc.)" -"Prefix Dropdown Options","Prefix Dropdown Options" +Prefix Dropdown Options,Prefix Dropdown Options " Semicolon (;) separated values.
Leave empty for open text field. "," Semicolon (;) separated values.
Leave empty for open text field. " -"Show Middle Name (initial)","Show Middle Name (initial)" -"Always optional.","Always optional." -"Show Suffix","Show Suffix" +Show Middle Name (initial),Show Middle Name (initial) +Always optional.,Always optional. +Show Suffix,Show Suffix "The suffix that goes after name (Jr., Sr., etc.)","The suffix that goes after name (Jr., Sr., etc.)" -"Suffix Dropdown Options","Suffix Dropdown Options" -"Show Date of Birth","Show Date of Birth" -"Show Tax/VAT Number","Show Tax/VAT Number" -"Show Gender","Show Gender" -"Show Telephone","Show Telephone" -"Show Company","Show Company" -"Show Fax","Show Fax" -"Login Options","Login Options" -"Redirect Customer to Account Dashboard after Logging in","Redirect Customer to Account Dashboard after Logging in" +Suffix Dropdown Options,Suffix Dropdown Options +Show Date of Birth,Show Date of Birth +Show Tax/VAT Number,Show Tax/VAT Number +Show Gender,Show Gender +Show Telephone,Show Telephone +Show Company,Show Company +Show Fax,Show Fax +Login Options,Login Options +Redirect Customer to Account Dashboard after Logging in,Redirect Customer to Account Dashboard after Logging in "Customer will stay on the current page if ""No"" is selected.","Customer will stay on the current page if ""No"" is selected." -"Address Templates","Address Templates" -"Online Customers Options","Online Customers Options" -"Online Minutes Interval","Online Minutes Interval" +Address Templates,Address Templates +Online Customers Options,Online Customers Options +Online Minutes Interval,Online Minutes Interval "Only 'b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul' tags are allowed","Only 'b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul' tags are allowed" -"Leave empty for default (15 minutes).","Leave empty for default (15 minutes)." -"Customer Notification","Customer Notification" -"Customer Grid","Customer Grid" -"Rebuild Customer grid index","Rebuild Customer grid index" +Leave empty for default (15 minutes).,Leave empty for default (15 minutes). +Customer Notification,Customer Notification +Customer Grid,Customer Grid +Rebuild Customer grid index,Rebuild Customer grid index Group,Group -"Add New Customer","Add New Customer" -"Are you sure you want to delete the selected customers?","Are you sure you want to delete the selected customers?" -"Delete items","Delete items" -"Subscribe to Newsletter","Subscribe to Newsletter" -"Are you sure you want to unsubscribe the selected customers from the newsletter?","Are you sure you want to unsubscribe the selected customers from the newsletter?" -"Unsubscribe from Newsletter","Unsubscribe from Newsletter" -"Assign a Customer Group","Assign a Customer Group" +Add New Customer,Add New Customer +Are you sure you want to delete the selected customers?,Are you sure you want to delete the selected customers? +Delete items,Delete items +Subscribe to Newsletter,Subscribe to Newsletter +Are you sure you want to unsubscribe the selected customers from the newsletter?,Are you sure you want to unsubscribe the selected customers from the newsletter? +Unsubscribe from Newsletter,Unsubscribe from Newsletter +Assign a Customer Group,Assign a Customer Group Phone,Phone ZIP,ZIP -"Customer Since","Customer Since" -"Confirmed email","Confirmed email" -"Account Created in","Account Created in" -"Tax VAT Number","Tax VAT Number" -"Billing Firstname","Billing Firstname" -"Billing Lastname","Billing Lastname" -"Account Lock","Account Lock" -"First Name","First Name" -"Last Name","Last Name" -"Last Activity","Last Activity" +Customer Since,Customer Since +Confirmed email,Confirmed email +Account Created in,Account Created in +Tax VAT Number,Tax VAT Number +Billing Firstname,Billing Firstname +Billing Lastname,Billing Lastname +Account Lock,Account Lock +First Name,First Name +Last Name,Last Name +Last Activity,Last Activity Type,Type -"Customer Information","Customer Information" +Customer Information,Customer Information "If your Magento installation has multiple websites, you can edit the scope to associate the customer with a specific site.","If your Magento installation has multiple websites, you can edit the scope to associate the customer with a specific site." -"Disable Automatic Group Change Based on VAT ID","Disable Automatic Group Change Based on VAT ID" -"Send Welcome Email From","Send Welcome Email From" -"Are you sure you want to delete this item?","Are you sure you want to delete this item?" +Disable Automatic Group Change Based on VAT ID,Disable Automatic Group Change Based on VAT ID +Send Welcome Email From,Send Welcome Email From +Are you sure you want to delete this item?,Are you sure you want to delete this item? Addresses,Addresses -"Edit Account Information","Edit Account Information" -"Password forgotten","Password forgotten" -"You are signed out","You are signed out" -"Associate to Website","Associate to Website" -"Prefix","Prefix" -"Middle Name/Initial","Middle Name/Initial" -"Suffix","Suffix" +Edit Account Information,Edit Account Information +Password forgotten,Password forgotten +You are signed out,You are signed out +Associate to Website,Associate to Website +Prefix,Prefix +Middle Name/Initial,Middle Name/Initial +Suffix,Suffix +Email is required field for Admin order creation,Email is required field for Admin order creation +If set YES Email field will be required during Admin order creation for new Customer.,If set YES Email field will be required during Admin order creation for new Customer. diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php old mode 100644 new mode 100755 index 28b1cc9c80a91..fc48e351b0e7e --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -149,7 +149,7 @@ protected function _addAdditionalFormElementData(AbstractElement $element) { switch ($element->getId()) { case 'email': - $element->setRequired($this->isEmailRequiredCreateOrder()); + $element->setRequired($this->isEmailRequiredToCreateOrder()); $element->setClass('validate-email admin__control-text'); break; } @@ -212,7 +212,7 @@ private function extractValuesFromAttributes(array $attributes): array * * @return bool */ - private function isEmailRequiredCreateOrder() + private function isEmailRequiredToCreateOrder() { return $this->_scopeConfig->getValue( self::XML_PATH_EMAIL_REQUIRED_CREATE_ORDER, diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php old mode 100644 new mode 100755 index 211c6f75dad18..00a971bdf2b84 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -2043,11 +2043,11 @@ protected function _getNewCustomerEmail() \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); - if($emailrequired) { + if ($emailrequired) { return $this->getData('account/email'); } else { $email = $this->getData('account/email'); - if (empty($email)) { + if (empty($email)) { $host = $this->_scopeConfig->getValue( self::XML_PATH_DEFAULT_EMAIL_DOMAIN, \Magento\Store\Model\ScopeInterface::SCOPE_STORE @@ -2057,11 +2057,10 @@ protected function _getNewCustomerEmail() $account = $this->getData('account'); $account['email'] = $email; $this->setData('account', $account); - } + } return $email; } - } /** From 7e5bb80c72c62eebd4599c8bce8c68d205ae21bd Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Sat, 14 Sep 2019 14:19:47 +0530 Subject: [PATCH 004/153] _getNewCustomerEmail seperate it in differnet method --- .../Magento/Sales/Model/AdminOrder/Create.php | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) mode change 100755 => 100644 app/code/Magento/Sales/Model/AdminOrder/Create.php diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php old mode 100755 new mode 100644 index 00a971bdf2b84..1446f4ad1153d --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -2038,31 +2038,51 @@ protected function _validate() */ protected function _getNewCustomerEmail() { - $emailrequired = $this->_scopeConfig->getValue( - self::XML_PATH_EMAIL_REQUIRED_CREATE_ORDER, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ); + $emailrequired = $this->getIsEmailRequired(); if ($emailrequired) { return $this->getData('account/email'); } else { $email = $this->getData('account/email'); if (empty($email)) { - $host = $this->_scopeConfig->getValue( - self::XML_PATH_DEFAULT_EMAIL_DOMAIN, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ); - $account = time(); - $email = $account . '@' . $host; - $account = $this->getData('account'); - $account['email'] = $email; - $this->setData('account', $account); + $email = $this-> generateEmail(); } - return $email; } } + /** + * Check email is require + * + * @return bool + */ + protected function getIsEmailRequired() + { + return $this->_scopeConfig->getValue( + self::XML_PATH_EMAIL_REQUIRED_CREATE_ORDER, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + } + + /** + * Generate Email + * + * @return string + */ + protected function generateEmail() + { + $host = $this->_scopeConfig->getValue( + self::XML_PATH_DEFAULT_EMAIL_DOMAIN, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + $account = time(); + $email = $account . '@' . $host; + $account = $this->getData('account'); + $account['email'] = $email; + $this->setData('account', $account); + return $email; + } + /** * Checks id shipping and billing addresses are equal. * From b5265e8446441ebcb38981b69e3494653c106818 Mon Sep 17 00:00:00 2001 From: Oleksandr Kravchuk Date: Mon, 16 Sep 2019 10:36:46 +0300 Subject: [PATCH 005/153] Update Create.php --- .../Magento/Sales/Model/AdminOrder/Create.php | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php index 1446f4ad1153d..d51fa0778b192 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -2038,17 +2038,13 @@ protected function _validate() */ protected function _getNewCustomerEmail() { - $emailrequired = $this->getIsEmailRequired(); - - if ($emailrequired) { - return $this->getData('account/email'); - } else { - $email = $this->getData('account/email'); - if (empty($email)) { - $email = $this-> generateEmail(); - } - return $email; + $email = $this->getData('account/email'); + + if ($email || $this->getIsEmailRequired()) { + return $email; } + + return $this->generateEmail(); } /** @@ -2056,9 +2052,9 @@ protected function _getNewCustomerEmail() * * @return bool */ - protected function getIsEmailRequired() + private function getIsEmailRequired(): bool { - return $this->_scopeConfig->getValue( + return (bool)$this->_scopeConfig->getValue( self::XML_PATH_EMAIL_REQUIRED_CREATE_ORDER, \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); @@ -2069,7 +2065,7 @@ protected function getIsEmailRequired() * * @return string */ - protected function generateEmail() + private function generateEmail(): string { $host = $this->_scopeConfig->getValue( self::XML_PATH_DEFAULT_EMAIL_DOMAIN, @@ -2080,6 +2076,7 @@ protected function generateEmail() $account = $this->getData('account'); $account['email'] = $email; $this->setData('account', $account); + return $email; } From 3c1d73e26e4ff18da5bbc3b2eb3780fcea244dbf Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Tue, 17 Sep 2019 17:26:44 +0530 Subject: [PATCH 006/153] system.xml is placed in sales module --- .../Magento/Customer/etc/adminhtml/system.xml | 5 - app/code/Magento/Customer/etc/config.xml | 1 - app/code/Magento/Customer/i18n/en_US.csv | 2 - .../Magento/Sales/etc/adminhtml/system.xml | 10 + app/code/Magento/Sales/etc/config.xml | 5 + app/code/Magento/Sales/i18n/en_US.csv | 1600 +++++++++-------- 6 files changed, 816 insertions(+), 807 deletions(-) mode change 100755 => 100644 app/code/Magento/Customer/i18n/en_US.csv diff --git a/app/code/Magento/Customer/etc/adminhtml/system.xml b/app/code/Magento/Customer/etc/adminhtml/system.xml index 325de3680b463..2bd1041214801 100644 --- a/app/code/Magento/Customer/etc/adminhtml/system.xml +++ b/app/code/Magento/Customer/etc/adminhtml/system.xml @@ -86,11 +86,6 @@ To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes. Magento\Config\Model\Config\Source\Yesno - - - If set YES Email field will be required during Admin order creation for new Customer. - Magento\Config\Model\Config\Source\Yesno - diff --git a/app/code/Magento/Customer/etc/config.xml b/app/code/Magento/Customer/etc/config.xml index d979cf19fc5f7..da4b80536e631 100644 --- a/app/code/Magento/Customer/etc/config.xml +++ b/app/code/Magento/Customer/etc/config.xml @@ -15,7 +15,6 @@ 0 1 billing - 0 example.com general customer_create_account_email_template diff --git a/app/code/Magento/Customer/i18n/en_US.csv b/app/code/Magento/Customer/i18n/en_US.csv old mode 100755 new mode 100644 index 74c30a47a835e..4ab5e2b7068fb --- a/app/code/Magento/Customer/i18n/en_US.csv +++ b/app/code/Magento/Customer/i18n/en_US.csv @@ -539,5 +539,3 @@ Associate to Website,Associate to Website Prefix,Prefix Middle Name/Initial,Middle Name/Initial Suffix,Suffix -Email is required field for Admin order creation,Email is required field for Admin order creation -If set YES Email field will be required during Admin order creation for new Customer.,If set YES Email field will be required during Admin order creation for new Customer. diff --git a/app/code/Magento/Sales/etc/adminhtml/system.xml b/app/code/Magento/Sales/etc/adminhtml/system.xml index d1e5680b883c2..5b243786d8fd9 100644 --- a/app/code/Magento/Sales/etc/adminhtml/system.xml +++ b/app/code/Magento/Sales/etc/adminhtml/system.xml @@ -446,5 +446,15 @@ +
+ + + + + If set YES Email field will be required during Admin order creation for new Customer. + Magento\Config\Model\Config\Source\Yesno + + +
diff --git a/app/code/Magento/Sales/etc/config.xml b/app/code/Magento/Sales/etc/config.xml index 2480da4ad214b..cb921b8b0a1bc 100644 --- a/app/code/Magento/Sales/etc/config.xml +++ b/app/code/Magento/Sales/etc/config.xml @@ -111,5 +111,10 @@ 0 + + + 0 + + diff --git a/app/code/Magento/Sales/i18n/en_US.csv b/app/code/Magento/Sales/i18n/en_US.csv index c5657f3a309f7..fc1fac1311985 100644 --- a/app/code/Magento/Sales/i18n/en_US.csv +++ b/app/code/Magento/Sales/i18n/en_US.csv @@ -1,799 +1,801 @@ -"Credit Memos","Credit Memos" -Orders,Orders -Invoices,Invoices -"We can't get the order instance right now.","We can't get the order instance right now." -"Create New Order","Create New Order" -"Save Order Address","Save Order Address" -Shipping,Shipping -Billing,Billing -"Edit Order %1 %2 Address","Edit Order %1 %2 Address" -"Order Address Information","Order Address Information" -"Please correct the parent block for this block.","Please correct the parent block for this block." -"Submit Comment","Submit Comment" -"Submit Order","Submit Order" -"Are you sure you want to cancel this order?","Are you sure you want to cancel this order?" -Cancel,Cancel -"Billing Address","Billing Address" -"Payment Method","Payment Method" -"Order Comment","Order Comment" -Coupons,Coupons -"Please select a customer","Please select a customer" -"Create New Customer","Create New Customer" -"Account Information","Account Information" -From,From -To,To -Message,Message -"Edit Order #%1","Edit Order #%1" -"Create New Order for %1 in %2","Create New Order for %1 in %2" -"Create New Order in %1","Create New Order in %1" -"Create New Order for %1","Create New Order for %1" -"Create New Order for New Customer","Create New Order for New Customer" -"Items Ordered","Items Ordered" -"This product is disabled.","This product is disabled." -"Buy %1 for price %2","Buy %1 for price %2" -"Item ordered qty","Item ordered qty" -"%1 with %2 discount each","%1 with %2 discount each" -"%1 for %2","%1 for %2" -"* - Enter custom price including tax","* - Enter custom price including tax" -"* - Enter custom price excluding tax","* - Enter custom price excluding tax" -Configure,Configure -"This product does not have any configurable options","This product does not have any configurable options" -"Newsletter Subscription","Newsletter Subscription" -"Please select products","Please select products" -"Add Selected Product(s) to Order","Add Selected Product(s) to Order" -ID,ID -Product,Product -SKU,SKU -Price,Price -Select,Select -Quantity,Quantity -"Shipping Address","Shipping Address" -"Shipping Method","Shipping Method" -"Update Changes","Update Changes" -"Shopping Cart","Shopping Cart" -"Are you sure you want to delete all items from shopping cart?","Are you sure you want to delete all items from shopping cart?" -"Clear Shopping Cart","Clear Shopping Cart" -"Products in Comparison List","Products in Comparison List" -"Recently Compared Products","Recently Compared Products" -"Recently Viewed Products","Recently Viewed Products" -"Last Ordered Items","Last Ordered Items" -"Recently Viewed","Recently Viewed" -"Wish List","Wish List" -"Please select a store","Please select a store" -"Order Totals","Order Totals" -"Shipping Incl. Tax (%1)","Shipping Incl. Tax (%1)" -"Shipping Excl. Tax (%1)","Shipping Excl. Tax (%1)" -"New Credit Memo for Invoice #%1","New Credit Memo for Invoice #%1" -"New Credit Memo for Order #%1","New Credit Memo for Order #%1" -"Refund Shipping (Incl. Tax)","Refund Shipping (Incl. Tax)" -"Refund Shipping (Excl. Tax)","Refund Shipping (Excl. Tax)" -"Refund Shipping","Refund Shipping" -"Update Qty's","Update Qty's" -Refund,Refund -"Refund Offline","Refund Offline" -"Paid Amount","Paid Amount" -"Refund Amount","Refund Amount" -"Shipping Amount","Shipping Amount" -"Shipping Refund","Shipping Refund" -"Order Grand Total","Order Grand Total" -"Adjustment Refund","Adjustment Refund" -"Adjustment Fee","Adjustment Fee" -"Send Email","Send Email" -"Are you sure you want to send a credit memo email to customer?","Are you sure you want to send a credit memo email to customer?" -Void,Void -Print,Print -"The credit memo email was sent.","The credit memo email was sent." -"The credit memo email wasn't sent.","The credit memo email wasn't sent." -"Credit Memo #%1 | %3 | %2 (%4)","Credit Memo #%1 | %3 | %2 (%4)" -"Total Refund","Total Refund" -"New Invoice and Shipment for Order #%1","New Invoice and Shipment for Order #%1" -"New Invoice for Order #%1","New Invoice for Order #%1" -"Submit Invoice and Shipment","Submit Invoice and Shipment" -"Submit Invoice","Submit Invoice" -"Are you sure you want to send an invoice email to customer?","Are you sure you want to send an invoice email to customer?" -"Credit Memo","Credit Memo" -Capture,Capture -"The invoice email was sent.","The invoice email was sent." -"The invoice email wasn't sent.","The invoice email wasn't sent." -"Invoice #%1 | %2 | %4 (%3)","Invoice #%1 | %2 | %4 (%3)" -"Invalid parent block for this block","Invalid parent block for this block" -"Order Statuses","Order Statuses" -"Create New Status","Create New Status" -"Assign Status to State","Assign Status to State" -"Save Status Assignment","Save Status Assignment" -"Assign Order Status to State","Assign Order Status to State" -"Assignment Information","Assignment Information" -"Order Status","Order Status" -"Order State","Order State" -"Use Order Status As Default","Use Order Status As Default" -"Visible On Storefront","Visible On Storefront" -"Edit Order Status","Edit Order Status" -"Save Status","Save Status" -"New Order Status","New Order Status" -"Order Status Information","Order Status Information" -"Status Code","Status Code" -"Status Label","Status Label" -"Store View Specific Labels","Store View Specific Labels" -"Total Paid","Total Paid" -"Total Refunded","Total Refunded" -"Total Due","Total Due" -Edit,Edit -"Are you sure you want to send an order email to customer?","Are you sure you want to send an order email to customer?" -"This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?","This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?" -"Are you sure you want to void the payment?","Are you sure you want to void the payment?" -Hold,Hold -hold,hold -Unhold,Unhold -unhold,unhold -"Are you sure you want to accept this payment?","Are you sure you want to accept this payment?" -"Accept Payment","Accept Payment" -"Are you sure you want to deny this payment?","Are you sure you want to deny this payment?" -"Deny Payment","Deny Payment" -"Get Payment Update","Get Payment Update" -"Invoice and Ship","Invoice and Ship" -Invoice,Invoice -Ship,Ship -Reorder,Reorder -"Order # %1 %2 | %3","Order # %1 %2 | %3" -"This order contains (%1) items and therefore cannot be edited through the admin interface. If you wish to continue editing, the (%2) items will be removed, the order will be canceled and a new order will be placed.","This order contains (%1) items and therefore cannot be edited through the admin interface. If you wish to continue editing, the (%2) items will be removed, the order will be canceled and a new order will be placed." -"Are you sure? This order will be canceled and a new one will be created instead.","Are you sure? This order will be canceled and a new one will be created instead." -"Save Gift Message","Save Gift Message" -" [deleted]"," [deleted]" -"Order Credit Memos","Order Credit Memos" -"Credit memo #%1 created","Credit memo #%1 created" -"Credit memo #%1 comment added","Credit memo #%1 comment added" -"Shipment #%1 created","Shipment #%1 created" -"Shipment #%1 comment added","Shipment #%1 comment added" -"Invoice #%1 created","Invoice #%1 created" -"Invoice #%1 comment added","Invoice #%1 comment added" -"Tracking number %1 for %2 assigned","Tracking number %1 for %2 assigned" -"Comments History","Comments History" -"Order History","Order History" -Information,Information -"Order Information","Order Information" -"Order Invoices","Order Invoices" -Shipments,Shipments -"Order Shipments","Order Shipments" -Transactions,Transactions -"Order View","Order View" -Any,Any -Specified,Specified -"Applies to Any of the Specified Order Statuses except canceled orders","Applies to Any of the Specified Order Statuses except canceled orders" -"Cart Price Rule","Cart Price Rule" -Yes,Yes -No,No -"Show Actual Values","Show Actual Values" -"New Order RSS","New Order RSS" -Subtotal,Subtotal -"Shipping & Handling","Shipping & Handling" -"Discount (%1)","Discount (%1)" -Discount,Discount -"Grand Total","Grand Total" -Back,Back -Fetch,Fetch -"Transaction # %1 | %2","Transaction # %1 | %2" -N/A,N/A -Key,Key -Value,Value -"We found an invalid entity model.","We found an invalid entity model." -"Order # %1","Order # %1" -"Back to My Orders","Back to My Orders" -"View Another Order","View Another Order" -"About Your Refund","About Your Refund" -"My Orders","My Orders" -"Subscribe to Order Status","Subscribe to Order Status" -"About Your Invoice","About Your Invoice" -"Print Order # %1","Print Order # %1" -"Grand Total to be Charged","Grand Total to be Charged" -Unassign,Unassign -"We can't add this item to your shopping cart right now.","We can't add this item to your shopping cart right now." -"You sent the message.","You sent the message." -Sales,Sales -"Invoice capturing error","Invoice capturing error" -"This order no longer exists.","This order no longer exists." -"Please enter a comment.","Please enter a comment." -"We cannot add order history.","We cannot add order history." -"You updated the order address.","You updated the order address." -"We can't update the order address right now.","We can't update the order address right now." -"You have not canceled the item.","You have not canceled the item." -"You canceled the order.","You canceled the order." -"""%1"" coupon code was not applied. Do not apply discount is selected for item(s)","""%1"" coupon code was not applied. Do not apply discount is selected for item(s)" -"""%1"" coupon code is not valid.","""%1"" coupon code is not valid." -"The coupon code has been accepted.","The coupon code has been accepted." -"Quote item id is not received.","Quote item id is not received." -"Quote item is not loaded.","Quote item is not loaded." -"New Order","New Order" -"You created the order.","You created the order." -"Order saving error: %1","Order saving error: %1" -"Cannot add new comment.","Cannot add new comment." -"The credit memo has been canceled.","The credit memo has been canceled." -"Credit memo has not been canceled.","Credit memo has not been canceled." -"New Memo for #%1","New Memo for #%1" -"New Memo","New Memo" -"The credit memo's total must be positive.","The credit memo's total must be positive." -"Cannot create online refund for Refund to Store Credit.","Cannot create online refund for Refund to Store Credit." -"You created the credit memo.","You created the credit memo." -"We can't save the credit memo right now.","We can't save the credit memo right now." -"We can't update the item's quantity right now.","We can't update the item's quantity right now." -"View Memo for #%1","View Memo for #%1" -"View Memo","View Memo" -"You voided the credit memo.","You voided the credit memo." -"We can't void the credit memo.","We can't void the credit memo." -"The order no longer exists.","The order no longer exists." -"We can't create credit memo for the order.","We can't create credit memo for the order." -"Edit Order","Edit Order" -"You sent the order email.","You sent the order email." -"We can't send the email order right now.","We can't send the email order right now." -"You have not put the order on hold.","You have not put the order on hold." -"You put the order on hold.","You put the order on hold." -"You canceled the invoice.","You canceled the invoice." -"Invoice canceling error","Invoice canceling error" -"The invoice has been captured.","The invoice has been captured." -"The order does not allow an invoice to be created.","The order does not allow an invoice to be created." -"You can't create an invoice without products.","You can't create an invoice without products." -"New Invoice","New Invoice" -"We can't save the invoice right now.","We can't save the invoice right now." -"You created the invoice and shipment.","You created the invoice and shipment." -"The invoice has been created.","The invoice has been created." -"We can't send the invoice email right now.","We can't send the invoice email right now." -"We can't send the shipment right now.","We can't send the shipment right now." -"Cannot update item quantity.","Cannot update item quantity." -"The invoice has been voided.","The invoice has been voided." -"Invoice voiding error","Invoice voiding error" -"%1 order(s) cannot be canceled.","%1 order(s) cannot be canceled." -"You cannot cancel the order(s).","You cannot cancel the order(s)." -"We canceled %1 order(s).","We canceled %1 order(s)." -"%1 order(s) were not put on hold.","%1 order(s) were not put on hold." -"No order(s) were put on hold.","No order(s) were put on hold." -"You have put %1 order(s) on hold.","You have put %1 order(s) on hold." -"%1 order(s) were not released from on hold status.","%1 order(s) were not released from on hold status." -"No order(s) were released from on hold status.","No order(s) were released from on hold status." -"%1 order(s) have been released from on hold status.","%1 order(s) have been released from on hold status." -"There are no printable documents related to selected orders.","There are no printable documents related to selected orders." -"The payment has been accepted.","The payment has been accepted." -"The payment has been denied.","The payment has been denied." -"Transaction has been approved.","Transaction has been approved." -"Transaction has been voided/declined.","Transaction has been voided/declined." -"There is no update for the transaction.","There is no update for the transaction." -"We can't update the payment right now.","We can't update the payment right now." -"You assigned the order status.","You assigned the order status." -"Something went wrong while assigning the order status.","Something went wrong while assigning the order status." -"We can't find this order status.","We can't find this order status." -"Create New Order Status","Create New Order Status" -"We found another order status with the same order status code.","We found another order status with the same order status code." -"You saved the order status.","You saved the order status." -"We can't add the order status right now.","We can't add the order status right now." -"You have unassigned the order status.","You have unassigned the order status." -"Something went wrong while unassigning the order.","Something went wrong while unassigning the order." -"Can't unhold order.","Can't unhold order." -"You released the order from holding status.","You released the order from holding status." -"The order was not on hold.","The order was not on hold." -"Exception occurred during order load","Exception occurred during order load" -"Something went wrong while saving the gift message.","Something went wrong while saving the gift message." -"You saved the gift card message.","You saved the gift card message." -"The payment has been voided.","The payment has been voided." -"We can't void the payment right now.","We can't void the payment right now." -"Please correct the transaction ID and try again.","Please correct the transaction ID and try again." -"The transaction details have been updated.","The transaction details have been updated." -"We can't update the transaction details.","We can't update the transaction details." -"Orders and Returns","Orders and Returns" -"You entered incorrect data. Please try again.","You entered incorrect data. Please try again." -Home,Home -"Go to Home Page","Go to Home Page" -"We can't find this wish list.","We can't find this wish list." -"We could not add a product to cart by the ID ""%1"".","We could not add a product to cart by the ID ""%1""." -"There is an error in one of the option rows.","There is an error in one of the option rows." -"Shipping Address: ","Shipping Address: " -"Billing Address: ","Billing Address: " -"Please specify order items.","Please specify order items." -"Please specify a shipping method.","Please specify a shipping method." -"Please specify a payment method.","Please specify a payment method." -"This payment method is not available.","This payment method is not available." -"Validation is failed.","Validation is failed." -"You did not email your customer. Please check your email settings.","You did not email your customer. Please check your email settings." -"-- Please Select --","-- Please Select --" -"Path ""%1"" is not part of allowed directory ""%2""","Path ""%1"" is not part of allowed directory ""%2""" -"Identifying Fields required","Identifying Fields required" -"Id required","Id required" -"""Invoice Document Validation Error(s):\n"" .","""Invoice Document Validation Error(s):\n"" ." -"Could not save an invoice, see error log for details","Could not save an invoice, see error log for details" -"A hold action is not available.","A hold action is not available." -"You cannot remove the hold.","You cannot remove the hold." -"We cannot cancel this order.","We cannot cancel this order." -Guest,Guest -"Please enter the first name.","Please enter the first name." -"Please enter the last name.","Please enter the last name." -"Please enter the street.","Please enter the street." -"Please enter the city.","Please enter the city." -"Please enter the phone number.","Please enter the phone number." -"Please enter the company.","Please enter the company." -"Please enter the fax number.","Please enter the fax number." -"Please enter the zip/postal code.","Please enter the zip/postal code." -"Please enter the country.","Please enter the country." -"Please enter the state/province.","Please enter the state/province." -"Requested entity doesn't exist","Requested entity doesn't exist" -"Could not delete order address","Could not delete order address" -"Could not save order address","Could not save order address" -Pending,Pending -Refunded,Refunded -Canceled,Canceled -"Unknown State","Unknown State" -"We found an invalid quantity to refund item ""%1"".","We found an invalid quantity to refund item ""%1""." -"The creditmemo contains product item that is not part of the original order.","The creditmemo contains product item that is not part of the original order." -"The quantity to refund must not be greater than the unrefunded quantity.","The quantity to refund must not be greater than the unrefunded quantity." -"Maximum shipping amount allowed to refund is: %1","Maximum shipping amount allowed to refund is: %1" -"Order Id is required for creditmemo document","Order Id is required for creditmemo document" -"The creditmemo contains product SKU ""%1"" that is not part of the original order.","The creditmemo contains product SKU ""%1"" that is not part of the original order." -"The quantity to creditmemo must not be greater than the unrefunded quantity for product SKU ""%1"".","The quantity to creditmemo must not be greater than the unrefunded quantity for product SKU ""%1""." -"You can't create a creditmemo without products.","You can't create a creditmemo without products." -"The most money available to refund is %1.","The most money available to refund is %1." -"Could not delete credit memo","Could not delete credit memo" -"Could not save credit memo","Could not save credit memo" -"This order already has associated customer account","This order already has associated customer account" -Paid,Paid -"We cannot register an existing invoice","We cannot register an existing invoice" -"We can't create creditmemo for the invoice.","We can't create creditmemo for the invoice." -"Order Id is required for invoice document","Order Id is required for invoice document" -"The quantity to invoice must not be greater than the uninvoiced quantity for product SKU ""%1"".","The quantity to invoice must not be greater than the uninvoiced quantity for product SKU ""%1""." -"The invoice contains one or more items that are not part of the original order.","The invoice contains one or more items that are not part of the original order." -"ID required","ID required" -"Unknown Status","Unknown Status" -Ordered,Ordered -Shipped,Shipped -Invoiced,Invoiced -Backordered,Backordered -Returned,Returned -Partial,Partial -Mixed,Mixed -"Registered a Void notification.","Registered a Void notification." -"If the invoice was created offline, try creating an offline credit memo.","If the invoice was created offline, try creating an offline credit memo." -"We refunded %1 online.","We refunded %1 online." -"We refunded %1 offline.","We refunded %1 offline." -"IPN ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %1. Transaction ID: ""%2"". Credit Memo has not been created. Please create offline Credit Memo.","IPN ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %1. Transaction ID: ""%2"". Credit Memo has not been created. Please create offline Credit Memo." -"The credit memo has been created automatically.","The credit memo has been created automatically." -"Registered notification about refunded amount of %1.","Registered notification about refunded amount of %1." -"Canceled order online","Canceled order online" -"Canceled order offline","Canceled order offline" -"Approved the payment online.","Approved the payment online." -"There is no need to approve this payment.","There is no need to approve this payment." -"Denied the payment online","Denied the payment online" -"Registered update about approved payment.","Registered update about approved payment." -"Registered update about denied payment.","Registered update about denied payment." -"There is no update for the payment.","There is no update for the payment." -"Voided authorization.","Voided authorization." -"Amount: %1.","Amount: %1." -"Transaction ID: ""%1""","Transaction ID: ""%1""" -"The payment method you requested is not available.","The payment method you requested is not available." -"The payment disallows storing objects.","The payment disallows storing objects." -"The transaction ""%1"" cannot be captured yet.","The transaction ""%1"" cannot be captured yet." -"The order amount of %1 is pending approval on the payment gateway.","The order amount of %1 is pending approval on the payment gateway." -"Ordered amount of %1","Ordered amount of %1" -"An amount of %1 will be captured after being approved at the payment gateway.","An amount of %1 will be captured after being approved at the payment gateway." -"Registered notification about captured amount of %1.","Registered notification about captured amount of %1." -"Order is suspended as its capture amount %1 is suspected to be fraudulent.","Order is suspended as its capture amount %1 is suspected to be fraudulent." -"The parent transaction ID must have a transaction ID.","The parent transaction ID must have a transaction ID." -"Payment transactions disallow storing objects.","Payment transactions disallow storing objects." -"The transaction ""%1"" (%2) is already closed.","The transaction ""%1"" (%2) is already closed." -"Set order for existing transactions not allowed","Set order for existing transactions not allowed" -"At minimum, you need to set a payment ID.","At minimum, you need to set a payment ID." -Order,Order -Authorization,Authorization -"We found an unsupported transaction type ""%1"".","We found an unsupported transaction type ""%1""." -"Please set a proper payment and order id.","Please set a proper payment and order id." -"Please enter a Transaction ID.","Please enter a Transaction ID." -"You can't do this without a transaction object.","You can't do this without a transaction object." -"Order # ","Order # " -"Order Date: ","Order Date: " -"Sold to:","Sold to:" -"Ship to:","Ship to:" -"Payment Method:","Payment Method:" -"Shipping Method:","Shipping Method:" -"Total Shipping Charges","Total Shipping Charges" -Title,Title -Number,Number -"We found an invalid renderer model.","We found an invalid renderer model." -"Please define the PDF object before using.","Please define the PDF object before using." -"We don't recognize the draw line data. Please define the ""lines"" array.","We don't recognize the draw line data. Please define the ""lines"" array." -Products,Products -"Total (ex)","Total (ex)" -Qty,Qty -Tax,Tax -"Total (inc)","Total (inc)" -"Credit Memo # ","Credit Memo # " -"Invoice # ","Invoice # " -"The order object is not specified.","The order object is not specified." -"The source object is not specified.","The source object is not specified." -"An item object is not specified.","An item object is not specified." -"A PDF object is not specified.","A PDF object is not specified." -"A PDF page object is not specified.","A PDF page object is not specified." -"Excl. Tax","Excl. Tax" -"Incl. Tax","Incl. Tax" -"Packing Slip # ","Packing Slip # " -title,title -"The PDF total model %1 must be or extend \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal.","The PDF total model %1 must be or extend \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal." -"We cannot register an existing shipment","We cannot register an existing shipment" -"Parent shipment cannot be loaded for track object.","Parent shipment cannot be loaded for track object." -"Order Id is required for shipment document","Order Id is required for shipment document" -"You can't create a shipment without products.","You can't create a shipment without products." -"The shipment contains product SKU ""%1"" that is not part of the original order.","The shipment contains product SKU ""%1"" that is not part of the original order." -"The quantity to ship must not be greater than the unshipped quantity for product SKU ""%1"".","The quantity to ship must not be greater than the unshipped quantity for product SKU ""%1""." -"Please enter a tracking number.","Please enter a tracking number." -"Could not delete shipment","Could not delete shipment" -"Could not save shipment","Could not save shipment" -"The last status can't be unassigned from its current state.","The last status can't be unassigned from its current state." -"Status can't be unassigned, because it is used by existing order(s).","Status can't be unassigned, because it is used by existing order(s)." -"The total model should be extended from \Magento\Sales\Model\Order\Total\AbstractTotal.","The total model should be extended from \Magento\Sales\Model\Order\Total\AbstractTotal." -"An invoice cannot be created when an order has a status of %1","An invoice cannot be created when an order has a status of %1" -"A creditmemo can not be created when an order has a status of %1","A creditmemo can not be created when an order has a status of %1" -"The order does not allow a creditmemo to be created.","The order does not allow a creditmemo to be created." -"A shipment cannot be created when an order has a status of %1","A shipment cannot be created when an order has a status of %1" -"The order does not allow a shipment to be created.","The order does not allow a shipment to be created." -"""Creditmemo Document Validation Error(s):\n"" .","""Creditmemo Document Validation Error(s):\n"" ." -"Could not save a Creditmemo, see error log for details","Could not save a Creditmemo, see error log for details" -"We cannot determine the field name.","We cannot determine the field name." -City,City -Company,Company -Country,Country -Email,Email -"First Name","First Name" -"Last Name","Last Name" -State/Province,State/Province -"Street Address","Street Address" -"Phone Number","Phone Number" -"Zip/Postal Code","Zip/Postal Code" -"We can't save the address:\n%1","We can't save the address:\n%1" -"Cannot save comment:\n%1","Cannot save comment:\n%1" -"We don't have enough information to save the parent transaction ID.","We don't have enough information to save the parent transaction ID." -"We cannot create an empty shipment.","We cannot create an empty shipment." -"Cannot save track:\n%1","Cannot save track:\n%1" -"Cannot unassign status from state","Cannot unassign status from state" -"New Orders","New Orders" -"Order #%1 created at %2","Order #%1 created at %2" -"Details for %1 #%2","Details for %1 #%2" -"Notified Date: %1","Notified Date: %1" -"Comment: %1
","Comment: %1
" -"Current Status: %1
","Current Status: %1
" -"Total: %1
","Total: %1
" -"Order # %1 Notification(s)","Order # %1 Notification(s)" -"You can not cancel Credit Memo","You can not cancel Credit Memo" -"Could not cancel creditmemo","Could not cancel creditmemo" -"We cannot register an existing credit memo.","We cannot register an existing credit memo." -"We found an invalid quantity to invoice item ""%1"".","We found an invalid quantity to invoice item ""%1""." -"The Order State ""%1"" must not be set manually.","The Order State ""%1"" must not be set manually." -"""Shipment Document Validation Error(s):\n"" .","""Shipment Document Validation Error(s):\n"" ." -"Could not save a shipment, see error log for details","Could not save a shipment, see error log for details" -"VAT Request Identifier","VAT Request Identifier" -"VAT Request Date","VAT Request Date" -"Pending Payment","Pending Payment" -Processing,Processing -"On Hold","On Hold" -Complete,Complete -Closed,Closed -"Suspected Fraud","Suspected Fraud" -"Payment Review","Payment Review" -New,New -"test message","test message" -"Email has not been sent","Email has not been sent" -"Authorized amount of %1.","Authorized amount of %1." -"We will authorize %1 after the payment is approved at the payment gateway.","We will authorize %1 after the payment is approved at the payment gateway." -"Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.","Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent." -"Captured amount of %1 online.","Captured amount of %1 online." -"Authorized amount of %1","Authorized amount of %1" -" Transaction ID: ""%1"""," Transaction ID: ""%1""" -View,View -"Group was removed","Group was removed" -"Changing address information will not recalculate shipping, tax or other order amount.","Changing address information will not recalculate shipping, tax or other order amount." -"Comment Text","Comment Text" -"Notify Customer by Email","Notify Customer by Email" -"Visible on Storefront","Visible on Storefront" -Customer,Customer -Notified,Notified -"Not Notified","Not Notified" -"No Payment Methods","No Payment Methods" -"Order Comments","Order Comments" -"Apply Coupon Code","Apply Coupon Code" -Apply,Apply -"Remove Coupon Code","Remove Coupon Code" -Remove,Remove -"Address Information","Address Information" -"Payment & Shipping Information","Payment & Shipping Information" -"Order Total","Order Total" -"Order Currency:","Order Currency:" -"Same As Billing Address","Same As Billing Address" -"Select from existing customer addresses:","Select from existing customer addresses:" -"Add New Address","Add New Address" -"Save in address book","Save in address book" -"You don't need to select a shipping address.","You don't need to select a shipping address." -"Gift Message for the Entire Order","Gift Message for the Entire Order" -"Leave this box blank if you don't want to leave a gift message for the entire order.","Leave this box blank if you don't want to leave a gift message for the entire order." -"Row Subtotal","Row Subtotal" -Action,Action -"No ordered items","No ordered items" -"Update Items and Quantities","Update Items and Quantities" -"Total %1 product(s)","Total %1 product(s)" -Subtotal:,Subtotal: -"Tier Pricing","Tier Pricing" -"Custom Price","Custom Price" -"Please select","Please select" -"Move to Shopping Cart","Move to Shopping Cart" -"Move to Wish List","Move to Wish List" -"Subscribe to Newsletter","Subscribe to Newsletter" -"Click to change shipping method","Click to change shipping method" -"Sorry, no quotes are available for this order.","Sorry, no quotes are available for this order." -"Get shipping methods and rates","Get shipping methods and rates" -"You don't need to select a shipping method.","You don't need to select a shipping method." -"Customer's Activities","Customer's Activities" -Refresh,Refresh -Item,Item -"Add To Order","Add To Order" -"Configure and Add to Order","Configure and Add to Order" -"No items","No items" -"Append Comments","Append Comments" -"Email Order Confirmation","Email Order Confirmation" -"Grand Total Excl. Tax","Grand Total Excl. Tax" -"Grand Total Incl. Tax","Grand Total Incl. Tax" -"Subtotal (Excl. Tax)","Subtotal (Excl. Tax)" -"Subtotal (Incl. Tax)","Subtotal (Incl. Tax)" -"Payment & Shipping Method","Payment & Shipping Method" -"Payment Information","Payment Information" -"The order was placed using %1.","The order was placed using %1." -"Shipping Information","Shipping Information" -"Items to Refund","Items to Refund" -"Return to Stock","Return to Stock" -"Qty to Refund","Qty to Refund" -"Tax Amount","Tax Amount" -"Discount Amount","Discount Amount" -"Row Total","Row Total" -"No Items To Refund","No Items To Refund" -"Credit Memo Comments","Credit Memo Comments" -"Refund Totals","Refund Totals" -"Email Copy of Credit Memo","Email Copy of Credit Memo" -"Please enter a positive number in this field.","Please enter a positive number in this field." -"Items Refunded","Items Refunded" -"No Items","No Items" -"Memo Total","Memo Total" -"Credit Memo History","Credit Memo History" -"Credit Memo Totals","Credit Memo Totals" -"Customer Name: %1","Customer Name: %1" -"Purchased From: %1","Purchased From: %1" -"Gift Message","Gift Message" -From:,From: -To:,To: -Message:,Message: -"Shipping & Handling","Shipping & Handling" -"Gift Options","Gift Options" -"Create Shipment","Create Shipment" -"Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice.","Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice." -%1,%1 -"Qty to Invoice","Qty to Invoice" -"Invoice History","Invoice History" -"Invoice Comments","Invoice Comments" -"Invoice Totals","Invoice Totals" -Amount,Amount -"Capture Online","Capture Online" -"Capture Offline","Capture Offline" -"Not Capture","Not Capture" -"The invoice will be created offline without the payment gateway.","The invoice will be created offline without the payment gateway." -"Email Copy of Invoice","Email Copy of Invoice" -"Items Invoiced","Items Invoiced" -"Total Tax","Total Tax" -"From Name","From Name" -"To Name","To Name" -Status,Status -Comment,Comment -"Notification Not Applicable","Notification Not Applicable" -"Order & Account Information","Order & Account Information" -"The order confirmation email was sent","The order confirmation email was sent" -"The order confirmation email is not sent","The order confirmation email is not sent" -"Order Date","Order Date" -"Order Date (%1)","Order Date (%1)" -"Purchased From","Purchased From" -"Link to the New Order","Link to the New Order" -"Link to the Previous Order","Link to the Previous Order" -"Placed from IP","Placed from IP" -"%1 / %2 rate:","%1 / %2 rate:" -"Customer Name","Customer Name" -"Customer Group","Customer Group" -"Notes for this Order","Notes for this Order" -"Comment added","Comment added" -"Transaction Data","Transaction Data" -"Transaction ID","Transaction ID" -"Parent Transaction ID","Parent Transaction ID" -"Order ID","Order ID" -"Transaction Type","Transaction Type" -"Is Closed","Is Closed" -"Created At","Created At" -"Child Transactions","Child Transactions" -"Transaction Details","Transaction Details" -Items,Items -"Gift Message for this Order","Gift Message for this Order" -"Shipped By","Shipped By" -"Tracking Number","Tracking Number" -"Billing Last Name","Billing Last Name" -"Find Order By","Find Order By" -"ZIP Code","ZIP Code" -"Billing ZIP Code","Billing ZIP Code" -Continue,Continue -"Print All Refunds","Print All Refunds" -"Refund #","Refund #" -"Print Refund","Print Refund" -"Product Name","Product Name" -"Order #","Order #" -Date,Date -"Ship To","Ship To" -Actions,Actions -"View Order","View Order" -"You have placed no orders.","You have placed no orders." -"No shipping information available","No shipping information available" -"Print Order","Print Order" -"Print All Invoices","Print All Invoices" -"Invoice #","Invoice #" -"Print Invoice","Print Invoice" -"Qty Invoiced","Qty Invoiced" -Close,Close -"About Your Order","About Your Order" -"Order Date: %1","Order Date: %1" -"Refund #%1","Refund #%1" -"Shipment #%1","Shipment #%1" -"Qty Shipped","Qty Shipped" -"Recent Orders","Recent Orders" -"View All","View All" -"Gift Message for This Order","Gift Message for This Order" -"Recently Ordered","Recently Ordered" -"Add to Cart","Add to Cart" -Search,Search -"Credit memo for your %store_name order","Credit memo for your %store_name order" -"%name,","%name," -"Thank you for your order from %store_name.","Thank you for your order from %store_name." -"You can check the status of your order by logging into your account.","You can check the status of your order by logging into your account." -"If you have questions about your order, you can email us at %store_email","If you have questions about your order, you can email us at %store_email" -"or call us at %store_phone","or call us at %store_phone" -"Our hours are %store_hours.","Our hours are %store_hours." -"Your Credit Memo #%creditmemo_id for Order #%order_id","Your Credit Memo #%creditmemo_id for Order #%order_id" -"Billing Info","Billing Info" -"Shipping Info","Shipping Info" -"Update to your %store_name credit memo","Update to your %store_name credit memo" -"Your order #%increment_id has been updated with a status of %order_status.","Your order #%increment_id has been updated with a status of %order_status." -"Invoice for your %store_name order","Invoice for your %store_name order" -"Your Invoice #%invoice_id for Order #%order_id","Your Invoice #%invoice_id for Order #%order_id" -"Update to your %store_name invoice","Update to your %store_name invoice" -"Your %store_name order confirmation","Your %store_name order confirmation" -"%customer_name,","%customer_name," -"Once your package ships we will send you a tracking number.","Once your package ships we will send you a tracking number." -"Your Order #%increment_id","Your Order #%increment_id" -"Placed on %created_at","Placed on %created_at" -"Once your package ships we will send an email with a link to track your order.","Once your package ships we will send an email with a link to track your order." -"Update to your %store_name order","Update to your %store_name order" -"Your %store_name order has shipped","Your %store_name order has shipped" -"Your shipping confirmation is below. Thank you again for your business.","Your shipping confirmation is below. Thank you again for your business." -"Your Shipment #%shipment_id for Order #%order_id","Your Shipment #%shipment_id for Order #%order_id" -"Update to your %store_name shipment","Update to your %store_name shipment" -"Gift Options for ","Gift Options for " -"Add Products","Add Products" -"You have item changes","You have item changes" -Ok,Ok -Operations,Operations -Create,Create -"Send Order Email","Send Order Email" -"Accept or Deny Payment","Accept or Deny Payment" -"Send Sales Emails","Send Sales Emails" -"Sales Section","Sales Section" -"Sales Emails Section","Sales Emails Section" -General,General -"Hide Customer IP","Hide Customer IP" -"Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos.","Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos." -"Checkout Totals Sort Order","Checkout Totals Sort Order" -"Allow Reorder","Allow Reorder" -"Invoice and Packing Slip Design","Invoice and Packing Slip Design" -"Logo for PDF Print-outs (200x50)","Logo for PDF Print-outs (200x50)" -"Your default logo will be used in PDF and HTML documents.
(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image.","Your default logo will be used in PDF and HTML documents.
(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image." -"Logo for HTML Print View","Logo for HTML Print View" -"Logo for HTML documents only. If empty, default will be used.
(jpeg, gif, png)","Logo for HTML documents only. If empty, default will be used.
(jpeg, gif, png)" -Address,Address -"Minimum Order Amount","Minimum Order Amount" -Enable,Enable -"Minimum Amount","Minimum Amount" -"Subtotal after discount","Subtotal after discount" -"Include Tax to Amount","Include Tax to Amount" -"Description Message","Description Message" -"This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount.","This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount." -"Error to Show in Shopping Cart","Error to Show in Shopping Cart" -"Validate Each Address Separately in Multi-address Checkout","Validate Each Address Separately in Multi-address Checkout" -"Multi-address Description Message","Multi-address Description Message" -"We'll use the default description above if you leave this empty.","We'll use the default description above if you leave this empty." -"Multi-address Error to Show in Shopping Cart","Multi-address Error to Show in Shopping Cart" -"We'll use the default error above if you leave this empty.","We'll use the default error above if you leave this empty." -Dashboard,Dashboard -"Use Aggregated Data","Use Aggregated Data" -"Orders Cron Settings","Orders Cron Settings" -"Pending Payment Order Lifetime (minutes)","Pending Payment Order Lifetime (minutes)" -"Sales Emails","Sales Emails" -"Asynchronous sending","Asynchronous sending" -Enabled,Enabled -"New Order Confirmation Email Sender","New Order Confirmation Email Sender" -"New Order Confirmation Template","New Order Confirmation Template" -"Email template chosen based on theme fallback when ""Default"" option is selected.","Email template chosen based on theme fallback when ""Default"" option is selected." -"New Order Confirmation Template for Guest","New Order Confirmation Template for Guest" -"Send Order Email Copy To","Send Order Email Copy To" -Comma-separated,Comma-separated -"Send Order Email Copy Method","Send Order Email Copy Method" -"Order Comment Email Sender","Order Comment Email Sender" -"Order Comment Email Template","Order Comment Email Template" -"Order Comment Email Template for Guest","Order Comment Email Template for Guest" -"Send Order Comment Email Copy To","Send Order Comment Email Copy To" -"Send Order Comments Email Copy Method","Send Order Comments Email Copy Method" -"Invoice Email Sender","Invoice Email Sender" -"Invoice Email Template","Invoice Email Template" -"Invoice Email Template for Guest","Invoice Email Template for Guest" -"Send Invoice Email Copy To","Send Invoice Email Copy To" -"Send Invoice Email Copy Method","Send Invoice Email Copy Method" -"Invoice Comment Email Sender","Invoice Comment Email Sender" -"Invoice Comment Email Template","Invoice Comment Email Template" -"Invoice Comment Email Template for Guest","Invoice Comment Email Template for Guest" -"Send Invoice Comment Email Copy To","Send Invoice Comment Email Copy To" -"Send Invoice Comments Email Copy Method","Send Invoice Comments Email Copy Method" -Shipment,Shipment -"Shipment Email Sender","Shipment Email Sender" -"Shipment Email Template","Shipment Email Template" -"Shipment Email Template for Guest","Shipment Email Template for Guest" -"Send Shipment Email Copy To","Send Shipment Email Copy To" -"Send Shipment Email Copy Method","Send Shipment Email Copy Method" -"Shipment Comments","Shipment Comments" -"Shipment Comment Email Sender","Shipment Comment Email Sender" -"Shipment Comment Email Template","Shipment Comment Email Template" -"Shipment Comment Email Template for Guest","Shipment Comment Email Template for Guest" -"Send Shipment Comment Email Copy To","Send Shipment Comment Email Copy To" -"Send Shipment Comments Email Copy Method","Send Shipment Comments Email Copy Method" -"Credit Memo Email Sender","Credit Memo Email Sender" -"Credit Memo Email Template","Credit Memo Email Template" -"Credit Memo Email Template for Guest","Credit Memo Email Template for Guest" -"Send Credit Memo Email Copy To","Send Credit Memo Email Copy To" -"Send Credit Memo Email Copy Method","Send Credit Memo Email Copy Method" -"Credit Memo Comment Email Sender","Credit Memo Comment Email Sender" -"Credit Memo Comment Email Template","Credit Memo Comment Email Template" -"Credit Memo Comment Email Template for Guest","Credit Memo Comment Email Template for Guest" -"Send Credit Memo Comment Email Copy To","Send Credit Memo Comment Email Copy To" -"Send Credit Memo Comments Email Copy Method","Send Credit Memo Comments Email Copy Method" -"PDF Print-outs","PDF Print-outs" -"Display Order ID in Header","Display Order ID in Header" -"Customer Order Status Notification","Customer Order Status Notification" -"Asynchronous indexing","Asynchronous indexing" -"Orders and Returns Search Form","Orders and Returns Search Form" -"Anchor Custom Title","Anchor Custom Title" -Template,Template -"Default Template","Default Template" -Name,Name -Phone,Phone -"ZIP/Post Code","ZIP/Post Code" -"Signed-up Point","Signed-up Point" -Website,Website -"Bill-to Name","Bill-to Name" -Created,Created -"Invoice Date","Invoice Date" -"Ship-to Name","Ship-to Name" -"Ship Date","Ship Date" -"Total Quantity","Total Quantity" -"Default Status","Default Status" -"State Code and Title","State Code and Title" -"Item Status","Item Status" -"Original Price","Original Price" -"Tax Percent","Tax Percent" -"All Store Views","All Store Views" -"PDF Credit Memos","PDF Credit Memos" -"Purchase Point","Purchase Point" -"Print Invoices","Print Invoices" -"Print Packing Slips","Print Packing Slips" -"Print Credit Memos","Print Credit Memos" -"Print All","Print All" -"Print Shipping Labels","Print Shipping Labels" -"Purchase Date","Purchase Date" -"Grand Total (Base)","Grand Total (Base)" -"Grand Total (Purchased)","Grand Total (Purchased)" -"Customer Email","Customer Email" -"Shipping and Handling","Shipping and Handling" -"PDF Invoices","PDF Invoices" -"PDF Shipments","PDF Shipments" -"PDF Creditmemos","PDF Creditmemos" -Refunds,Refunds -"Allow Zero GrandTotal for Creditmemo","Allow Zero GrandTotal for Creditmemo" -"Allow Zero GrandTotal","Allow Zero GrandTotal" +Credit Memos,Credit Memos,, +Orders,Orders,, +Invoices,Invoices,, +We can't get the order instance right now.,We can't get the order instance right now.,, +Create New Order,Create New Order,, +Save Order Address,Save Order Address,, +Shipping,Shipping,, +Billing,Billing,, +Edit Order %1 %2 Address,Edit Order %1 %2 Address,, +Order Address Information,Order Address Information,, +Please correct the parent block for this block.,Please correct the parent block for this block.,, +Submit Comment,Submit Comment,, +Submit Order,Submit Order,, +Are you sure you want to cancel this order?,Are you sure you want to cancel this order?,, +Cancel,Cancel,, +Billing Address,Billing Address,, +Payment Method,Payment Method,, +Order Comment,Order Comment,, +Coupons,Coupons,, +Please select a customer,Please select a customer,, +Create New Customer,Create New Customer,, +Account Information,Account Information,, +From,From,, +To,To,, +Message,Message,, +Edit Order #%1,Edit Order #%1,, +Create New Order for %1 in %2,Create New Order for %1 in %2,, +Create New Order in %1,Create New Order in %1,, +Create New Order for %1,Create New Order for %1,, +Create New Order for New Customer,Create New Order for New Customer,, +Items Ordered,Items Ordered,, +This product is disabled.,This product is disabled.,, +Buy %1 for price %2,Buy %1 for price %2,, +Item ordered qty,Item ordered qty,, +%1 with %2 discount each,%1 with %2 discount each,, +%1 for %2,%1 for %2,, +* - Enter custom price including tax,* - Enter custom price including tax,, +* - Enter custom price excluding tax,* - Enter custom price excluding tax,, +Configure,Configure,, +This product does not have any configurable options,This product does not have any configurable options,, +Newsletter Subscription,Newsletter Subscription,, +Please select products,Please select products,, +Add Selected Product(s) to Order,Add Selected Product(s) to Order,, +ID,ID,, +Product,Product,, +SKU,SKU,, +Price,Price,, +Select,Select,, +Quantity,Quantity,, +Shipping Address,Shipping Address,, +Shipping Method,Shipping Method,, +Update Changes,Update Changes,, +Shopping Cart,Shopping Cart,, +Are you sure you want to delete all items from shopping cart?,Are you sure you want to delete all items from shopping cart?,, +Clear Shopping Cart,Clear Shopping Cart,, +Products in Comparison List,Products in Comparison List,, +Recently Compared Products,Recently Compared Products,, +Recently Viewed Products,Recently Viewed Products,, +Last Ordered Items,Last Ordered Items,, +Recently Viewed,Recently Viewed,, +Wish List,Wish List,, +Please select a store,Please select a store,, +Order Totals,Order Totals,, +Shipping Incl. Tax (%1),Shipping Incl. Tax (%1),, +Shipping Excl. Tax (%1),Shipping Excl. Tax (%1),, +New Credit Memo for Invoice #%1,New Credit Memo for Invoice #%1,, +New Credit Memo for Order #%1,New Credit Memo for Order #%1,, +Refund Shipping (Incl. Tax),Refund Shipping (Incl. Tax),, +Refund Shipping (Excl. Tax),Refund Shipping (Excl. Tax),, +Refund Shipping,Refund Shipping,, +Update Qty's,Update Qty's,, +Refund,Refund,, +Refund Offline,Refund Offline,, +Paid Amount,Paid Amount,, +Refund Amount,Refund Amount,, +Shipping Amount,Shipping Amount,, +Shipping Refund,Shipping Refund,, +Order Grand Total,Order Grand Total,, +Adjustment Refund,Adjustment Refund,, +Adjustment Fee,Adjustment Fee,, +Send Email,Send Email,, +Are you sure you want to send a credit memo email to customer?,Are you sure you want to send a credit memo email to customer?,, +Void,Void,, +Print,Print,, +The credit memo email was sent.,The credit memo email was sent.,, +The credit memo email wasn't sent.,The credit memo email wasn't sent.,, +Credit Memo #%1 | %3 | %2 (%4),Credit Memo #%1 | %3 | %2 (%4),, +Total Refund,Total Refund,, +New Invoice and Shipment for Order #%1,New Invoice and Shipment for Order #%1,, +New Invoice for Order #%1,New Invoice for Order #%1,, +Submit Invoice and Shipment,Submit Invoice and Shipment,, +Submit Invoice,Submit Invoice,, +Are you sure you want to send an invoice email to customer?,Are you sure you want to send an invoice email to customer?,, +Credit Memo,Credit Memo,, +Capture,Capture,, +The invoice email was sent.,The invoice email was sent.,, +The invoice email wasn't sent.,The invoice email wasn't sent.,, +Invoice #%1 | %2 | %4 (%3),Invoice #%1 | %2 | %4 (%3),, +Invalid parent block for this block,Invalid parent block for this block,, +Order Statuses,Order Statuses,, +Create New Status,Create New Status,, +Assign Status to State,Assign Status to State,, +Save Status Assignment,Save Status Assignment,, +Assign Order Status to State,Assign Order Status to State,, +Assignment Information,Assignment Information,, +Order Status,Order Status,, +Order State,Order State,, +Use Order Status As Default,Use Order Status As Default,, +Visible On Storefront,Visible On Storefront,, +Edit Order Status,Edit Order Status,, +Save Status,Save Status,, +New Order Status,New Order Status,, +Order Status Information,Order Status Information,, +Status Code,Status Code,, +Status Label,Status Label,, +Store View Specific Labels,Store View Specific Labels,, +Total Paid,Total Paid,, +Total Refunded,Total Refunded,, +Total Due,Total Due,, +Edit,Edit,, +Are you sure you want to send an order email to customer?,Are you sure you want to send an order email to customer?,, +"This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?","This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?",, +Are you sure you want to void the payment?,Are you sure you want to void the payment?,, +Hold,Hold,, +hold,hold,, +Unhold,Unhold,, +unhold,unhold,, +Are you sure you want to accept this payment?,Are you sure you want to accept this payment?,, +Accept Payment,Accept Payment,, +Are you sure you want to deny this payment?,Are you sure you want to deny this payment?,, +Deny Payment,Deny Payment,, +Get Payment Update,Get Payment Update,, +Invoice and Ship,Invoice and Ship,, +Invoice,Invoice,, +Ship,Ship,, +Reorder,Reorder,, +Order # %1 %2 | %3,Order # %1 %2 | %3,, +"This order contains (%1) items and therefore cannot be edited through the admin interface. If you wish to continue editing, the (%2) items will be removed, the order will be canceled and a new order will be placed.","This order contains (%1) items and therefore cannot be edited through the admin interface. If you wish to continue editing, the (%2) items will be removed, the order will be canceled and a new order will be placed.",, +Are you sure? This order will be canceled and a new one will be created instead.,Are you sure? This order will be canceled and a new one will be created instead.,, +Save Gift Message,Save Gift Message,, + [deleted], [deleted],, +Order Credit Memos,Order Credit Memos,, +Credit memo #%1 created,Credit memo #%1 created,, +Credit memo #%1 comment added,Credit memo #%1 comment added,, +Shipment #%1 created,Shipment #%1 created,, +Shipment #%1 comment added,Shipment #%1 comment added,, +Invoice #%1 created,Invoice #%1 created,, +Invoice #%1 comment added,Invoice #%1 comment added,, +Tracking number %1 for %2 assigned,Tracking number %1 for %2 assigned,, +Comments History,Comments History,, +Order History,Order History,, +Information,Information,, +Order Information,Order Information,, +Order Invoices,Order Invoices,, +Shipments,Shipments,, +Order Shipments,Order Shipments,, +Transactions,Transactions,, +Order View,Order View,, +Any,Any,, +Specified,Specified,, +Applies to Any of the Specified Order Statuses except canceled orders,Applies to Any of the Specified Order Statuses except canceled orders,, +Cart Price Rule,Cart Price Rule,, +Yes,Yes,, +No,No,, +Show Actual Values,Show Actual Values,, +New Order RSS,New Order RSS,, +Subtotal,Subtotal,, +Shipping & Handling,Shipping & Handling,, +Discount (%1),Discount (%1),, +Discount,Discount,, +Grand Total,Grand Total,, +Back,Back,, +Fetch,Fetch,, +Transaction # %1 | %2,Transaction # %1 | %2,, +N/A,N/A,, +Key,Key,, +Value,Value,, +We found an invalid entity model.,We found an invalid entity model.,, +Order # %1,Order # %1,, +Back to My Orders,Back to My Orders,, +View Another Order,View Another Order,, +About Your Refund,About Your Refund,, +My Orders,My Orders,, +Subscribe to Order Status,Subscribe to Order Status,, +About Your Invoice,About Your Invoice,, +Print Order # %1,Print Order # %1,, +Grand Total to be Charged,Grand Total to be Charged,, +Unassign,Unassign,, +We can't add this item to your shopping cart right now.,We can't add this item to your shopping cart right now.,, +You sent the message.,You sent the message.,, +Sales,Sales,, +Invoice capturing error,Invoice capturing error,, +This order no longer exists.,This order no longer exists.,, +Please enter a comment.,Please enter a comment.,, +We cannot add order history.,We cannot add order history.,, +You updated the order address.,You updated the order address.,, +We can't update the order address right now.,We can't update the order address right now.,, +You have not canceled the item.,You have not canceled the item.,, +You canceled the order.,You canceled the order.,, +"""%1"" coupon code was not applied. Do not apply discount is selected for item(s)","""%1"" coupon code was not applied. Do not apply discount is selected for item(s)",, +"""%1"" coupon code is not valid.","""%1"" coupon code is not valid.",, +The coupon code has been accepted.,The coupon code has been accepted.,, +Quote item id is not received.,Quote item id is not received.,, +Quote item is not loaded.,Quote item is not loaded.,, +New Order,New Order,, +You created the order.,You created the order.,, +Order saving error: %1,Order saving error: %1,, +Cannot add new comment.,Cannot add new comment.,, +The credit memo has been canceled.,The credit memo has been canceled.,, +Credit memo has not been canceled.,Credit memo has not been canceled.,, +New Memo for #%1,New Memo for #%1,, +New Memo,New Memo,, +The credit memo's total must be positive.,The credit memo's total must be positive.,, +Cannot create online refund for Refund to Store Credit.,Cannot create online refund for Refund to Store Credit.,, +You created the credit memo.,You created the credit memo.,, +We can't save the credit memo right now.,We can't save the credit memo right now.,, +We can't update the item's quantity right now.,We can't update the item's quantity right now.,, +View Memo for #%1,View Memo for #%1,, +View Memo,View Memo,, +You voided the credit memo.,You voided the credit memo.,, +We can't void the credit memo.,We can't void the credit memo.,, +The order no longer exists.,The order no longer exists.,, +We can't create credit memo for the order.,We can't create credit memo for the order.,, +Edit Order,Edit Order,, +You sent the order email.,You sent the order email.,, +We can't send the email order right now.,We can't send the email order right now.,, +You have not put the order on hold.,You have not put the order on hold.,, +You put the order on hold.,You put the order on hold.,, +You canceled the invoice.,You canceled the invoice.,, +Invoice canceling error,Invoice canceling error,, +The invoice has been captured.,The invoice has been captured.,, +The order does not allow an invoice to be created.,The order does not allow an invoice to be created.,, +You can't create an invoice without products.,You can't create an invoice without products.,, +New Invoice,New Invoice,, +We can't save the invoice right now.,We can't save the invoice right now.,, +You created the invoice and shipment.,You created the invoice and shipment.,, +The invoice has been created.,The invoice has been created.,, +We can't send the invoice email right now.,We can't send the invoice email right now.,, +We can't send the shipment right now.,We can't send the shipment right now.,, +Cannot update item quantity.,Cannot update item quantity.,, +The invoice has been voided.,The invoice has been voided.,, +Invoice voiding error,Invoice voiding error,, +%1 order(s) cannot be canceled.,%1 order(s) cannot be canceled.,, +You cannot cancel the order(s).,You cannot cancel the order(s).,, +We canceled %1 order(s).,We canceled %1 order(s).,, +%1 order(s) were not put on hold.,%1 order(s) were not put on hold.,, +No order(s) were put on hold.,No order(s) were put on hold.,, +You have put %1 order(s) on hold.,You have put %1 order(s) on hold.,, +%1 order(s) were not released from on hold status.,%1 order(s) were not released from on hold status.,, +No order(s) were released from on hold status.,No order(s) were released from on hold status.,, +%1 order(s) have been released from on hold status.,%1 order(s) have been released from on hold status.,, +There are no printable documents related to selected orders.,There are no printable documents related to selected orders.,, +The payment has been accepted.,The payment has been accepted.,, +The payment has been denied.,The payment has been denied.,, +Transaction has been approved.,Transaction has been approved.,, +Transaction has been voided/declined.,Transaction has been voided/declined.,, +There is no update for the transaction.,There is no update for the transaction.,, +We can't update the payment right now.,We can't update the payment right now.,, +You assigned the order status.,You assigned the order status.,, +Something went wrong while assigning the order status.,Something went wrong while assigning the order status.,, +We can't find this order status.,We can't find this order status.,, +Create New Order Status,Create New Order Status,, +We found another order status with the same order status code.,We found another order status with the same order status code.,, +You saved the order status.,You saved the order status.,, +We can't add the order status right now.,We can't add the order status right now.,, +You have unassigned the order status.,You have unassigned the order status.,, +Something went wrong while unassigning the order.,Something went wrong while unassigning the order.,, +Can't unhold order.,Can't unhold order.,, +You released the order from holding status.,You released the order from holding status.,, +The order was not on hold.,The order was not on hold.,, +Exception occurred during order load,Exception occurred during order load,, +Something went wrong while saving the gift message.,Something went wrong while saving the gift message.,, +You saved the gift card message.,You saved the gift card message.,, +The payment has been voided.,The payment has been voided.,, +We can't void the payment right now.,We can't void the payment right now.,, +Please correct the transaction ID and try again.,Please correct the transaction ID and try again.,, +The transaction details have been updated.,The transaction details have been updated.,, +We can't update the transaction details.,We can't update the transaction details.,, +Orders and Returns,Orders and Returns,, +You entered incorrect data. Please try again.,You entered incorrect data. Please try again.,, +Home,Home,, +Go to Home Page,Go to Home Page,, +We can't find this wish list.,We can't find this wish list.,, +"We could not add a product to cart by the ID ""%1"".","We could not add a product to cart by the ID ""%1"".",, +There is an error in one of the option rows.,There is an error in one of the option rows.,, +Shipping Address: ,Shipping Address: ,, +Billing Address: ,Billing Address: ,, +Please specify order items.,Please specify order items.,, +Please specify a shipping method.,Please specify a shipping method.,, +Please specify a payment method.,Please specify a payment method.,, +This payment method is not available.,This payment method is not available.,, +Validation is failed.,Validation is failed.,, +You did not email your customer. Please check your email settings.,You did not email your customer. Please check your email settings.,, +-- Please Select --,-- Please Select --,, +"Path ""%1"" is not part of allowed directory ""%2""","Path ""%1"" is not part of allowed directory ""%2""",, +Identifying Fields required,Identifying Fields required,, +Id required,Id required,, +"""Invoice Document Validation Error(s):\n"" .","""Invoice Document Validation Error(s):\n"" .",, +"Could not save an invoice, see error log for details","Could not save an invoice, see error log for details",, +A hold action is not available.,A hold action is not available.,, +You cannot remove the hold.,You cannot remove the hold.,, +We cannot cancel this order.,We cannot cancel this order.,, +Guest,Guest,, +Please enter the first name.,Please enter the first name.,, +Please enter the last name.,Please enter the last name.,, +Please enter the street.,Please enter the street.,, +Please enter the city.,Please enter the city.,, +Please enter the phone number.,Please enter the phone number.,, +Please enter the company.,Please enter the company.,, +Please enter the fax number.,Please enter the fax number.,, +Please enter the zip/postal code.,Please enter the zip/postal code.,, +Please enter the country.,Please enter the country.,, +Please enter the state/province.,Please enter the state/province.,, +Requested entity doesn't exist,Requested entity doesn't exist,, +Could not delete order address,Could not delete order address,, +Could not save order address,Could not save order address,, +Pending,Pending,, +Refunded,Refunded,, +Canceled,Canceled,, +Unknown State,Unknown State,, +"We found an invalid quantity to refund item ""%1"".","We found an invalid quantity to refund item ""%1"".",, +The creditmemo contains product item that is not part of the original order.,The creditmemo contains product item that is not part of the original order.,, +The quantity to refund must not be greater than the unrefunded quantity.,The quantity to refund must not be greater than the unrefunded quantity.,, +Maximum shipping amount allowed to refund is: %1,Maximum shipping amount allowed to refund is: %1,, +Order Id is required for creditmemo document,Order Id is required for creditmemo document,, +"The creditmemo contains product SKU ""%1"" that is not part of the original order.","The creditmemo contains product SKU ""%1"" that is not part of the original order.",, +"The quantity to creditmemo must not be greater than the unrefunded quantity for product SKU ""%1"".","The quantity to creditmemo must not be greater than the unrefunded quantity for product SKU ""%1"".",, +You can't create a creditmemo without products.,You can't create a creditmemo without products.,, +The most money available to refund is %1.,The most money available to refund is %1.,, +Could not delete credit memo,Could not delete credit memo,, +Could not save credit memo,Could not save credit memo,, +This order already has associated customer account,This order already has associated customer account,, +Paid,Paid,, +We cannot register an existing invoice,We cannot register an existing invoice,, +We can't create creditmemo for the invoice.,We can't create creditmemo for the invoice.,, +Order Id is required for invoice document,Order Id is required for invoice document,, +"The quantity to invoice must not be greater than the uninvoiced quantity for product SKU ""%1"".","The quantity to invoice must not be greater than the uninvoiced quantity for product SKU ""%1"".",, +The invoice contains one or more items that are not part of the original order.,The invoice contains one or more items that are not part of the original order.,, +ID required,ID required,, +Unknown Status,Unknown Status,, +Ordered,Ordered,, +Shipped,Shipped,, +Invoiced,Invoiced,, +Backordered,Backordered,, +Returned,Returned,, +Partial,Partial,, +Mixed,Mixed,, +Registered a Void notification.,Registered a Void notification.,, +"If the invoice was created offline, try creating an offline credit memo.","If the invoice was created offline, try creating an offline credit memo.",, +We refunded %1 online.,We refunded %1 online.,, +We refunded %1 offline.,We refunded %1 offline.,, +"IPN ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %1. Transaction ID: ""%2"". Credit Memo has not been created. Please create offline Credit Memo.","IPN ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %1. Transaction ID: ""%2"". Credit Memo has not been created. Please create offline Credit Memo.",, +The credit memo has been created automatically.,The credit memo has been created automatically.,, +Registered notification about refunded amount of %1.,Registered notification about refunded amount of %1.,, +Canceled order online,Canceled order online,, +Canceled order offline,Canceled order offline,, +Approved the payment online.,Approved the payment online.,, +There is no need to approve this payment.,There is no need to approve this payment.,, +Denied the payment online,Denied the payment online,, +Registered update about approved payment.,Registered update about approved payment.,, +Registered update about denied payment.,Registered update about denied payment.,, +There is no update for the payment.,There is no update for the payment.,, +Voided authorization.,Voided authorization.,, +Amount: %1.,Amount: %1.,, +"Transaction ID: ""%1""","Transaction ID: ""%1""",, +The payment method you requested is not available.,The payment method you requested is not available.,, +The payment disallows storing objects.,The payment disallows storing objects.,, +"The transaction ""%1"" cannot be captured yet.","The transaction ""%1"" cannot be captured yet.",, +The order amount of %1 is pending approval on the payment gateway.,The order amount of %1 is pending approval on the payment gateway.,, +Ordered amount of %1,Ordered amount of %1,, +An amount of %1 will be captured after being approved at the payment gateway.,An amount of %1 will be captured after being approved at the payment gateway.,, +Registered notification about captured amount of %1.,Registered notification about captured amount of %1.,, +Order is suspended as its capture amount %1 is suspected to be fraudulent.,Order is suspended as its capture amount %1 is suspected to be fraudulent.,, +The parent transaction ID must have a transaction ID.,The parent transaction ID must have a transaction ID.,, +Payment transactions disallow storing objects.,Payment transactions disallow storing objects.,, +"The transaction ""%1"" (%2) is already closed.","The transaction ""%1"" (%2) is already closed.",, +Set order for existing transactions not allowed,Set order for existing transactions not allowed,, +"At minimum, you need to set a payment ID.","At minimum, you need to set a payment ID.",, +Order,Order,, +Authorization,Authorization,, +"We found an unsupported transaction type ""%1"".","We found an unsupported transaction type ""%1"".",, +Please set a proper payment and order id.,Please set a proper payment and order id.,, +Please enter a Transaction ID.,Please enter a Transaction ID.,, +You can't do this without a transaction object.,You can't do this without a transaction object.,, +Order # ,Order # ,, +Order Date: ,Order Date: ,, +Sold to:,Sold to:,, +Ship to:,Ship to:,, +Payment Method:,Payment Method:,, +Shipping Method:,Shipping Method:,, +Total Shipping Charges,Total Shipping Charges,, +Title,Title,, +Number,Number,, +We found an invalid renderer model.,We found an invalid renderer model.,, +Please define the PDF object before using.,Please define the PDF object before using.,, +"We don't recognize the draw line data. Please define the ""lines"" array.","We don't recognize the draw line data. Please define the ""lines"" array.",, +Products,Products,, +Total (ex),Total (ex),, +Qty,Qty,, +Tax,Tax,, +Total (inc),Total (inc),, +Credit Memo # ,Credit Memo # ,, +Invoice # ,Invoice # ,, +The order object is not specified.,The order object is not specified.,, +The source object is not specified.,The source object is not specified.,, +An item object is not specified.,An item object is not specified.,, +A PDF object is not specified.,A PDF object is not specified.,, +A PDF page object is not specified.,A PDF page object is not specified.,, +Excl. Tax,Excl. Tax,, +Incl. Tax,Incl. Tax,, +Packing Slip # ,Packing Slip # ,, +title,title,, +The PDF total model %1 must be or extend \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal.,The PDF total model %1 must be or extend \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal.,, +We cannot register an existing shipment,We cannot register an existing shipment,, +Parent shipment cannot be loaded for track object.,Parent shipment cannot be loaded for track object.,, +Order Id is required for shipment document,Order Id is required for shipment document,, +You can't create a shipment without products.,You can't create a shipment without products.,, +"The shipment contains product SKU ""%1"" that is not part of the original order.","The shipment contains product SKU ""%1"" that is not part of the original order.",, +"The quantity to ship must not be greater than the unshipped quantity for product SKU ""%1"".","The quantity to ship must not be greater than the unshipped quantity for product SKU ""%1"".",, +Please enter a tracking number.,Please enter a tracking number.,, +Could not delete shipment,Could not delete shipment,, +Could not save shipment,Could not save shipment,, +The last status can't be unassigned from its current state.,The last status can't be unassigned from its current state.,, +"Status can't be unassigned, because it is used by existing order(s).","Status can't be unassigned, because it is used by existing order(s).",, +The total model should be extended from \Magento\Sales\Model\Order\Total\AbstractTotal.,The total model should be extended from \Magento\Sales\Model\Order\Total\AbstractTotal.,, +An invoice cannot be created when an order has a status of %1,An invoice cannot be created when an order has a status of %1,, +A creditmemo can not be created when an order has a status of %1,A creditmemo can not be created when an order has a status of %1,, +The order does not allow a creditmemo to be created.,The order does not allow a creditmemo to be created.,, +A shipment cannot be created when an order has a status of %1,A shipment cannot be created when an order has a status of %1,, +The order does not allow a shipment to be created.,The order does not allow a shipment to be created.,, +"""Creditmemo Document Validation Error(s):\n"" .","""Creditmemo Document Validation Error(s):\n"" .",, +"Could not save a Creditmemo, see error log for details","Could not save a Creditmemo, see error log for details",, +We cannot determine the field name.,We cannot determine the field name.,, +City,City,, +Company,Company,, +Country,Country,, +Email,Email,, +First Name,First Name,, +Last Name,Last Name,, +State/Province,State/Province,, +Street Address,Street Address,, +Phone Number,Phone Number,, +Zip/Postal Code,Zip/Postal Code,, +We can't save the address:\n%1,We can't save the address:\n%1,, +Cannot save comment:\n%1,Cannot save comment:\n%1,, +We don't have enough information to save the parent transaction ID.,We don't have enough information to save the parent transaction ID.,, +We cannot create an empty shipment.,We cannot create an empty shipment.,, +Cannot save track:\n%1,Cannot save track:\n%1,, +Cannot unassign status from state,Cannot unassign status from state,, +New Orders,New Orders,, +Order #%1 created at %2,Order #%1 created at %2,, +Details for %1 #%2,Details for %1 #%2,, +Notified Date: %1,Notified Date: %1,, +Comment: %1
,Comment: %1
,, +Current Status: %1
,Current Status: %1
,, +Total: %1
,Total: %1
,, +Order # %1 Notification(s),Order # %1 Notification(s),, +You can not cancel Credit Memo,You can not cancel Credit Memo,, +Could not cancel creditmemo,Could not cancel creditmemo,, +We cannot register an existing credit memo.,We cannot register an existing credit memo.,, +"We found an invalid quantity to invoice item ""%1"".","We found an invalid quantity to invoice item ""%1"".",, +"The Order State ""%1"" must not be set manually.","The Order State ""%1"" must not be set manually.",, +"""Shipment Document Validation Error(s):\n"" .","""Shipment Document Validation Error(s):\n"" .",, +"Could not save a shipment, see error log for details","Could not save a shipment, see error log for details",, +VAT Request Identifier,VAT Request Identifier,, +VAT Request Date,VAT Request Date,, +Pending Payment,Pending Payment,, +Processing,Processing,, +On Hold,On Hold,, +Complete,Complete,, +Closed,Closed,, +Suspected Fraud,Suspected Fraud,, +Payment Review,Payment Review,, +New,New,, +test message,test message,, +Email has not been sent,Email has not been sent,, +Authorized amount of %1.,Authorized amount of %1.,, +We will authorize %1 after the payment is approved at the payment gateway.,We will authorize %1 after the payment is approved at the payment gateway.,, +Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.,Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.,, +Captured amount of %1 online.,Captured amount of %1 online.,, +Authorized amount of %1,Authorized amount of %1,, +" Transaction ID: ""%1"""," Transaction ID: ""%1""",, +View,View,, +Group was removed,Group was removed,, +"Changing address information will not recalculate shipping, tax or other order amount.","Changing address information will not recalculate shipping, tax or other order amount.",, +Comment Text,Comment Text,, +Notify Customer by Email,Notify Customer by Email,, +Visible on Storefront,Visible on Storefront,, +Customer,Customer,, +Notified,Notified,, +Not Notified,Not Notified,, +No Payment Methods,No Payment Methods,, +Order Comments,Order Comments,, +Apply Coupon Code,Apply Coupon Code,, +Apply,Apply,, +Remove Coupon Code,Remove Coupon Code,, +Remove,Remove,, +Address Information,Address Information,, +Payment &, Shipping Information,Payment &, Shipping Information +Order Total,Order Total,, +Order Currency:,Order Currency:,, +Same As Billing Address,Same As Billing Address,, +Select from existing customer addresses:,Select from existing customer addresses:,, +Add New Address,Add New Address,, +Save in address book,Save in address book,, +You don't need to select a shipping address.,You don't need to select a shipping address.,, +Gift Message for the Entire Order,Gift Message for the Entire Order,, +Leave this box blank if you don't want to leave a gift message for the entire order.,Leave this box blank if you don't want to leave a gift message for the entire order.,, +Row Subtotal,Row Subtotal,, +Action,Action,, +No ordered items,No ordered items,, +Update Items and Quantities,Update Items and Quantities,, +Total %1 product(s),Total %1 product(s),, +Subtotal:,Subtotal:,, +Tier Pricing,Tier Pricing,, +Custom Price,Custom Price,, +Please select,Please select,, +Move to Shopping Cart,Move to Shopping Cart,, +Move to Wish List,Move to Wish List,, +Subscribe to Newsletter,Subscribe to Newsletter,, +Click to change shipping method,Click to change shipping method,, +"Sorry, no quotes are available for this order.","Sorry, no quotes are available for this order.",, +Get shipping methods and rates,Get shipping methods and rates,, +You don't need to select a shipping method.,You don't need to select a shipping method.,, +Customer's Activities,Customer's Activities,, +Refresh,Refresh,, +Item,Item,, +Add To Order,Add To Order,, +Configure and Add to Order,Configure and Add to Order,, +No items,No items,, +Append Comments,Append Comments,, +Email Order Confirmation,Email Order Confirmation,, +Grand Total Excl. Tax,Grand Total Excl. Tax,, +Grand Total Incl. Tax,Grand Total Incl. Tax,, +Subtotal (Excl. Tax),Subtotal (Excl. Tax),, +Subtotal (Incl. Tax),Subtotal (Incl. Tax),, +Payment &, Shipping Method,Payment &, Shipping Method +Payment Information,Payment Information,, +The order was placed using %1.,The order was placed using %1.,, +Shipping Information,Shipping Information,, +Items to Refund,Items to Refund,, +Return to Stock,Return to Stock,, +Qty to Refund,Qty to Refund,, +Tax Amount,Tax Amount,, +Discount Amount,Discount Amount,, +Row Total,Row Total,, +No Items To Refund,No Items To Refund,, +Credit Memo Comments,Credit Memo Comments,, +Refund Totals,Refund Totals,, +Email Copy of Credit Memo,Email Copy of Credit Memo,, +Please enter a positive number in this field.,Please enter a positive number in this field.,, +Items Refunded,Items Refunded,, +No Items,No Items,, +Memo Total,Memo Total,, +Credit Memo History,Credit Memo History,, +Credit Memo Totals,Credit Memo Totals,, +Customer Name: %1,Customer Name: %1,, +Purchased From: %1,Purchased From: %1,, +Gift Message,Gift Message,, +From:,From:,, +To:,To:,, +Message:,Message:,, +Shipping &, Handling,Shipping &, Handling +Gift Options,Gift Options,, +Create Shipment,Create Shipment,, +Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice.,Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice.,, +%1,%1,, +Qty to Invoice,Qty to Invoice,, +Invoice History,Invoice History,, +Invoice Comments,Invoice Comments,, +Invoice Totals,Invoice Totals,, +Amount,Amount,, +Capture Online,Capture Online,, +Capture Offline,Capture Offline,, +Not Capture,Not Capture,, +The invoice will be created offline without the payment gateway.,The invoice will be created offline without the payment gateway.,, +Email Copy of Invoice,Email Copy of Invoice,, +Items Invoiced,Items Invoiced,, +Total Tax,Total Tax,, +From Name,From Name,, +To Name,To Name,, +Status,Status,, +Comment,Comment,, +Notification Not Applicable,Notification Not Applicable,, +Order & Account Information,Order & Account Information,, +The order confirmation email was sent,The order confirmation email was sent,, +The order confirmation email is not sent,The order confirmation email is not sent,, +Order Date,Order Date,, +Order Date (%1),Order Date (%1),, +Purchased From,Purchased From,, +Link to the New Order,Link to the New Order,, +Link to the Previous Order,Link to the Previous Order,, +Placed from IP,Placed from IP,, +%1 / %2 rate:,%1 / %2 rate:,, +Customer Name,Customer Name,, +Customer Group,Customer Group,, +Notes for this Order,Notes for this Order,, +Comment added,Comment added,, +Transaction Data,Transaction Data,, +Transaction ID,Transaction ID,, +Parent Transaction ID,Parent Transaction ID,, +Order ID,Order ID,, +Transaction Type,Transaction Type,, +Is Closed,Is Closed,, +Created At,Created At,, +Child Transactions,Child Transactions,, +Transaction Details,Transaction Details,, +Items,Items,, +Gift Message for this Order,Gift Message for this Order,, +Shipped By,Shipped By,, +Tracking Number,Tracking Number,, +Billing Last Name,Billing Last Name,, +Find Order By,Find Order By,, +ZIP Code,ZIP Code,, +Billing ZIP Code,Billing ZIP Code,, +Continue,Continue,, +Print All Refunds,Print All Refunds,, +Refund #,Refund #,, +Print Refund,Print Refund,, +Product Name,Product Name,, +Order #,Order #,, +Date,Date,, +Ship To,Ship To,, +Actions,Actions,, +View Order,View Order,, +You have placed no orders.,You have placed no orders.,, +No shipping information available,No shipping information available,, +Print Order,Print Order,, +Print All Invoices,Print All Invoices,, +Invoice #,Invoice #,, +Print Invoice,Print Invoice,, +Qty Invoiced,Qty Invoiced,, +Close,Close,, +About Your Order,About Your Order,, +"Order Date: %1","Order Date: %1",, +Refund #%1,Refund #%1,, +Shipment #%1,Shipment #%1,, +Qty Shipped,Qty Shipped,, +Recent Orders,Recent Orders,, +View All,View All,, +Gift Message for This Order,Gift Message for This Order,, +Recently Ordered,Recently Ordered,, +Add to Cart,Add to Cart,, +Search,Search,, +Credit memo for your %store_name order,Credit memo for your %store_name order,, +"%name,","%name,",, +Thank you for your order from %store_name.,Thank you for your order from %store_name.,, +"You can check the status of your order by logging into your account.","You can check the status of your order by logging into your account.",, +"If you have questions about your order, you can email us at %store_email","If you have questions about your order, you can email us at %store_email",, +"or call us at %store_phone","or call us at %store_phone",, +"Our hours are %store_hours.","Our hours are %store_hours.",, +Your Credit Memo #%creditmemo_id for Order #%order_id,Your Credit Memo #%creditmemo_id for Order #%order_id,, +Billing Info,Billing Info,, +Shipping Info,Shipping Info,, +Update to your %store_name credit memo,Update to your %store_name credit memo,, +Your order #%increment_id has been updated with a status of %order_status.,Your order #%increment_id has been updated with a status of %order_status.,, +Invoice for your %store_name order,Invoice for your %store_name order,, +Your Invoice #%invoice_id for Order #%order_id,Your Invoice #%invoice_id for Order #%order_id,, +Update to your %store_name invoice,Update to your %store_name invoice,, +Your %store_name order confirmation,Your %store_name order confirmation,, +"%customer_name,","%customer_name,",, +Once your package ships we will send you a tracking number.,Once your package ships we will send you a tracking number.,, +"Your Order #%increment_id","Your Order #%increment_id",, +"Placed on %created_at","Placed on %created_at",, +Once your package ships we will send an email with a link to track your order.,Once your package ships we will send an email with a link to track your order.,, +Update to your %store_name order,Update to your %store_name order,, +Your %store_name order has shipped,Your %store_name order has shipped,, +Your shipping confirmation is below. Thank you again for your business.,Your shipping confirmation is below. Thank you again for your business.,, +Your Shipment #%shipment_id for Order #%order_id,Your Shipment #%shipment_id for Order #%order_id,, +Update to your %store_name shipment,Update to your %store_name shipment,, +Gift Options for ,Gift Options for ,, +Add Products,Add Products,, +You have item changes,You have item changes,, +Ok,Ok,, +Operations,Operations,, +Create,Create,, +Send Order Email,Send Order Email,, +Accept or Deny Payment,Accept or Deny Payment,, +Send Sales Emails,Send Sales Emails,, +Sales Section,Sales Section,, +Sales Emails Section,Sales Emails Section,, +General,General,, +Hide Customer IP,Hide Customer IP,, +"Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos.","Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos.",, +Checkout Totals Sort Order,Checkout Totals Sort Order,, +Allow Reorder,Allow Reorder,, +Invoice and Packing Slip Design,Invoice and Packing Slip Design,, +Logo for PDF Print-outs (200x50),Logo for PDF Print-outs (200x50),, +"Your default logo will be used in PDF and HTML documents.
(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image.","Your default logo will be used in PDF and HTML documents.
(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image.",, +Logo for HTML Print View,Logo for HTML Print View,, +"Logo for HTML documents only. If empty, default will be used.
(jpeg, gif, png)","Logo for HTML documents only. If empty, default will be used.
(jpeg, gif, png)",, +Address,Address,, +Minimum Order Amount,Minimum Order Amount,, +Enable,Enable,, +Minimum Amount,Minimum Amount,, +Subtotal after discount,Subtotal after discount,, +Include Tax to Amount,Include Tax to Amount,, +Description Message,Description Message,, +This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount.,This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount.,, +Error to Show in Shopping Cart,Error to Show in Shopping Cart,, +Validate Each Address Separately in Multi-address Checkout,Validate Each Address Separately in Multi-address Checkout,, +Multi-address Description Message,Multi-address Description Message,, +We'll use the default description above if you leave this empty.,We'll use the default description above if you leave this empty.,, +Multi-address Error to Show in Shopping Cart,Multi-address Error to Show in Shopping Cart,, +We'll use the default error above if you leave this empty.,We'll use the default error above if you leave this empty.,, +Dashboard,Dashboard,, +Use Aggregated Data,Use Aggregated Data,, +Orders Cron Settings,Orders Cron Settings,, +Pending Payment Order Lifetime (minutes),Pending Payment Order Lifetime (minutes),, +Sales Emails,Sales Emails,, +Asynchronous sending,Asynchronous sending,, +Enabled,Enabled,, +New Order Confirmation Email Sender,New Order Confirmation Email Sender,, +New Order Confirmation Template,New Order Confirmation Template,, +"Email template chosen based on theme fallback when ""Default"" option is selected.","Email template chosen based on theme fallback when ""Default"" option is selected.",, +New Order Confirmation Template for Guest,New Order Confirmation Template for Guest,, +Send Order Email Copy To,Send Order Email Copy To,, +Comma-separated,Comma-separated,, +Send Order Email Copy Method,Send Order Email Copy Method,, +Order Comment Email Sender,Order Comment Email Sender,, +Order Comment Email Template,Order Comment Email Template,, +Order Comment Email Template for Guest,Order Comment Email Template for Guest,, +Send Order Comment Email Copy To,Send Order Comment Email Copy To,, +Send Order Comments Email Copy Method,Send Order Comments Email Copy Method,, +Invoice Email Sender,Invoice Email Sender,, +Invoice Email Template,Invoice Email Template,, +Invoice Email Template for Guest,Invoice Email Template for Guest,, +Send Invoice Email Copy To,Send Invoice Email Copy To,, +Send Invoice Email Copy Method,Send Invoice Email Copy Method,, +Invoice Comment Email Sender,Invoice Comment Email Sender,, +Invoice Comment Email Template,Invoice Comment Email Template,, +Invoice Comment Email Template for Guest,Invoice Comment Email Template for Guest,, +Send Invoice Comment Email Copy To,Send Invoice Comment Email Copy To,, +Send Invoice Comments Email Copy Method,Send Invoice Comments Email Copy Method,, +Shipment,Shipment,, +Shipment Email Sender,Shipment Email Sender,, +Shipment Email Template,Shipment Email Template,, +Shipment Email Template for Guest,Shipment Email Template for Guest,, +Send Shipment Email Copy To,Send Shipment Email Copy To,, +Send Shipment Email Copy Method,Send Shipment Email Copy Method,, +Shipment Comments,Shipment Comments,, +Shipment Comment Email Sender,Shipment Comment Email Sender,, +Shipment Comment Email Template,Shipment Comment Email Template,, +Shipment Comment Email Template for Guest,Shipment Comment Email Template for Guest,, +Send Shipment Comment Email Copy To,Send Shipment Comment Email Copy To,, +Send Shipment Comments Email Copy Method,Send Shipment Comments Email Copy Method,, +Credit Memo Email Sender,Credit Memo Email Sender,, +Credit Memo Email Template,Credit Memo Email Template,, +Credit Memo Email Template for Guest,Credit Memo Email Template for Guest,, +Send Credit Memo Email Copy To,Send Credit Memo Email Copy To,, +Send Credit Memo Email Copy Method,Send Credit Memo Email Copy Method,, +Credit Memo Comment Email Sender,Credit Memo Comment Email Sender,, +Credit Memo Comment Email Template,Credit Memo Comment Email Template,, +Credit Memo Comment Email Template for Guest,Credit Memo Comment Email Template for Guest,, +Send Credit Memo Comment Email Copy To,Send Credit Memo Comment Email Copy To,, +Send Credit Memo Comments Email Copy Method,Send Credit Memo Comments Email Copy Method,, +PDF Print-outs,PDF Print-outs,, +Display Order ID in Header,Display Order ID in Header,, +Customer Order Status Notification,Customer Order Status Notification,, +Asynchronous indexing,Asynchronous indexing,, +Orders and Returns Search Form,Orders and Returns Search Form,, +Anchor Custom Title,Anchor Custom Title,, +Template,Template,, +Default Template,Default Template,, +Name,Name,, +Phone,Phone,, +ZIP/Post Code,ZIP/Post Code,, +Signed-up Point,Signed-up Point,, +Website,Website,, +Bill-to Name,Bill-to Name,, +Created,Created,, +Invoice Date,Invoice Date,, +Ship-to Name,Ship-to Name,, +Ship Date,Ship Date,, +Total Quantity,Total Quantity,, +Default Status,Default Status,, +State Code and Title,State Code and Title,, +Item Status,Item Status,, +Original Price,Original Price,, +Tax Percent,Tax Percent,, +All Store Views,All Store Views,, +PDF Credit Memos,PDF Credit Memos,, +Purchase Point,Purchase Point,, +Print Invoices,Print Invoices,, +Print Packing Slips,Print Packing Slips,, +Print Credit Memos,Print Credit Memos,, +Print All,Print All,, +Print Shipping Labels,Print Shipping Labels,, +Purchase Date,Purchase Date,, +Grand Total (Base),Grand Total (Base),, +Grand Total (Purchased),Grand Total (Purchased),, +Customer Email,Customer Email,, +Shipping and Handling,Shipping and Handling,, +PDF Invoices,PDF Invoices,, +PDF Shipments,PDF Shipments,, +PDF Creditmemos,PDF Creditmemos,, +Refunds,Refunds,, +Allow Zero GrandTotal for Creditmemo,Allow Zero GrandTotal for Creditmemo,, +Allow Zero GrandTotal,Allow Zero GrandTotal,, +Email is required field for Admin order creation,Email is required field for Admin order creation,, +If set YES Email field will be required during Admin order creation for new Customer.,If set YES Email field will be required during Admin order creation for new Customer.,, From 339c4c2a507767e8cb3badaac5e278430cf63d23 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Tue, 17 Sep 2019 17:39:08 +0530 Subject: [PATCH 007/153] resolved Sales en_US.csv file conflict --- app/code/Magento/Sales/i18n/en_US.csv | 1602 ++++++++++++------------- 1 file changed, 801 insertions(+), 801 deletions(-) diff --git a/app/code/Magento/Sales/i18n/en_US.csv b/app/code/Magento/Sales/i18n/en_US.csv index fc1fac1311985..84cdfb2824334 100644 --- a/app/code/Magento/Sales/i18n/en_US.csv +++ b/app/code/Magento/Sales/i18n/en_US.csv @@ -1,801 +1,801 @@ -Credit Memos,Credit Memos,, -Orders,Orders,, -Invoices,Invoices,, -We can't get the order instance right now.,We can't get the order instance right now.,, -Create New Order,Create New Order,, -Save Order Address,Save Order Address,, -Shipping,Shipping,, -Billing,Billing,, -Edit Order %1 %2 Address,Edit Order %1 %2 Address,, -Order Address Information,Order Address Information,, -Please correct the parent block for this block.,Please correct the parent block for this block.,, -Submit Comment,Submit Comment,, -Submit Order,Submit Order,, -Are you sure you want to cancel this order?,Are you sure you want to cancel this order?,, -Cancel,Cancel,, -Billing Address,Billing Address,, -Payment Method,Payment Method,, -Order Comment,Order Comment,, -Coupons,Coupons,, -Please select a customer,Please select a customer,, -Create New Customer,Create New Customer,, -Account Information,Account Information,, -From,From,, -To,To,, -Message,Message,, -Edit Order #%1,Edit Order #%1,, -Create New Order for %1 in %2,Create New Order for %1 in %2,, -Create New Order in %1,Create New Order in %1,, -Create New Order for %1,Create New Order for %1,, -Create New Order for New Customer,Create New Order for New Customer,, -Items Ordered,Items Ordered,, -This product is disabled.,This product is disabled.,, -Buy %1 for price %2,Buy %1 for price %2,, -Item ordered qty,Item ordered qty,, -%1 with %2 discount each,%1 with %2 discount each,, -%1 for %2,%1 for %2,, -* - Enter custom price including tax,* - Enter custom price including tax,, -* - Enter custom price excluding tax,* - Enter custom price excluding tax,, -Configure,Configure,, -This product does not have any configurable options,This product does not have any configurable options,, -Newsletter Subscription,Newsletter Subscription,, -Please select products,Please select products,, -Add Selected Product(s) to Order,Add Selected Product(s) to Order,, -ID,ID,, -Product,Product,, -SKU,SKU,, -Price,Price,, -Select,Select,, -Quantity,Quantity,, -Shipping Address,Shipping Address,, -Shipping Method,Shipping Method,, -Update Changes,Update Changes,, -Shopping Cart,Shopping Cart,, -Are you sure you want to delete all items from shopping cart?,Are you sure you want to delete all items from shopping cart?,, -Clear Shopping Cart,Clear Shopping Cart,, -Products in Comparison List,Products in Comparison List,, -Recently Compared Products,Recently Compared Products,, -Recently Viewed Products,Recently Viewed Products,, -Last Ordered Items,Last Ordered Items,, -Recently Viewed,Recently Viewed,, -Wish List,Wish List,, -Please select a store,Please select a store,, -Order Totals,Order Totals,, -Shipping Incl. Tax (%1),Shipping Incl. Tax (%1),, -Shipping Excl. Tax (%1),Shipping Excl. Tax (%1),, -New Credit Memo for Invoice #%1,New Credit Memo for Invoice #%1,, -New Credit Memo for Order #%1,New Credit Memo for Order #%1,, -Refund Shipping (Incl. Tax),Refund Shipping (Incl. Tax),, -Refund Shipping (Excl. Tax),Refund Shipping (Excl. Tax),, -Refund Shipping,Refund Shipping,, -Update Qty's,Update Qty's,, -Refund,Refund,, -Refund Offline,Refund Offline,, -Paid Amount,Paid Amount,, -Refund Amount,Refund Amount,, -Shipping Amount,Shipping Amount,, -Shipping Refund,Shipping Refund,, -Order Grand Total,Order Grand Total,, -Adjustment Refund,Adjustment Refund,, -Adjustment Fee,Adjustment Fee,, -Send Email,Send Email,, -Are you sure you want to send a credit memo email to customer?,Are you sure you want to send a credit memo email to customer?,, -Void,Void,, -Print,Print,, -The credit memo email was sent.,The credit memo email was sent.,, -The credit memo email wasn't sent.,The credit memo email wasn't sent.,, -Credit Memo #%1 | %3 | %2 (%4),Credit Memo #%1 | %3 | %2 (%4),, -Total Refund,Total Refund,, -New Invoice and Shipment for Order #%1,New Invoice and Shipment for Order #%1,, -New Invoice for Order #%1,New Invoice for Order #%1,, -Submit Invoice and Shipment,Submit Invoice and Shipment,, -Submit Invoice,Submit Invoice,, -Are you sure you want to send an invoice email to customer?,Are you sure you want to send an invoice email to customer?,, -Credit Memo,Credit Memo,, -Capture,Capture,, -The invoice email was sent.,The invoice email was sent.,, -The invoice email wasn't sent.,The invoice email wasn't sent.,, -Invoice #%1 | %2 | %4 (%3),Invoice #%1 | %2 | %4 (%3),, -Invalid parent block for this block,Invalid parent block for this block,, -Order Statuses,Order Statuses,, -Create New Status,Create New Status,, -Assign Status to State,Assign Status to State,, -Save Status Assignment,Save Status Assignment,, -Assign Order Status to State,Assign Order Status to State,, -Assignment Information,Assignment Information,, -Order Status,Order Status,, -Order State,Order State,, -Use Order Status As Default,Use Order Status As Default,, -Visible On Storefront,Visible On Storefront,, -Edit Order Status,Edit Order Status,, -Save Status,Save Status,, -New Order Status,New Order Status,, -Order Status Information,Order Status Information,, -Status Code,Status Code,, -Status Label,Status Label,, -Store View Specific Labels,Store View Specific Labels,, -Total Paid,Total Paid,, -Total Refunded,Total Refunded,, -Total Due,Total Due,, -Edit,Edit,, -Are you sure you want to send an order email to customer?,Are you sure you want to send an order email to customer?,, -"This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?","This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?",, -Are you sure you want to void the payment?,Are you sure you want to void the payment?,, -Hold,Hold,, -hold,hold,, -Unhold,Unhold,, -unhold,unhold,, -Are you sure you want to accept this payment?,Are you sure you want to accept this payment?,, -Accept Payment,Accept Payment,, -Are you sure you want to deny this payment?,Are you sure you want to deny this payment?,, -Deny Payment,Deny Payment,, -Get Payment Update,Get Payment Update,, -Invoice and Ship,Invoice and Ship,, -Invoice,Invoice,, -Ship,Ship,, -Reorder,Reorder,, -Order # %1 %2 | %3,Order # %1 %2 | %3,, -"This order contains (%1) items and therefore cannot be edited through the admin interface. If you wish to continue editing, the (%2) items will be removed, the order will be canceled and a new order will be placed.","This order contains (%1) items and therefore cannot be edited through the admin interface. If you wish to continue editing, the (%2) items will be removed, the order will be canceled and a new order will be placed.",, -Are you sure? This order will be canceled and a new one will be created instead.,Are you sure? This order will be canceled and a new one will be created instead.,, -Save Gift Message,Save Gift Message,, - [deleted], [deleted],, -Order Credit Memos,Order Credit Memos,, -Credit memo #%1 created,Credit memo #%1 created,, -Credit memo #%1 comment added,Credit memo #%1 comment added,, -Shipment #%1 created,Shipment #%1 created,, -Shipment #%1 comment added,Shipment #%1 comment added,, -Invoice #%1 created,Invoice #%1 created,, -Invoice #%1 comment added,Invoice #%1 comment added,, -Tracking number %1 for %2 assigned,Tracking number %1 for %2 assigned,, -Comments History,Comments History,, -Order History,Order History,, -Information,Information,, -Order Information,Order Information,, -Order Invoices,Order Invoices,, -Shipments,Shipments,, -Order Shipments,Order Shipments,, -Transactions,Transactions,, -Order View,Order View,, -Any,Any,, -Specified,Specified,, -Applies to Any of the Specified Order Statuses except canceled orders,Applies to Any of the Specified Order Statuses except canceled orders,, -Cart Price Rule,Cart Price Rule,, -Yes,Yes,, -No,No,, -Show Actual Values,Show Actual Values,, -New Order RSS,New Order RSS,, -Subtotal,Subtotal,, -Shipping & Handling,Shipping & Handling,, -Discount (%1),Discount (%1),, -Discount,Discount,, -Grand Total,Grand Total,, -Back,Back,, -Fetch,Fetch,, -Transaction # %1 | %2,Transaction # %1 | %2,, -N/A,N/A,, -Key,Key,, -Value,Value,, -We found an invalid entity model.,We found an invalid entity model.,, -Order # %1,Order # %1,, -Back to My Orders,Back to My Orders,, -View Another Order,View Another Order,, -About Your Refund,About Your Refund,, -My Orders,My Orders,, -Subscribe to Order Status,Subscribe to Order Status,, -About Your Invoice,About Your Invoice,, -Print Order # %1,Print Order # %1,, -Grand Total to be Charged,Grand Total to be Charged,, -Unassign,Unassign,, -We can't add this item to your shopping cart right now.,We can't add this item to your shopping cart right now.,, -You sent the message.,You sent the message.,, -Sales,Sales,, -Invoice capturing error,Invoice capturing error,, -This order no longer exists.,This order no longer exists.,, -Please enter a comment.,Please enter a comment.,, -We cannot add order history.,We cannot add order history.,, -You updated the order address.,You updated the order address.,, -We can't update the order address right now.,We can't update the order address right now.,, -You have not canceled the item.,You have not canceled the item.,, -You canceled the order.,You canceled the order.,, -"""%1"" coupon code was not applied. Do not apply discount is selected for item(s)","""%1"" coupon code was not applied. Do not apply discount is selected for item(s)",, -"""%1"" coupon code is not valid.","""%1"" coupon code is not valid.",, -The coupon code has been accepted.,The coupon code has been accepted.,, -Quote item id is not received.,Quote item id is not received.,, -Quote item is not loaded.,Quote item is not loaded.,, -New Order,New Order,, -You created the order.,You created the order.,, -Order saving error: %1,Order saving error: %1,, -Cannot add new comment.,Cannot add new comment.,, -The credit memo has been canceled.,The credit memo has been canceled.,, -Credit memo has not been canceled.,Credit memo has not been canceled.,, -New Memo for #%1,New Memo for #%1,, -New Memo,New Memo,, -The credit memo's total must be positive.,The credit memo's total must be positive.,, -Cannot create online refund for Refund to Store Credit.,Cannot create online refund for Refund to Store Credit.,, -You created the credit memo.,You created the credit memo.,, -We can't save the credit memo right now.,We can't save the credit memo right now.,, -We can't update the item's quantity right now.,We can't update the item's quantity right now.,, -View Memo for #%1,View Memo for #%1,, -View Memo,View Memo,, -You voided the credit memo.,You voided the credit memo.,, -We can't void the credit memo.,We can't void the credit memo.,, -The order no longer exists.,The order no longer exists.,, -We can't create credit memo for the order.,We can't create credit memo for the order.,, -Edit Order,Edit Order,, -You sent the order email.,You sent the order email.,, -We can't send the email order right now.,We can't send the email order right now.,, -You have not put the order on hold.,You have not put the order on hold.,, -You put the order on hold.,You put the order on hold.,, -You canceled the invoice.,You canceled the invoice.,, -Invoice canceling error,Invoice canceling error,, -The invoice has been captured.,The invoice has been captured.,, -The order does not allow an invoice to be created.,The order does not allow an invoice to be created.,, -You can't create an invoice without products.,You can't create an invoice without products.,, -New Invoice,New Invoice,, -We can't save the invoice right now.,We can't save the invoice right now.,, -You created the invoice and shipment.,You created the invoice and shipment.,, -The invoice has been created.,The invoice has been created.,, -We can't send the invoice email right now.,We can't send the invoice email right now.,, -We can't send the shipment right now.,We can't send the shipment right now.,, -Cannot update item quantity.,Cannot update item quantity.,, -The invoice has been voided.,The invoice has been voided.,, -Invoice voiding error,Invoice voiding error,, -%1 order(s) cannot be canceled.,%1 order(s) cannot be canceled.,, -You cannot cancel the order(s).,You cannot cancel the order(s).,, -We canceled %1 order(s).,We canceled %1 order(s).,, -%1 order(s) were not put on hold.,%1 order(s) were not put on hold.,, -No order(s) were put on hold.,No order(s) were put on hold.,, -You have put %1 order(s) on hold.,You have put %1 order(s) on hold.,, -%1 order(s) were not released from on hold status.,%1 order(s) were not released from on hold status.,, -No order(s) were released from on hold status.,No order(s) were released from on hold status.,, -%1 order(s) have been released from on hold status.,%1 order(s) have been released from on hold status.,, -There are no printable documents related to selected orders.,There are no printable documents related to selected orders.,, -The payment has been accepted.,The payment has been accepted.,, -The payment has been denied.,The payment has been denied.,, -Transaction has been approved.,Transaction has been approved.,, -Transaction has been voided/declined.,Transaction has been voided/declined.,, -There is no update for the transaction.,There is no update for the transaction.,, -We can't update the payment right now.,We can't update the payment right now.,, -You assigned the order status.,You assigned the order status.,, -Something went wrong while assigning the order status.,Something went wrong while assigning the order status.,, -We can't find this order status.,We can't find this order status.,, -Create New Order Status,Create New Order Status,, -We found another order status with the same order status code.,We found another order status with the same order status code.,, -You saved the order status.,You saved the order status.,, -We can't add the order status right now.,We can't add the order status right now.,, -You have unassigned the order status.,You have unassigned the order status.,, -Something went wrong while unassigning the order.,Something went wrong while unassigning the order.,, -Can't unhold order.,Can't unhold order.,, -You released the order from holding status.,You released the order from holding status.,, -The order was not on hold.,The order was not on hold.,, -Exception occurred during order load,Exception occurred during order load,, -Something went wrong while saving the gift message.,Something went wrong while saving the gift message.,, -You saved the gift card message.,You saved the gift card message.,, -The payment has been voided.,The payment has been voided.,, -We can't void the payment right now.,We can't void the payment right now.,, -Please correct the transaction ID and try again.,Please correct the transaction ID and try again.,, -The transaction details have been updated.,The transaction details have been updated.,, -We can't update the transaction details.,We can't update the transaction details.,, -Orders and Returns,Orders and Returns,, -You entered incorrect data. Please try again.,You entered incorrect data. Please try again.,, -Home,Home,, -Go to Home Page,Go to Home Page,, -We can't find this wish list.,We can't find this wish list.,, -"We could not add a product to cart by the ID ""%1"".","We could not add a product to cart by the ID ""%1"".",, -There is an error in one of the option rows.,There is an error in one of the option rows.,, -Shipping Address: ,Shipping Address: ,, -Billing Address: ,Billing Address: ,, -Please specify order items.,Please specify order items.,, -Please specify a shipping method.,Please specify a shipping method.,, -Please specify a payment method.,Please specify a payment method.,, -This payment method is not available.,This payment method is not available.,, -Validation is failed.,Validation is failed.,, -You did not email your customer. Please check your email settings.,You did not email your customer. Please check your email settings.,, --- Please Select --,-- Please Select --,, -"Path ""%1"" is not part of allowed directory ""%2""","Path ""%1"" is not part of allowed directory ""%2""",, -Identifying Fields required,Identifying Fields required,, -Id required,Id required,, -"""Invoice Document Validation Error(s):\n"" .","""Invoice Document Validation Error(s):\n"" .",, -"Could not save an invoice, see error log for details","Could not save an invoice, see error log for details",, -A hold action is not available.,A hold action is not available.,, -You cannot remove the hold.,You cannot remove the hold.,, -We cannot cancel this order.,We cannot cancel this order.,, -Guest,Guest,, -Please enter the first name.,Please enter the first name.,, -Please enter the last name.,Please enter the last name.,, -Please enter the street.,Please enter the street.,, -Please enter the city.,Please enter the city.,, -Please enter the phone number.,Please enter the phone number.,, -Please enter the company.,Please enter the company.,, -Please enter the fax number.,Please enter the fax number.,, -Please enter the zip/postal code.,Please enter the zip/postal code.,, -Please enter the country.,Please enter the country.,, -Please enter the state/province.,Please enter the state/province.,, -Requested entity doesn't exist,Requested entity doesn't exist,, -Could not delete order address,Could not delete order address,, -Could not save order address,Could not save order address,, -Pending,Pending,, -Refunded,Refunded,, -Canceled,Canceled,, -Unknown State,Unknown State,, -"We found an invalid quantity to refund item ""%1"".","We found an invalid quantity to refund item ""%1"".",, -The creditmemo contains product item that is not part of the original order.,The creditmemo contains product item that is not part of the original order.,, -The quantity to refund must not be greater than the unrefunded quantity.,The quantity to refund must not be greater than the unrefunded quantity.,, -Maximum shipping amount allowed to refund is: %1,Maximum shipping amount allowed to refund is: %1,, -Order Id is required for creditmemo document,Order Id is required for creditmemo document,, -"The creditmemo contains product SKU ""%1"" that is not part of the original order.","The creditmemo contains product SKU ""%1"" that is not part of the original order.",, -"The quantity to creditmemo must not be greater than the unrefunded quantity for product SKU ""%1"".","The quantity to creditmemo must not be greater than the unrefunded quantity for product SKU ""%1"".",, -You can't create a creditmemo without products.,You can't create a creditmemo without products.,, -The most money available to refund is %1.,The most money available to refund is %1.,, -Could not delete credit memo,Could not delete credit memo,, -Could not save credit memo,Could not save credit memo,, -This order already has associated customer account,This order already has associated customer account,, -Paid,Paid,, -We cannot register an existing invoice,We cannot register an existing invoice,, -We can't create creditmemo for the invoice.,We can't create creditmemo for the invoice.,, -Order Id is required for invoice document,Order Id is required for invoice document,, -"The quantity to invoice must not be greater than the uninvoiced quantity for product SKU ""%1"".","The quantity to invoice must not be greater than the uninvoiced quantity for product SKU ""%1"".",, -The invoice contains one or more items that are not part of the original order.,The invoice contains one or more items that are not part of the original order.,, -ID required,ID required,, -Unknown Status,Unknown Status,, -Ordered,Ordered,, -Shipped,Shipped,, -Invoiced,Invoiced,, -Backordered,Backordered,, -Returned,Returned,, -Partial,Partial,, -Mixed,Mixed,, -Registered a Void notification.,Registered a Void notification.,, -"If the invoice was created offline, try creating an offline credit memo.","If the invoice was created offline, try creating an offline credit memo.",, -We refunded %1 online.,We refunded %1 online.,, -We refunded %1 offline.,We refunded %1 offline.,, -"IPN ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %1. Transaction ID: ""%2"". Credit Memo has not been created. Please create offline Credit Memo.","IPN ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %1. Transaction ID: ""%2"". Credit Memo has not been created. Please create offline Credit Memo.",, -The credit memo has been created automatically.,The credit memo has been created automatically.,, -Registered notification about refunded amount of %1.,Registered notification about refunded amount of %1.,, -Canceled order online,Canceled order online,, -Canceled order offline,Canceled order offline,, -Approved the payment online.,Approved the payment online.,, -There is no need to approve this payment.,There is no need to approve this payment.,, -Denied the payment online,Denied the payment online,, -Registered update about approved payment.,Registered update about approved payment.,, -Registered update about denied payment.,Registered update about denied payment.,, -There is no update for the payment.,There is no update for the payment.,, -Voided authorization.,Voided authorization.,, -Amount: %1.,Amount: %1.,, -"Transaction ID: ""%1""","Transaction ID: ""%1""",, -The payment method you requested is not available.,The payment method you requested is not available.,, -The payment disallows storing objects.,The payment disallows storing objects.,, -"The transaction ""%1"" cannot be captured yet.","The transaction ""%1"" cannot be captured yet.",, -The order amount of %1 is pending approval on the payment gateway.,The order amount of %1 is pending approval on the payment gateway.,, -Ordered amount of %1,Ordered amount of %1,, -An amount of %1 will be captured after being approved at the payment gateway.,An amount of %1 will be captured after being approved at the payment gateway.,, -Registered notification about captured amount of %1.,Registered notification about captured amount of %1.,, -Order is suspended as its capture amount %1 is suspected to be fraudulent.,Order is suspended as its capture amount %1 is suspected to be fraudulent.,, -The parent transaction ID must have a transaction ID.,The parent transaction ID must have a transaction ID.,, -Payment transactions disallow storing objects.,Payment transactions disallow storing objects.,, -"The transaction ""%1"" (%2) is already closed.","The transaction ""%1"" (%2) is already closed.",, -Set order for existing transactions not allowed,Set order for existing transactions not allowed,, -"At minimum, you need to set a payment ID.","At minimum, you need to set a payment ID.",, -Order,Order,, -Authorization,Authorization,, -"We found an unsupported transaction type ""%1"".","We found an unsupported transaction type ""%1"".",, -Please set a proper payment and order id.,Please set a proper payment and order id.,, -Please enter a Transaction ID.,Please enter a Transaction ID.,, -You can't do this without a transaction object.,You can't do this without a transaction object.,, -Order # ,Order # ,, -Order Date: ,Order Date: ,, -Sold to:,Sold to:,, -Ship to:,Ship to:,, -Payment Method:,Payment Method:,, -Shipping Method:,Shipping Method:,, -Total Shipping Charges,Total Shipping Charges,, -Title,Title,, -Number,Number,, -We found an invalid renderer model.,We found an invalid renderer model.,, -Please define the PDF object before using.,Please define the PDF object before using.,, -"We don't recognize the draw line data. Please define the ""lines"" array.","We don't recognize the draw line data. Please define the ""lines"" array.",, -Products,Products,, -Total (ex),Total (ex),, -Qty,Qty,, -Tax,Tax,, -Total (inc),Total (inc),, -Credit Memo # ,Credit Memo # ,, -Invoice # ,Invoice # ,, -The order object is not specified.,The order object is not specified.,, -The source object is not specified.,The source object is not specified.,, -An item object is not specified.,An item object is not specified.,, -A PDF object is not specified.,A PDF object is not specified.,, -A PDF page object is not specified.,A PDF page object is not specified.,, -Excl. Tax,Excl. Tax,, -Incl. Tax,Incl. Tax,, -Packing Slip # ,Packing Slip # ,, -title,title,, -The PDF total model %1 must be or extend \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal.,The PDF total model %1 must be or extend \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal.,, -We cannot register an existing shipment,We cannot register an existing shipment,, -Parent shipment cannot be loaded for track object.,Parent shipment cannot be loaded for track object.,, -Order Id is required for shipment document,Order Id is required for shipment document,, -You can't create a shipment without products.,You can't create a shipment without products.,, -"The shipment contains product SKU ""%1"" that is not part of the original order.","The shipment contains product SKU ""%1"" that is not part of the original order.",, -"The quantity to ship must not be greater than the unshipped quantity for product SKU ""%1"".","The quantity to ship must not be greater than the unshipped quantity for product SKU ""%1"".",, -Please enter a tracking number.,Please enter a tracking number.,, -Could not delete shipment,Could not delete shipment,, -Could not save shipment,Could not save shipment,, -The last status can't be unassigned from its current state.,The last status can't be unassigned from its current state.,, -"Status can't be unassigned, because it is used by existing order(s).","Status can't be unassigned, because it is used by existing order(s).",, -The total model should be extended from \Magento\Sales\Model\Order\Total\AbstractTotal.,The total model should be extended from \Magento\Sales\Model\Order\Total\AbstractTotal.,, -An invoice cannot be created when an order has a status of %1,An invoice cannot be created when an order has a status of %1,, -A creditmemo can not be created when an order has a status of %1,A creditmemo can not be created when an order has a status of %1,, -The order does not allow a creditmemo to be created.,The order does not allow a creditmemo to be created.,, -A shipment cannot be created when an order has a status of %1,A shipment cannot be created when an order has a status of %1,, -The order does not allow a shipment to be created.,The order does not allow a shipment to be created.,, -"""Creditmemo Document Validation Error(s):\n"" .","""Creditmemo Document Validation Error(s):\n"" .",, -"Could not save a Creditmemo, see error log for details","Could not save a Creditmemo, see error log for details",, -We cannot determine the field name.,We cannot determine the field name.,, -City,City,, -Company,Company,, -Country,Country,, -Email,Email,, -First Name,First Name,, -Last Name,Last Name,, -State/Province,State/Province,, -Street Address,Street Address,, -Phone Number,Phone Number,, -Zip/Postal Code,Zip/Postal Code,, -We can't save the address:\n%1,We can't save the address:\n%1,, -Cannot save comment:\n%1,Cannot save comment:\n%1,, -We don't have enough information to save the parent transaction ID.,We don't have enough information to save the parent transaction ID.,, -We cannot create an empty shipment.,We cannot create an empty shipment.,, -Cannot save track:\n%1,Cannot save track:\n%1,, -Cannot unassign status from state,Cannot unassign status from state,, -New Orders,New Orders,, -Order #%1 created at %2,Order #%1 created at %2,, -Details for %1 #%2,Details for %1 #%2,, -Notified Date: %1,Notified Date: %1,, -Comment: %1
,Comment: %1
,, -Current Status: %1
,Current Status: %1
,, -Total: %1
,Total: %1
,, -Order # %1 Notification(s),Order # %1 Notification(s),, -You can not cancel Credit Memo,You can not cancel Credit Memo,, -Could not cancel creditmemo,Could not cancel creditmemo,, -We cannot register an existing credit memo.,We cannot register an existing credit memo.,, -"We found an invalid quantity to invoice item ""%1"".","We found an invalid quantity to invoice item ""%1"".",, -"The Order State ""%1"" must not be set manually.","The Order State ""%1"" must not be set manually.",, -"""Shipment Document Validation Error(s):\n"" .","""Shipment Document Validation Error(s):\n"" .",, -"Could not save a shipment, see error log for details","Could not save a shipment, see error log for details",, -VAT Request Identifier,VAT Request Identifier,, -VAT Request Date,VAT Request Date,, -Pending Payment,Pending Payment,, -Processing,Processing,, -On Hold,On Hold,, -Complete,Complete,, -Closed,Closed,, -Suspected Fraud,Suspected Fraud,, -Payment Review,Payment Review,, -New,New,, -test message,test message,, -Email has not been sent,Email has not been sent,, -Authorized amount of %1.,Authorized amount of %1.,, -We will authorize %1 after the payment is approved at the payment gateway.,We will authorize %1 after the payment is approved at the payment gateway.,, -Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.,Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.,, -Captured amount of %1 online.,Captured amount of %1 online.,, -Authorized amount of %1,Authorized amount of %1,, -" Transaction ID: ""%1"""," Transaction ID: ""%1""",, -View,View,, -Group was removed,Group was removed,, -"Changing address information will not recalculate shipping, tax or other order amount.","Changing address information will not recalculate shipping, tax or other order amount.",, -Comment Text,Comment Text,, -Notify Customer by Email,Notify Customer by Email,, -Visible on Storefront,Visible on Storefront,, -Customer,Customer,, -Notified,Notified,, -Not Notified,Not Notified,, -No Payment Methods,No Payment Methods,, -Order Comments,Order Comments,, -Apply Coupon Code,Apply Coupon Code,, -Apply,Apply,, -Remove Coupon Code,Remove Coupon Code,, -Remove,Remove,, -Address Information,Address Information,, -Payment &, Shipping Information,Payment &, Shipping Information -Order Total,Order Total,, -Order Currency:,Order Currency:,, -Same As Billing Address,Same As Billing Address,, -Select from existing customer addresses:,Select from existing customer addresses:,, -Add New Address,Add New Address,, -Save in address book,Save in address book,, -You don't need to select a shipping address.,You don't need to select a shipping address.,, -Gift Message for the Entire Order,Gift Message for the Entire Order,, -Leave this box blank if you don't want to leave a gift message for the entire order.,Leave this box blank if you don't want to leave a gift message for the entire order.,, -Row Subtotal,Row Subtotal,, -Action,Action,, -No ordered items,No ordered items,, -Update Items and Quantities,Update Items and Quantities,, -Total %1 product(s),Total %1 product(s),, -Subtotal:,Subtotal:,, -Tier Pricing,Tier Pricing,, -Custom Price,Custom Price,, -Please select,Please select,, -Move to Shopping Cart,Move to Shopping Cart,, -Move to Wish List,Move to Wish List,, -Subscribe to Newsletter,Subscribe to Newsletter,, -Click to change shipping method,Click to change shipping method,, -"Sorry, no quotes are available for this order.","Sorry, no quotes are available for this order.",, -Get shipping methods and rates,Get shipping methods and rates,, -You don't need to select a shipping method.,You don't need to select a shipping method.,, -Customer's Activities,Customer's Activities,, -Refresh,Refresh,, -Item,Item,, -Add To Order,Add To Order,, -Configure and Add to Order,Configure and Add to Order,, -No items,No items,, -Append Comments,Append Comments,, -Email Order Confirmation,Email Order Confirmation,, -Grand Total Excl. Tax,Grand Total Excl. Tax,, -Grand Total Incl. Tax,Grand Total Incl. Tax,, -Subtotal (Excl. Tax),Subtotal (Excl. Tax),, -Subtotal (Incl. Tax),Subtotal (Incl. Tax),, -Payment &, Shipping Method,Payment &, Shipping Method -Payment Information,Payment Information,, -The order was placed using %1.,The order was placed using %1.,, -Shipping Information,Shipping Information,, -Items to Refund,Items to Refund,, -Return to Stock,Return to Stock,, -Qty to Refund,Qty to Refund,, -Tax Amount,Tax Amount,, -Discount Amount,Discount Amount,, -Row Total,Row Total,, -No Items To Refund,No Items To Refund,, -Credit Memo Comments,Credit Memo Comments,, -Refund Totals,Refund Totals,, -Email Copy of Credit Memo,Email Copy of Credit Memo,, -Please enter a positive number in this field.,Please enter a positive number in this field.,, -Items Refunded,Items Refunded,, -No Items,No Items,, -Memo Total,Memo Total,, -Credit Memo History,Credit Memo History,, -Credit Memo Totals,Credit Memo Totals,, -Customer Name: %1,Customer Name: %1,, -Purchased From: %1,Purchased From: %1,, -Gift Message,Gift Message,, -From:,From:,, -To:,To:,, -Message:,Message:,, -Shipping &, Handling,Shipping &, Handling -Gift Options,Gift Options,, -Create Shipment,Create Shipment,, -Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice.,Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice.,, -%1,%1,, -Qty to Invoice,Qty to Invoice,, -Invoice History,Invoice History,, -Invoice Comments,Invoice Comments,, -Invoice Totals,Invoice Totals,, -Amount,Amount,, -Capture Online,Capture Online,, -Capture Offline,Capture Offline,, -Not Capture,Not Capture,, -The invoice will be created offline without the payment gateway.,The invoice will be created offline without the payment gateway.,, -Email Copy of Invoice,Email Copy of Invoice,, -Items Invoiced,Items Invoiced,, -Total Tax,Total Tax,, -From Name,From Name,, -To Name,To Name,, -Status,Status,, -Comment,Comment,, -Notification Not Applicable,Notification Not Applicable,, -Order & Account Information,Order & Account Information,, -The order confirmation email was sent,The order confirmation email was sent,, -The order confirmation email is not sent,The order confirmation email is not sent,, -Order Date,Order Date,, -Order Date (%1),Order Date (%1),, -Purchased From,Purchased From,, -Link to the New Order,Link to the New Order,, -Link to the Previous Order,Link to the Previous Order,, -Placed from IP,Placed from IP,, -%1 / %2 rate:,%1 / %2 rate:,, -Customer Name,Customer Name,, -Customer Group,Customer Group,, -Notes for this Order,Notes for this Order,, -Comment added,Comment added,, -Transaction Data,Transaction Data,, -Transaction ID,Transaction ID,, -Parent Transaction ID,Parent Transaction ID,, -Order ID,Order ID,, -Transaction Type,Transaction Type,, -Is Closed,Is Closed,, -Created At,Created At,, -Child Transactions,Child Transactions,, -Transaction Details,Transaction Details,, -Items,Items,, -Gift Message for this Order,Gift Message for this Order,, -Shipped By,Shipped By,, -Tracking Number,Tracking Number,, -Billing Last Name,Billing Last Name,, -Find Order By,Find Order By,, -ZIP Code,ZIP Code,, -Billing ZIP Code,Billing ZIP Code,, -Continue,Continue,, -Print All Refunds,Print All Refunds,, -Refund #,Refund #,, -Print Refund,Print Refund,, -Product Name,Product Name,, -Order #,Order #,, -Date,Date,, -Ship To,Ship To,, -Actions,Actions,, -View Order,View Order,, -You have placed no orders.,You have placed no orders.,, -No shipping information available,No shipping information available,, -Print Order,Print Order,, -Print All Invoices,Print All Invoices,, -Invoice #,Invoice #,, -Print Invoice,Print Invoice,, -Qty Invoiced,Qty Invoiced,, -Close,Close,, -About Your Order,About Your Order,, -"Order Date: %1","Order Date: %1",, -Refund #%1,Refund #%1,, -Shipment #%1,Shipment #%1,, -Qty Shipped,Qty Shipped,, -Recent Orders,Recent Orders,, -View All,View All,, -Gift Message for This Order,Gift Message for This Order,, -Recently Ordered,Recently Ordered,, -Add to Cart,Add to Cart,, -Search,Search,, -Credit memo for your %store_name order,Credit memo for your %store_name order,, -"%name,","%name,",, -Thank you for your order from %store_name.,Thank you for your order from %store_name.,, -"You can check the status of your order by logging into your account.","You can check the status of your order by logging into your account.",, -"If you have questions about your order, you can email us at %store_email","If you have questions about your order, you can email us at %store_email",, -"or call us at %store_phone","or call us at %store_phone",, -"Our hours are %store_hours.","Our hours are %store_hours.",, -Your Credit Memo #%creditmemo_id for Order #%order_id,Your Credit Memo #%creditmemo_id for Order #%order_id,, -Billing Info,Billing Info,, -Shipping Info,Shipping Info,, -Update to your %store_name credit memo,Update to your %store_name credit memo,, -Your order #%increment_id has been updated with a status of %order_status.,Your order #%increment_id has been updated with a status of %order_status.,, -Invoice for your %store_name order,Invoice for your %store_name order,, -Your Invoice #%invoice_id for Order #%order_id,Your Invoice #%invoice_id for Order #%order_id,, -Update to your %store_name invoice,Update to your %store_name invoice,, -Your %store_name order confirmation,Your %store_name order confirmation,, -"%customer_name,","%customer_name,",, -Once your package ships we will send you a tracking number.,Once your package ships we will send you a tracking number.,, -"Your Order #%increment_id","Your Order #%increment_id",, -"Placed on %created_at","Placed on %created_at",, -Once your package ships we will send an email with a link to track your order.,Once your package ships we will send an email with a link to track your order.,, -Update to your %store_name order,Update to your %store_name order,, -Your %store_name order has shipped,Your %store_name order has shipped,, -Your shipping confirmation is below. Thank you again for your business.,Your shipping confirmation is below. Thank you again for your business.,, -Your Shipment #%shipment_id for Order #%order_id,Your Shipment #%shipment_id for Order #%order_id,, -Update to your %store_name shipment,Update to your %store_name shipment,, -Gift Options for ,Gift Options for ,, -Add Products,Add Products,, -You have item changes,You have item changes,, -Ok,Ok,, -Operations,Operations,, -Create,Create,, -Send Order Email,Send Order Email,, -Accept or Deny Payment,Accept or Deny Payment,, -Send Sales Emails,Send Sales Emails,, -Sales Section,Sales Section,, -Sales Emails Section,Sales Emails Section,, -General,General,, -Hide Customer IP,Hide Customer IP,, -"Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos.","Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos.",, -Checkout Totals Sort Order,Checkout Totals Sort Order,, -Allow Reorder,Allow Reorder,, -Invoice and Packing Slip Design,Invoice and Packing Slip Design,, -Logo for PDF Print-outs (200x50),Logo for PDF Print-outs (200x50),, -"Your default logo will be used in PDF and HTML documents.
(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image.","Your default logo will be used in PDF and HTML documents.
(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image.",, -Logo for HTML Print View,Logo for HTML Print View,, -"Logo for HTML documents only. If empty, default will be used.
(jpeg, gif, png)","Logo for HTML documents only. If empty, default will be used.
(jpeg, gif, png)",, -Address,Address,, -Minimum Order Amount,Minimum Order Amount,, -Enable,Enable,, -Minimum Amount,Minimum Amount,, -Subtotal after discount,Subtotal after discount,, -Include Tax to Amount,Include Tax to Amount,, -Description Message,Description Message,, -This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount.,This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount.,, -Error to Show in Shopping Cart,Error to Show in Shopping Cart,, -Validate Each Address Separately in Multi-address Checkout,Validate Each Address Separately in Multi-address Checkout,, -Multi-address Description Message,Multi-address Description Message,, -We'll use the default description above if you leave this empty.,We'll use the default description above if you leave this empty.,, -Multi-address Error to Show in Shopping Cart,Multi-address Error to Show in Shopping Cart,, -We'll use the default error above if you leave this empty.,We'll use the default error above if you leave this empty.,, -Dashboard,Dashboard,, -Use Aggregated Data,Use Aggregated Data,, -Orders Cron Settings,Orders Cron Settings,, -Pending Payment Order Lifetime (minutes),Pending Payment Order Lifetime (minutes),, -Sales Emails,Sales Emails,, -Asynchronous sending,Asynchronous sending,, -Enabled,Enabled,, -New Order Confirmation Email Sender,New Order Confirmation Email Sender,, -New Order Confirmation Template,New Order Confirmation Template,, -"Email template chosen based on theme fallback when ""Default"" option is selected.","Email template chosen based on theme fallback when ""Default"" option is selected.",, -New Order Confirmation Template for Guest,New Order Confirmation Template for Guest,, -Send Order Email Copy To,Send Order Email Copy To,, -Comma-separated,Comma-separated,, -Send Order Email Copy Method,Send Order Email Copy Method,, -Order Comment Email Sender,Order Comment Email Sender,, -Order Comment Email Template,Order Comment Email Template,, -Order Comment Email Template for Guest,Order Comment Email Template for Guest,, -Send Order Comment Email Copy To,Send Order Comment Email Copy To,, -Send Order Comments Email Copy Method,Send Order Comments Email Copy Method,, -Invoice Email Sender,Invoice Email Sender,, -Invoice Email Template,Invoice Email Template,, -Invoice Email Template for Guest,Invoice Email Template for Guest,, -Send Invoice Email Copy To,Send Invoice Email Copy To,, -Send Invoice Email Copy Method,Send Invoice Email Copy Method,, -Invoice Comment Email Sender,Invoice Comment Email Sender,, -Invoice Comment Email Template,Invoice Comment Email Template,, -Invoice Comment Email Template for Guest,Invoice Comment Email Template for Guest,, -Send Invoice Comment Email Copy To,Send Invoice Comment Email Copy To,, -Send Invoice Comments Email Copy Method,Send Invoice Comments Email Copy Method,, -Shipment,Shipment,, -Shipment Email Sender,Shipment Email Sender,, -Shipment Email Template,Shipment Email Template,, -Shipment Email Template for Guest,Shipment Email Template for Guest,, -Send Shipment Email Copy To,Send Shipment Email Copy To,, -Send Shipment Email Copy Method,Send Shipment Email Copy Method,, -Shipment Comments,Shipment Comments,, -Shipment Comment Email Sender,Shipment Comment Email Sender,, -Shipment Comment Email Template,Shipment Comment Email Template,, -Shipment Comment Email Template for Guest,Shipment Comment Email Template for Guest,, -Send Shipment Comment Email Copy To,Send Shipment Comment Email Copy To,, -Send Shipment Comments Email Copy Method,Send Shipment Comments Email Copy Method,, -Credit Memo Email Sender,Credit Memo Email Sender,, -Credit Memo Email Template,Credit Memo Email Template,, -Credit Memo Email Template for Guest,Credit Memo Email Template for Guest,, -Send Credit Memo Email Copy To,Send Credit Memo Email Copy To,, -Send Credit Memo Email Copy Method,Send Credit Memo Email Copy Method,, -Credit Memo Comment Email Sender,Credit Memo Comment Email Sender,, -Credit Memo Comment Email Template,Credit Memo Comment Email Template,, -Credit Memo Comment Email Template for Guest,Credit Memo Comment Email Template for Guest,, -Send Credit Memo Comment Email Copy To,Send Credit Memo Comment Email Copy To,, -Send Credit Memo Comments Email Copy Method,Send Credit Memo Comments Email Copy Method,, -PDF Print-outs,PDF Print-outs,, -Display Order ID in Header,Display Order ID in Header,, -Customer Order Status Notification,Customer Order Status Notification,, -Asynchronous indexing,Asynchronous indexing,, -Orders and Returns Search Form,Orders and Returns Search Form,, -Anchor Custom Title,Anchor Custom Title,, -Template,Template,, -Default Template,Default Template,, -Name,Name,, -Phone,Phone,, -ZIP/Post Code,ZIP/Post Code,, -Signed-up Point,Signed-up Point,, -Website,Website,, -Bill-to Name,Bill-to Name,, -Created,Created,, -Invoice Date,Invoice Date,, -Ship-to Name,Ship-to Name,, -Ship Date,Ship Date,, -Total Quantity,Total Quantity,, -Default Status,Default Status,, -State Code and Title,State Code and Title,, -Item Status,Item Status,, -Original Price,Original Price,, -Tax Percent,Tax Percent,, -All Store Views,All Store Views,, -PDF Credit Memos,PDF Credit Memos,, -Purchase Point,Purchase Point,, -Print Invoices,Print Invoices,, -Print Packing Slips,Print Packing Slips,, -Print Credit Memos,Print Credit Memos,, -Print All,Print All,, -Print Shipping Labels,Print Shipping Labels,, -Purchase Date,Purchase Date,, -Grand Total (Base),Grand Total (Base),, -Grand Total (Purchased),Grand Total (Purchased),, -Customer Email,Customer Email,, -Shipping and Handling,Shipping and Handling,, -PDF Invoices,PDF Invoices,, -PDF Shipments,PDF Shipments,, -PDF Creditmemos,PDF Creditmemos,, -Refunds,Refunds,, -Allow Zero GrandTotal for Creditmemo,Allow Zero GrandTotal for Creditmemo,, -Allow Zero GrandTotal,Allow Zero GrandTotal,, -Email is required field for Admin order creation,Email is required field for Admin order creation,, -If set YES Email field will be required during Admin order creation for new Customer.,If set YES Email field will be required during Admin order creation for new Customer.,, +"Credit Memos","Credit Memos" +Orders,Orders +Invoices,Invoices +"We can't get the order instance right now.","We can't get the order instance right now." +"Create New Order","Create New Order" +"Save Order Address","Save Order Address" +Shipping,Shipping +Billing,Billing +"Edit Order %1 %2 Address","Edit Order %1 %2 Address" +"Order Address Information","Order Address Information" +"Please correct the parent block for this block.","Please correct the parent block for this block." +"Submit Comment","Submit Comment" +"Submit Order","Submit Order" +"Are you sure you want to cancel this order?","Are you sure you want to cancel this order?" +Cancel,Cancel +"Billing Address","Billing Address" +"Payment Method","Payment Method" +"Order Comment","Order Comment" +Coupons,Coupons +"Please select a customer","Please select a customer" +"Create New Customer","Create New Customer" +"Account Information","Account Information" +From,From +To,To +Message,Message +"Edit Order #%1","Edit Order #%1" +"Create New Order for %1 in %2","Create New Order for %1 in %2" +"Create New Order in %1","Create New Order in %1" +"Create New Order for %1","Create New Order for %1" +"Create New Order for New Customer","Create New Order for New Customer" +"Items Ordered","Items Ordered" +"This product is disabled.","This product is disabled." +"Buy %1 for price %2","Buy %1 for price %2" +"Item ordered qty","Item ordered qty" +"%1 with %2 discount each","%1 with %2 discount each" +"%1 for %2","%1 for %2" +"* - Enter custom price including tax","* - Enter custom price including tax" +"* - Enter custom price excluding tax","* - Enter custom price excluding tax" +Configure,Configure +"This product does not have any configurable options","This product does not have any configurable options" +"Newsletter Subscription","Newsletter Subscription" +"Please select products","Please select products" +"Add Selected Product(s) to Order","Add Selected Product(s) to Order" +ID,ID +Product,Product +SKU,SKU +Price,Price +Select,Select +Quantity,Quantity +"Shipping Address","Shipping Address" +"Shipping Method","Shipping Method" +"Update Changes","Update Changes" +"Shopping Cart","Shopping Cart" +"Are you sure you want to delete all items from shopping cart?","Are you sure you want to delete all items from shopping cart?" +"Clear Shopping Cart","Clear Shopping Cart" +"Products in Comparison List","Products in Comparison List" +"Recently Compared Products","Recently Compared Products" +"Recently Viewed Products","Recently Viewed Products" +"Last Ordered Items","Last Ordered Items" +"Recently Viewed","Recently Viewed" +"Wish List","Wish List" +"Please select a store","Please select a store" +"Order Totals","Order Totals" +"Shipping Incl. Tax (%1)","Shipping Incl. Tax (%1)" +"Shipping Excl. Tax (%1)","Shipping Excl. Tax (%1)" +"New Credit Memo for Invoice #%1","New Credit Memo for Invoice #%1" +"New Credit Memo for Order #%1","New Credit Memo for Order #%1" +"Refund Shipping (Incl. Tax)","Refund Shipping (Incl. Tax)" +"Refund Shipping (Excl. Tax)","Refund Shipping (Excl. Tax)" +"Refund Shipping","Refund Shipping" +"Update Qty's","Update Qty's" +Refund,Refund +"Refund Offline","Refund Offline" +"Paid Amount","Paid Amount" +"Refund Amount","Refund Amount" +"Shipping Amount","Shipping Amount" +"Shipping Refund","Shipping Refund" +"Order Grand Total","Order Grand Total" +"Adjustment Refund","Adjustment Refund" +"Adjustment Fee","Adjustment Fee" +"Send Email","Send Email" +"Are you sure you want to send a credit memo email to customer?","Are you sure you want to send a credit memo email to customer?" +Void,Void +Print,Print +"The credit memo email was sent.","The credit memo email was sent." +"The credit memo email wasn't sent.","The credit memo email wasn't sent." +"Credit Memo #%1 | %3 | %2 (%4)","Credit Memo #%1 | %3 | %2 (%4)" +"Total Refund","Total Refund" +"New Invoice and Shipment for Order #%1","New Invoice and Shipment for Order #%1" +"New Invoice for Order #%1","New Invoice for Order #%1" +"Submit Invoice and Shipment","Submit Invoice and Shipment" +"Submit Invoice","Submit Invoice" +"Are you sure you want to send an invoice email to customer?","Are you sure you want to send an invoice email to customer?" +"Credit Memo","Credit Memo" +Capture,Capture +"The invoice email was sent.","The invoice email was sent." +"The invoice email wasn't sent.","The invoice email wasn't sent." +"Invoice #%1 | %2 | %4 (%3)","Invoice #%1 | %2 | %4 (%3)" +"Invalid parent block for this block","Invalid parent block for this block" +"Order Statuses","Order Statuses" +"Create New Status","Create New Status" +"Assign Status to State","Assign Status to State" +"Save Status Assignment","Save Status Assignment" +"Assign Order Status to State","Assign Order Status to State" +"Assignment Information","Assignment Information" +"Order Status","Order Status" +"Order State","Order State" +"Use Order Status As Default","Use Order Status As Default" +"Visible On Storefront","Visible On Storefront" +"Edit Order Status","Edit Order Status" +"Save Status","Save Status" +"New Order Status","New Order Status" +"Order Status Information","Order Status Information" +"Status Code","Status Code" +"Status Label","Status Label" +"Store View Specific Labels","Store View Specific Labels" +"Total Paid","Total Paid" +"Total Refunded","Total Refunded" +"Total Due","Total Due" +Edit,Edit +"Are you sure you want to send an order email to customer?","Are you sure you want to send an order email to customer?" +"This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?","This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you want to continue?" +"Are you sure you want to void the payment?","Are you sure you want to void the payment?" +Hold,Hold +hold,hold +Unhold,Unhold +unhold,unhold +"Are you sure you want to accept this payment?","Are you sure you want to accept this payment?" +"Accept Payment","Accept Payment" +"Are you sure you want to deny this payment?","Are you sure you want to deny this payment?" +"Deny Payment","Deny Payment" +"Get Payment Update","Get Payment Update" +"Invoice and Ship","Invoice and Ship" +Invoice,Invoice +Ship,Ship +Reorder,Reorder +"Order # %1 %2 | %3","Order # %1 %2 | %3" +"This order contains (%1) items and therefore cannot be edited through the admin interface. If you wish to continue editing, the (%2) items will be removed, the order will be canceled and a new order will be placed.","This order contains (%1) items and therefore cannot be edited through the admin interface. If you wish to continue editing, the (%2) items will be removed, the order will be canceled and a new order will be placed." +"Are you sure? This order will be canceled and a new one will be created instead.","Are you sure? This order will be canceled and a new one will be created instead." +"Save Gift Message","Save Gift Message" +" [deleted]"," [deleted]" +"Order Credit Memos","Order Credit Memos" +"Credit memo #%1 created","Credit memo #%1 created" +"Credit memo #%1 comment added","Credit memo #%1 comment added" +"Shipment #%1 created","Shipment #%1 created" +"Shipment #%1 comment added","Shipment #%1 comment added" +"Invoice #%1 created","Invoice #%1 created" +"Invoice #%1 comment added","Invoice #%1 comment added" +"Tracking number %1 for %2 assigned","Tracking number %1 for %2 assigned" +"Comments History","Comments History" +"Order History","Order History" +Information,Information +"Order Information","Order Information" +"Order Invoices","Order Invoices" +Shipments,Shipments +"Order Shipments","Order Shipments" +Transactions,Transactions +"Order View","Order View" +Any,Any +Specified,Specified +"Applies to Any of the Specified Order Statuses except canceled orders","Applies to Any of the Specified Order Statuses except canceled orders" +"Cart Price Rule","Cart Price Rule" +Yes,Yes +No,No +"Show Actual Values","Show Actual Values" +"New Order RSS","New Order RSS" +Subtotal,Subtotal +"Shipping & Handling","Shipping & Handling" +"Discount (%1)","Discount (%1)" +Discount,Discount +"Grand Total","Grand Total" +Back,Back +Fetch,Fetch +"Transaction # %1 | %2","Transaction # %1 | %2" +N/A,N/A +Key,Key +Value,Value +"We found an invalid entity model.","We found an invalid entity model." +"Order # %1","Order # %1" +"Back to My Orders","Back to My Orders" +"View Another Order","View Another Order" +"About Your Refund","About Your Refund" +"My Orders","My Orders" +"Subscribe to Order Status","Subscribe to Order Status" +"About Your Invoice","About Your Invoice" +"Print Order # %1","Print Order # %1" +"Grand Total to be Charged","Grand Total to be Charged" +Unassign,Unassign +"We can't add this item to your shopping cart right now.","We can't add this item to your shopping cart right now." +"You sent the message.","You sent the message." +Sales,Sales +"Invoice capturing error","Invoice capturing error" +"This order no longer exists.","This order no longer exists." +"Please enter a comment.","Please enter a comment." +"We cannot add order history.","We cannot add order history." +"You updated the order address.","You updated the order address." +"We can't update the order address right now.","We can't update the order address right now." +"You have not canceled the item.","You have not canceled the item." +"You canceled the order.","You canceled the order." +"""%1"" coupon code was not applied. Do not apply discount is selected for item(s)","""%1"" coupon code was not applied. Do not apply discount is selected for item(s)" +"""%1"" coupon code is not valid.","""%1"" coupon code is not valid." +"The coupon code has been accepted.","The coupon code has been accepted." +"Quote item id is not received.","Quote item id is not received." +"Quote item is not loaded.","Quote item is not loaded." +"New Order","New Order" +"You created the order.","You created the order." +"Order saving error: %1","Order saving error: %1" +"Cannot add new comment.","Cannot add new comment." +"The credit memo has been canceled.","The credit memo has been canceled." +"Credit memo has not been canceled.","Credit memo has not been canceled." +"New Memo for #%1","New Memo for #%1" +"New Memo","New Memo" +"The credit memo's total must be positive.","The credit memo's total must be positive." +"Cannot create online refund for Refund to Store Credit.","Cannot create online refund for Refund to Store Credit." +"You created the credit memo.","You created the credit memo." +"We can't save the credit memo right now.","We can't save the credit memo right now." +"We can't update the item's quantity right now.","We can't update the item's quantity right now." +"View Memo for #%1","View Memo for #%1" +"View Memo","View Memo" +"You voided the credit memo.","You voided the credit memo." +"We can't void the credit memo.","We can't void the credit memo." +"The order no longer exists.","The order no longer exists." +"We can't create credit memo for the order.","We can't create credit memo for the order." +"Edit Order","Edit Order" +"You sent the order email.","You sent the order email." +"We can't send the email order right now.","We can't send the email order right now." +"You have not put the order on hold.","You have not put the order on hold." +"You put the order on hold.","You put the order on hold." +"You canceled the invoice.","You canceled the invoice." +"Invoice canceling error","Invoice canceling error" +"The invoice has been captured.","The invoice has been captured." +"The order does not allow an invoice to be created.","The order does not allow an invoice to be created." +"You can't create an invoice without products.","You can't create an invoice without products." +"New Invoice","New Invoice" +"We can't save the invoice right now.","We can't save the invoice right now." +"You created the invoice and shipment.","You created the invoice and shipment." +"The invoice has been created.","The invoice has been created." +"We can't send the invoice email right now.","We can't send the invoice email right now." +"We can't send the shipment right now.","We can't send the shipment right now." +"Cannot update item quantity.","Cannot update item quantity." +"The invoice has been voided.","The invoice has been voided." +"Invoice voiding error","Invoice voiding error" +"%1 order(s) cannot be canceled.","%1 order(s) cannot be canceled." +"You cannot cancel the order(s).","You cannot cancel the order(s)." +"We canceled %1 order(s).","We canceled %1 order(s)." +"%1 order(s) were not put on hold.","%1 order(s) were not put on hold." +"No order(s) were put on hold.","No order(s) were put on hold." +"You have put %1 order(s) on hold.","You have put %1 order(s) on hold." +"%1 order(s) were not released from on hold status.","%1 order(s) were not released from on hold status." +"No order(s) were released from on hold status.","No order(s) were released from on hold status." +"%1 order(s) have been released from on hold status.","%1 order(s) have been released from on hold status." +"There are no printable documents related to selected orders.","There are no printable documents related to selected orders." +"The payment has been accepted.","The payment has been accepted." +"The payment has been denied.","The payment has been denied." +"Transaction has been approved.","Transaction has been approved." +"Transaction has been voided/declined.","Transaction has been voided/declined." +"There is no update for the transaction.","There is no update for the transaction." +"We can't update the payment right now.","We can't update the payment right now." +"You assigned the order status.","You assigned the order status." +"Something went wrong while assigning the order status.","Something went wrong while assigning the order status." +"We can't find this order status.","We can't find this order status." +"Create New Order Status","Create New Order Status" +"We found another order status with the same order status code.","We found another order status with the same order status code." +"You saved the order status.","You saved the order status." +"We can't add the order status right now.","We can't add the order status right now." +"You have unassigned the order status.","You have unassigned the order status." +"Something went wrong while unassigning the order.","Something went wrong while unassigning the order." +"Can't unhold order.","Can't unhold order." +"You released the order from holding status.","You released the order from holding status." +"The order was not on hold.","The order was not on hold." +"Exception occurred during order load","Exception occurred during order load" +"Something went wrong while saving the gift message.","Something went wrong while saving the gift message." +"You saved the gift card message.","You saved the gift card message." +"The payment has been voided.","The payment has been voided." +"We can't void the payment right now.","We can't void the payment right now." +"Please correct the transaction ID and try again.","Please correct the transaction ID and try again." +"The transaction details have been updated.","The transaction details have been updated." +"We can't update the transaction details.","We can't update the transaction details." +"Orders and Returns","Orders and Returns" +"You entered incorrect data. Please try again.","You entered incorrect data. Please try again." +Home,Home +"Go to Home Page","Go to Home Page" +"We can't find this wish list.","We can't find this wish list." +"We could not add a product to cart by the ID ""%1"".","We could not add a product to cart by the ID ""%1""." +"There is an error in one of the option rows.","There is an error in one of the option rows." +"Shipping Address: ","Shipping Address: " +"Billing Address: ","Billing Address: " +"Please specify order items.","Please specify order items." +"Please specify a shipping method.","Please specify a shipping method." +"Please specify a payment method.","Please specify a payment method." +"This payment method is not available.","This payment method is not available." +"Validation is failed.","Validation is failed." +"You did not email your customer. Please check your email settings.","You did not email your customer. Please check your email settings." +"-- Please Select --","-- Please Select --" +"Path ""%1"" is not part of allowed directory ""%2""","Path ""%1"" is not part of allowed directory ""%2""" +"Identifying Fields required","Identifying Fields required" +"Id required","Id required" +"""Invoice Document Validation Error(s):\n"" .","""Invoice Document Validation Error(s):\n"" ." +"Could not save an invoice, see error log for details","Could not save an invoice, see error log for details" +"A hold action is not available.","A hold action is not available." +"You cannot remove the hold.","You cannot remove the hold." +"We cannot cancel this order.","We cannot cancel this order." +Guest,Guest +"Please enter the first name.","Please enter the first name." +"Please enter the last name.","Please enter the last name." +"Please enter the street.","Please enter the street." +"Please enter the city.","Please enter the city." +"Please enter the phone number.","Please enter the phone number." +"Please enter the company.","Please enter the company." +"Please enter the fax number.","Please enter the fax number." +"Please enter the zip/postal code.","Please enter the zip/postal code." +"Please enter the country.","Please enter the country." +"Please enter the state/province.","Please enter the state/province." +"Requested entity doesn't exist","Requested entity doesn't exist" +"Could not delete order address","Could not delete order address" +"Could not save order address","Could not save order address" +Pending,Pending +Refunded,Refunded +Canceled,Canceled +"Unknown State","Unknown State" +"We found an invalid quantity to refund item ""%1"".","We found an invalid quantity to refund item ""%1""." +"The creditmemo contains product item that is not part of the original order.","The creditmemo contains product item that is not part of the original order." +"The quantity to refund must not be greater than the unrefunded quantity.","The quantity to refund must not be greater than the unrefunded quantity." +"Maximum shipping amount allowed to refund is: %1","Maximum shipping amount allowed to refund is: %1" +"Order Id is required for creditmemo document","Order Id is required for creditmemo document" +"The creditmemo contains product SKU ""%1"" that is not part of the original order.","The creditmemo contains product SKU ""%1"" that is not part of the original order." +"The quantity to creditmemo must not be greater than the unrefunded quantity for product SKU ""%1"".","The quantity to creditmemo must not be greater than the unrefunded quantity for product SKU ""%1""." +"You can't create a creditmemo without products.","You can't create a creditmemo without products." +"The most money available to refund is %1.","The most money available to refund is %1." +"Could not delete credit memo","Could not delete credit memo" +"Could not save credit memo","Could not save credit memo" +"This order already has associated customer account","This order already has associated customer account" +Paid,Paid +"We cannot register an existing invoice","We cannot register an existing invoice" +"We can't create creditmemo for the invoice.","We can't create creditmemo for the invoice." +"Order Id is required for invoice document","Order Id is required for invoice document" +"The quantity to invoice must not be greater than the uninvoiced quantity for product SKU ""%1"".","The quantity to invoice must not be greater than the uninvoiced quantity for product SKU ""%1""." +"The invoice contains one or more items that are not part of the original order.","The invoice contains one or more items that are not part of the original order." +"ID required","ID required" +"Unknown Status","Unknown Status" +Ordered,Ordered +Shipped,Shipped +Invoiced,Invoiced +Backordered,Backordered +Returned,Returned +Partial,Partial +Mixed,Mixed +"Registered a Void notification.","Registered a Void notification." +"If the invoice was created offline, try creating an offline credit memo.","If the invoice was created offline, try creating an offline credit memo." +"We refunded %1 online.","We refunded %1 online." +"We refunded %1 offline.","We refunded %1 offline." +"IPN ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %1. Transaction ID: ""%2"". Credit Memo has not been created. Please create offline Credit Memo.","IPN ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %1. Transaction ID: ""%2"". Credit Memo has not been created. Please create offline Credit Memo." +"The credit memo has been created automatically.","The credit memo has been created automatically." +"Registered notification about refunded amount of %1.","Registered notification about refunded amount of %1." +"Canceled order online","Canceled order online" +"Canceled order offline","Canceled order offline" +"Approved the payment online.","Approved the payment online." +"There is no need to approve this payment.","There is no need to approve this payment." +"Denied the payment online","Denied the payment online" +"Registered update about approved payment.","Registered update about approved payment." +"Registered update about denied payment.","Registered update about denied payment." +"There is no update for the payment.","There is no update for the payment." +"Voided authorization.","Voided authorization." +"Amount: %1.","Amount: %1." +"Transaction ID: ""%1""","Transaction ID: ""%1""" +"The payment method you requested is not available.","The payment method you requested is not available." +"The payment disallows storing objects.","The payment disallows storing objects." +"The transaction ""%1"" cannot be captured yet.","The transaction ""%1"" cannot be captured yet." +"The order amount of %1 is pending approval on the payment gateway.","The order amount of %1 is pending approval on the payment gateway." +"Ordered amount of %1","Ordered amount of %1" +"An amount of %1 will be captured after being approved at the payment gateway.","An amount of %1 will be captured after being approved at the payment gateway." +"Registered notification about captured amount of %1.","Registered notification about captured amount of %1." +"Order is suspended as its capture amount %1 is suspected to be fraudulent.","Order is suspended as its capture amount %1 is suspected to be fraudulent." +"The parent transaction ID must have a transaction ID.","The parent transaction ID must have a transaction ID." +"Payment transactions disallow storing objects.","Payment transactions disallow storing objects." +"The transaction ""%1"" (%2) is already closed.","The transaction ""%1"" (%2) is already closed." +"Set order for existing transactions not allowed","Set order for existing transactions not allowed" +"At minimum, you need to set a payment ID.","At minimum, you need to set a payment ID." +Order,Order +Authorization,Authorization +"We found an unsupported transaction type ""%1"".","We found an unsupported transaction type ""%1""." +"Please set a proper payment and order id.","Please set a proper payment and order id." +"Please enter a Transaction ID.","Please enter a Transaction ID." +"You can't do this without a transaction object.","You can't do this without a transaction object." +"Order # ","Order # " +"Order Date: ","Order Date: " +"Sold to:","Sold to:" +"Ship to:","Ship to:" +"Payment Method:","Payment Method:" +"Shipping Method:","Shipping Method:" +"Total Shipping Charges","Total Shipping Charges" +Title,Title +Number,Number +"We found an invalid renderer model.","We found an invalid renderer model." +"Please define the PDF object before using.","Please define the PDF object before using." +"We don't recognize the draw line data. Please define the ""lines"" array.","We don't recognize the draw line data. Please define the ""lines"" array." +Products,Products +"Total (ex)","Total (ex)" +Qty,Qty +Tax,Tax +"Total (inc)","Total (inc)" +"Credit Memo # ","Credit Memo # " +"Invoice # ","Invoice # " +"The order object is not specified.","The order object is not specified." +"The source object is not specified.","The source object is not specified." +"An item object is not specified.","An item object is not specified." +"A PDF object is not specified.","A PDF object is not specified." +"A PDF page object is not specified.","A PDF page object is not specified." +"Excl. Tax","Excl. Tax" +"Incl. Tax","Incl. Tax" +"Packing Slip # ","Packing Slip # " +title,title +"The PDF total model %1 must be or extend \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal.","The PDF total model %1 must be or extend \Magento\Sales\Model\Order\Pdf\Total\DefaultTotal." +"We cannot register an existing shipment","We cannot register an existing shipment" +"Parent shipment cannot be loaded for track object.","Parent shipment cannot be loaded for track object." +"Order Id is required for shipment document","Order Id is required for shipment document" +"You can't create a shipment without products.","You can't create a shipment without products." +"The shipment contains product SKU ""%1"" that is not part of the original order.","The shipment contains product SKU ""%1"" that is not part of the original order." +"The quantity to ship must not be greater than the unshipped quantity for product SKU ""%1"".","The quantity to ship must not be greater than the unshipped quantity for product SKU ""%1""." +"Please enter a tracking number.","Please enter a tracking number." +"Could not delete shipment","Could not delete shipment" +"Could not save shipment","Could not save shipment" +"The last status can't be unassigned from its current state.","The last status can't be unassigned from its current state." +"Status can't be unassigned, because it is used by existing order(s).","Status can't be unassigned, because it is used by existing order(s)." +"The total model should be extended from \Magento\Sales\Model\Order\Total\AbstractTotal.","The total model should be extended from \Magento\Sales\Model\Order\Total\AbstractTotal." +"An invoice cannot be created when an order has a status of %1","An invoice cannot be created when an order has a status of %1" +"A creditmemo can not be created when an order has a status of %1","A creditmemo can not be created when an order has a status of %1" +"The order does not allow a creditmemo to be created.","The order does not allow a creditmemo to be created." +"A shipment cannot be created when an order has a status of %1","A shipment cannot be created when an order has a status of %1" +"The order does not allow a shipment to be created.","The order does not allow a shipment to be created." +"""Creditmemo Document Validation Error(s):\n"" .","""Creditmemo Document Validation Error(s):\n"" ." +"Could not save a Creditmemo, see error log for details","Could not save a Creditmemo, see error log for details" +"We cannot determine the field name.","We cannot determine the field name." +City,City +Company,Company +Country,Country +Email,Email +"First Name","First Name" +"Last Name","Last Name" +State/Province,State/Province +"Street Address","Street Address" +"Phone Number","Phone Number" +"Zip/Postal Code","Zip/Postal Code" +"We can't save the address:\n%1","We can't save the address:\n%1" +"Cannot save comment:\n%1","Cannot save comment:\n%1" +"We don't have enough information to save the parent transaction ID.","We don't have enough information to save the parent transaction ID." +"We cannot create an empty shipment.","We cannot create an empty shipment." +"Cannot save track:\n%1","Cannot save track:\n%1" +"Cannot unassign status from state","Cannot unassign status from state" +"New Orders","New Orders" +"Order #%1 created at %2","Order #%1 created at %2" +"Details for %1 #%2","Details for %1 #%2" +"Notified Date: %1","Notified Date: %1" +"Comment: %1
","Comment: %1
" +"Current Status: %1
","Current Status: %1
" +"Total: %1
","Total: %1
" +"Order # %1 Notification(s)","Order # %1 Notification(s)" +"You can not cancel Credit Memo","You can not cancel Credit Memo" +"Could not cancel creditmemo","Could not cancel creditmemo" +"We cannot register an existing credit memo.","We cannot register an existing credit memo." +"We found an invalid quantity to invoice item ""%1"".","We found an invalid quantity to invoice item ""%1""." +"The Order State ""%1"" must not be set manually.","The Order State ""%1"" must not be set manually." +"""Shipment Document Validation Error(s):\n"" .","""Shipment Document Validation Error(s):\n"" ." +"Could not save a shipment, see error log for details","Could not save a shipment, see error log for details" +"VAT Request Identifier","VAT Request Identifier" +"VAT Request Date","VAT Request Date" +"Pending Payment","Pending Payment" +Processing,Processing +"On Hold","On Hold" +Complete,Complete +Closed,Closed +"Suspected Fraud","Suspected Fraud" +"Payment Review","Payment Review" +New,New +"test message","test message" +"Email has not been sent","Email has not been sent" +"Authorized amount of %1.","Authorized amount of %1." +"We will authorize %1 after the payment is approved at the payment gateway.","We will authorize %1 after the payment is approved at the payment gateway." +"Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent.","Authorized amount of %1. Order is suspended as its authorizing amount %1 is suspected to be fraudulent." +"Captured amount of %1 online.","Captured amount of %1 online." +"Authorized amount of %1","Authorized amount of %1" +" Transaction ID: ""%1"""," Transaction ID: ""%1""" +View,View +"Group was removed","Group was removed" +"Changing address information will not recalculate shipping, tax or other order amount.","Changing address information will not recalculate shipping, tax or other order amount." +"Comment Text","Comment Text" +"Notify Customer by Email","Notify Customer by Email" +"Visible on Storefront","Visible on Storefront" +Customer,Customer +Notified,Notified +"Not Notified","Not Notified" +"No Payment Methods","No Payment Methods" +"Order Comments","Order Comments" +"Apply Coupon Code","Apply Coupon Code" +Apply,Apply +"Remove Coupon Code","Remove Coupon Code" +Remove,Remove +"Address Information","Address Information" +"Payment & Shipping Information","Payment & Shipping Information" +"Order Total","Order Total" +"Order Currency:","Order Currency:" +"Same As Billing Address","Same As Billing Address" +"Select from existing customer addresses:","Select from existing customer addresses:" +"Add New Address","Add New Address" +"Save in address book","Save in address book" +"You don't need to select a shipping address.","You don't need to select a shipping address." +"Gift Message for the Entire Order","Gift Message for the Entire Order" +"Leave this box blank if you don't want to leave a gift message for the entire order.","Leave this box blank if you don't want to leave a gift message for the entire order." +"Row Subtotal","Row Subtotal" +Action,Action +"No ordered items","No ordered items" +"Update Items and Quantities","Update Items and Quantities" +"Total %1 product(s)","Total %1 product(s)" +Subtotal:,Subtotal: +"Tier Pricing","Tier Pricing" +"Custom Price","Custom Price" +"Please select","Please select" +"Move to Shopping Cart","Move to Shopping Cart" +"Move to Wish List","Move to Wish List" +"Subscribe to Newsletter","Subscribe to Newsletter" +"Click to change shipping method","Click to change shipping method" +"Sorry, no quotes are available for this order.","Sorry, no quotes are available for this order." +"Get shipping methods and rates","Get shipping methods and rates" +"You don't need to select a shipping method.","You don't need to select a shipping method." +"Customer's Activities","Customer's Activities" +Refresh,Refresh +Item,Item +"Add To Order","Add To Order" +"Configure and Add to Order","Configure and Add to Order" +"No items","No items" +"Append Comments","Append Comments" +"Email Order Confirmation","Email Order Confirmation" +"Grand Total Excl. Tax","Grand Total Excl. Tax" +"Grand Total Incl. Tax","Grand Total Incl. Tax" +"Subtotal (Excl. Tax)","Subtotal (Excl. Tax)" +"Subtotal (Incl. Tax)","Subtotal (Incl. Tax)" +"Payment & Shipping Method","Payment & Shipping Method" +"Payment Information","Payment Information" +"The order was placed using %1.","The order was placed using %1." +"Shipping Information","Shipping Information" +"Items to Refund","Items to Refund" +"Return to Stock","Return to Stock" +"Qty to Refund","Qty to Refund" +"Tax Amount","Tax Amount" +"Discount Amount","Discount Amount" +"Row Total","Row Total" +"No Items To Refund","No Items To Refund" +"Credit Memo Comments","Credit Memo Comments" +"Refund Totals","Refund Totals" +"Email Copy of Credit Memo","Email Copy of Credit Memo" +"Please enter a positive number in this field.","Please enter a positive number in this field." +"Items Refunded","Items Refunded" +"No Items","No Items" +"Memo Total","Memo Total" +"Credit Memo History","Credit Memo History" +"Credit Memo Totals","Credit Memo Totals" +"Customer Name: %1","Customer Name: %1" +"Purchased From: %1","Purchased From: %1" +"Gift Message","Gift Message" +From:,From: +To:,To: +Message:,Message: +"Shipping & Handling","Shipping & Handling" +"Gift Options","Gift Options" +"Create Shipment","Create Shipment" +"Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice.","Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice." +%1,%1 +"Qty to Invoice","Qty to Invoice" +"Invoice History","Invoice History" +"Invoice Comments","Invoice Comments" +"Invoice Totals","Invoice Totals" +Amount,Amount +"Capture Online","Capture Online" +"Capture Offline","Capture Offline" +"Not Capture","Not Capture" +"The invoice will be created offline without the payment gateway.","The invoice will be created offline without the payment gateway." +"Email Copy of Invoice","Email Copy of Invoice" +"Items Invoiced","Items Invoiced" +"Total Tax","Total Tax" +"From Name","From Name" +"To Name","To Name" +Status,Status +Comment,Comment +"Notification Not Applicable","Notification Not Applicable" +"Order & Account Information","Order & Account Information" +"The order confirmation email was sent","The order confirmation email was sent" +"The order confirmation email is not sent","The order confirmation email is not sent" +"Order Date","Order Date" +"Order Date (%1)","Order Date (%1)" +"Purchased From","Purchased From" +"Link to the New Order","Link to the New Order" +"Link to the Previous Order","Link to the Previous Order" +"Placed from IP","Placed from IP" +"%1 / %2 rate:","%1 / %2 rate:" +"Customer Name","Customer Name" +"Customer Group","Customer Group" +"Notes for this Order","Notes for this Order" +"Comment added","Comment added" +"Transaction Data","Transaction Data" +"Transaction ID","Transaction ID" +"Parent Transaction ID","Parent Transaction ID" +"Order ID","Order ID" +"Transaction Type","Transaction Type" +"Is Closed","Is Closed" +"Created At","Created At" +"Child Transactions","Child Transactions" +"Transaction Details","Transaction Details" +Items,Items +"Gift Message for this Order","Gift Message for this Order" +"Shipped By","Shipped By" +"Tracking Number","Tracking Number" +"Billing Last Name","Billing Last Name" +"Find Order By","Find Order By" +"ZIP Code","ZIP Code" +"Billing ZIP Code","Billing ZIP Code" +Continue,Continue +"Print All Refunds","Print All Refunds" +"Refund #","Refund #" +"Print Refund","Print Refund" +"Product Name","Product Name" +"Order #","Order #" +Date,Date +"Ship To","Ship To" +Actions,Actions +"View Order","View Order" +"You have placed no orders.","You have placed no orders." +"No shipping information available","No shipping information available" +"Print Order","Print Order" +"Print All Invoices","Print All Invoices" +"Invoice #","Invoice #" +"Print Invoice","Print Invoice" +"Qty Invoiced","Qty Invoiced" +Close,Close +"About Your Order","About Your Order" +"Order Date: %1","Order Date: %1" +"Refund #%1","Refund #%1" +"Shipment #%1","Shipment #%1" +"Qty Shipped","Qty Shipped" +"Recent Orders","Recent Orders" +"View All","View All" +"Gift Message for This Order","Gift Message for This Order" +"Recently Ordered","Recently Ordered" +"Add to Cart","Add to Cart" +Search,Search +"Credit memo for your %store_name order","Credit memo for your %store_name order" +"%name,","%name," +"Thank you for your order from %store_name.","Thank you for your order from %store_name." +"You can check the status of your order by logging into your account.","You can check the status of your order by logging into your account." +"If you have questions about your order, you can email us at %store_email","If you have questions about your order, you can email us at %store_email" +"or call us at %store_phone","or call us at %store_phone" +"Our hours are %store_hours.","Our hours are %store_hours." +"Your Credit Memo #%creditmemo_id for Order #%order_id","Your Credit Memo #%creditmemo_id for Order #%order_id" +"Billing Info","Billing Info" +"Shipping Info","Shipping Info" +"Update to your %store_name credit memo","Update to your %store_name credit memo" +"Your order #%increment_id has been updated with a status of %order_status.","Your order #%increment_id has been updated with a status of %order_status." +"Invoice for your %store_name order","Invoice for your %store_name order" +"Your Invoice #%invoice_id for Order #%order_id","Your Invoice #%invoice_id for Order #%order_id" +"Update to your %store_name invoice","Update to your %store_name invoice" +"Your %store_name order confirmation","Your %store_name order confirmation" +"%customer_name,","%customer_name," +"Once your package ships we will send you a tracking number.","Once your package ships we will send you a tracking number." +"Your Order #%increment_id","Your Order #%increment_id" +"Placed on %created_at","Placed on %created_at" +"Once your package ships we will send an email with a link to track your order.","Once your package ships we will send an email with a link to track your order." +"Update to your %store_name order","Update to your %store_name order" +"Your %store_name order has shipped","Your %store_name order has shipped" +"Your shipping confirmation is below. Thank you again for your business.","Your shipping confirmation is below. Thank you again for your business." +"Your Shipment #%shipment_id for Order #%order_id","Your Shipment #%shipment_id for Order #%order_id" +"Update to your %store_name shipment","Update to your %store_name shipment" +"Gift Options for ","Gift Options for " +"Add Products","Add Products" +"You have item changes","You have item changes" +Ok,Ok +Operations,Operations +Create,Create +"Send Order Email","Send Order Email" +"Accept or Deny Payment","Accept or Deny Payment" +"Send Sales Emails","Send Sales Emails" +"Sales Section","Sales Section" +"Sales Emails Section","Sales Emails Section" +General,General +"Hide Customer IP","Hide Customer IP" +"Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos.","Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos." +"Checkout Totals Sort Order","Checkout Totals Sort Order" +"Allow Reorder","Allow Reorder" +"Invoice and Packing Slip Design","Invoice and Packing Slip Design" +"Logo for PDF Print-outs (200x50)","Logo for PDF Print-outs (200x50)" +"Your default logo will be used in PDF and HTML documents.
(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image.","Your default logo will be used in PDF and HTML documents.
(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image." +"Logo for HTML Print View","Logo for HTML Print View" +"Logo for HTML documents only. If empty, default will be used.
(jpeg, gif, png)","Logo for HTML documents only. If empty, default will be used.
(jpeg, gif, png)" +Address,Address +"Minimum Order Amount","Minimum Order Amount" +Enable,Enable +"Minimum Amount","Minimum Amount" +"Subtotal after discount","Subtotal after discount" +"Include Tax to Amount","Include Tax to Amount" +"Description Message","Description Message" +"This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount.","This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount." +"Error to Show in Shopping Cart","Error to Show in Shopping Cart" +"Validate Each Address Separately in Multi-address Checkout","Validate Each Address Separately in Multi-address Checkout" +"Multi-address Description Message","Multi-address Description Message" +"We'll use the default description above if you leave this empty.","We'll use the default description above if you leave this empty." +"Multi-address Error to Show in Shopping Cart","Multi-address Error to Show in Shopping Cart" +"We'll use the default error above if you leave this empty.","We'll use the default error above if you leave this empty." +Dashboard,Dashboard +"Use Aggregated Data","Use Aggregated Data" +"Orders Cron Settings","Orders Cron Settings" +"Pending Payment Order Lifetime (minutes)","Pending Payment Order Lifetime (minutes)" +"Sales Emails","Sales Emails" +"Asynchronous sending","Asynchronous sending" +Enabled,Enabled +"New Order Confirmation Email Sender","New Order Confirmation Email Sender" +"New Order Confirmation Template","New Order Confirmation Template" +"Email template chosen based on theme fallback when ""Default"" option is selected.","Email template chosen based on theme fallback when ""Default"" option is selected." +"New Order Confirmation Template for Guest","New Order Confirmation Template for Guest" +"Send Order Email Copy To","Send Order Email Copy To" +Comma-separated,Comma-separated +"Send Order Email Copy Method","Send Order Email Copy Method" +"Order Comment Email Sender","Order Comment Email Sender" +"Order Comment Email Template","Order Comment Email Template" +"Order Comment Email Template for Guest","Order Comment Email Template for Guest" +"Send Order Comment Email Copy To","Send Order Comment Email Copy To" +"Send Order Comments Email Copy Method","Send Order Comments Email Copy Method" +"Invoice Email Sender","Invoice Email Sender" +"Invoice Email Template","Invoice Email Template" +"Invoice Email Template for Guest","Invoice Email Template for Guest" +"Send Invoice Email Copy To","Send Invoice Email Copy To" +"Send Invoice Email Copy Method","Send Invoice Email Copy Method" +"Invoice Comment Email Sender","Invoice Comment Email Sender" +"Invoice Comment Email Template","Invoice Comment Email Template" +"Invoice Comment Email Template for Guest","Invoice Comment Email Template for Guest" +"Send Invoice Comment Email Copy To","Send Invoice Comment Email Copy To" +"Send Invoice Comments Email Copy Method","Send Invoice Comments Email Copy Method" +Shipment,Shipment +"Shipment Email Sender","Shipment Email Sender" +"Shipment Email Template","Shipment Email Template" +"Shipment Email Template for Guest","Shipment Email Template for Guest" +"Send Shipment Email Copy To","Send Shipment Email Copy To" +"Send Shipment Email Copy Method","Send Shipment Email Copy Method" +"Shipment Comments","Shipment Comments" +"Shipment Comment Email Sender","Shipment Comment Email Sender" +"Shipment Comment Email Template","Shipment Comment Email Template" +"Shipment Comment Email Template for Guest","Shipment Comment Email Template for Guest" +"Send Shipment Comment Email Copy To","Send Shipment Comment Email Copy To" +"Send Shipment Comments Email Copy Method","Send Shipment Comments Email Copy Method" +"Credit Memo Email Sender","Credit Memo Email Sender" +"Credit Memo Email Template","Credit Memo Email Template" +"Credit Memo Email Template for Guest","Credit Memo Email Template for Guest" +"Send Credit Memo Email Copy To","Send Credit Memo Email Copy To" +"Send Credit Memo Email Copy Method","Send Credit Memo Email Copy Method" +"Credit Memo Comment Email Sender","Credit Memo Comment Email Sender" +"Credit Memo Comment Email Template","Credit Memo Comment Email Template" +"Credit Memo Comment Email Template for Guest","Credit Memo Comment Email Template for Guest" +"Send Credit Memo Comment Email Copy To","Send Credit Memo Comment Email Copy To" +"Send Credit Memo Comments Email Copy Method","Send Credit Memo Comments Email Copy Method" +"PDF Print-outs","PDF Print-outs" +"Display Order ID in Header","Display Order ID in Header" +"Customer Order Status Notification","Customer Order Status Notification" +"Asynchronous indexing","Asynchronous indexing" +"Orders and Returns Search Form","Orders and Returns Search Form" +"Anchor Custom Title","Anchor Custom Title" +Template,Template +"Default Template","Default Template" +Name,Name +Phone,Phone +"ZIP/Post Code","ZIP/Post Code" +"Signed-up Point","Signed-up Point" +Website,Website +"Bill-to Name","Bill-to Name" +Created,Created +"Invoice Date","Invoice Date" +"Ship-to Name","Ship-to Name" +"Ship Date","Ship Date" +"Total Quantity","Total Quantity" +"Default Status","Default Status" +"State Code and Title","State Code and Title" +"Item Status","Item Status" +"Original Price","Original Price" +"Tax Percent","Tax Percent" +"All Store Views","All Store Views" +"PDF Credit Memos","PDF Credit Memos" +"Purchase Point","Purchase Point" +"Print Invoices","Print Invoices" +"Print Packing Slips","Print Packing Slips" +"Print Credit Memos","Print Credit Memos" +"Print All","Print All" +"Print Shipping Labels","Print Shipping Labels" +"Purchase Date","Purchase Date" +"Grand Total (Base)","Grand Total (Base)" +"Grand Total (Purchased)","Grand Total (Purchased)" +"Customer Email","Customer Email" +"Shipping and Handling","Shipping and Handling" +"PDF Invoices","PDF Invoices" +"PDF Shipments","PDF Shipments" +"PDF Creditmemos","PDF Creditmemos" +Refunds,Refunds +"Allow Zero GrandTotal for Creditmemo","Allow Zero GrandTotal for Creditmemo" +"Allow Zero GrandTotal","Allow Zero GrandTotal" +Email is required field for Admin order creation,Email is required field for Admin order creation +If set YES Email field will be required during Admin order creation for new Customer.,If set YES Email field will be required during Admin order creation for new Customer. From 0627db9895e20c2152efb4684dd60f625c42fcc9 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Sat, 21 Sep 2019 16:55:25 +0530 Subject: [PATCH 008/153] boolean function starts with is --- app/code/Magento/Sales/Model/AdminOrder/Create.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 app/code/Magento/Sales/Model/AdminOrder/Create.php diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php old mode 100644 new mode 100755 index fd1fb472719d4..bc4c7a1ab47cf --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -2039,7 +2039,7 @@ protected function _getNewCustomerEmail() { $email = $this->getData('account/email'); - if ($email || $this->getIsEmailRequired()) { + if ($email || $this->isEmailRequired()) { return $email; } @@ -2051,7 +2051,7 @@ protected function _getNewCustomerEmail() * * @return bool */ - private function getIsEmailRequired(): bool + private function isEmailRequired(): bool { return (bool)$this->_scopeConfig->getValue( self::XML_PATH_EMAIL_REQUIRED_CREATE_ORDER, From 1e9e9407dee36b5d6daf18c50bc96923f00928f3 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Sat, 21 Sep 2019 17:08:57 +0530 Subject: [PATCH 009/153] discarding customer language file --- app/code/Magento/Customer/i18n/en_US.csv | 768 +++++++++++------------ 1 file changed, 384 insertions(+), 384 deletions(-) diff --git a/app/code/Magento/Customer/i18n/en_US.csv b/app/code/Magento/Customer/i18n/en_US.csv index 4ab5e2b7068fb..3495feb925cb3 100644 --- a/app/code/Magento/Customer/i18n/en_US.csv +++ b/app/code/Magento/Customer/i18n/en_US.csv @@ -1,23 +1,23 @@ -Sign Out,Sign Out -Sign In,Sign In -You are subscribed to our newsletter.,You are subscribed to our newsletter. -You aren't subscribed to our newsletter.,You aren't subscribed to our newsletter. -You have not set a default shipping address.,You have not set a default shipping address. -You have not set a default billing address.,You have not set a default billing address. -Address Book,Address Book -Edit Address,Edit Address -Add New Address,Add New Address +"Sign Out","Sign Out" +"Sign In","Sign In" +"You are subscribed to our newsletter.","You are subscribed to our newsletter." +"You aren't subscribed to our newsletter.","You aren't subscribed to our newsletter." +"You have not set a default shipping address.","You have not set a default shipping address." +"You have not set a default billing address.","You have not set a default billing address." +"Address Book","Address Book" +"Edit Address","Edit Address" +"Add New Address","Add New Address" region,region -Create Order,Create Order -Save Customer,Save Customer -Delete Customer,Delete Customer -Reset Password,Reset Password -Are you sure you want to revoke the customer's tokens?,Are you sure you want to revoke the customer's tokens? -Force Sign-In,Force Sign-In -New Customer,New Customer -Save and Continue Edit,Save and Continue Edit +"Create Order","Create Order" +"Save Customer","Save Customer" +"Delete Customer","Delete Customer" +"Reset Password","Reset Password" +"Are you sure you want to revoke the customer's tokens?","Are you sure you want to revoke the customer's tokens?" +"Force Sign-In","Force Sign-In" +"New Customer","New Customer" +"Save and Continue Edit","Save and Continue Edit" Back,Back -Please select,Please select +"Please select","Please select" Reset,Reset ID,ID Product,Product @@ -28,186 +28,186 @@ Total,Total Action,Action Configure,Configure Delete,Delete -Shopping Cart from %1,Shopping Cart from %1 +"Shopping Cart from %1","Shopping Cart from %1" Newsletter,Newsletter -Newsletter Information,Newsletter Information -Subscribed to Newsletter,Subscribed to Newsletter -Last Date Subscribed,Last Date Subscribed -Last Date Unsubscribed,Last Date Unsubscribed -No Newsletter Found,No Newsletter Found -Start date,Start date -End Date,End Date -Receive Date,Receive Date +"Newsletter Information","Newsletter Information" +"Subscribed to Newsletter","Subscribed to Newsletter" +"Last Date Subscribed","Last Date Subscribed" +"Last Date Unsubscribed","Last Date Unsubscribed" +"No Newsletter Found","No Newsletter Found" +"Start date","Start date" +"End Date","End Date" +"Receive Date","Receive Date" Subject,Subject Status,Status Sent,Sent Cancel,Cancel -Not Sent,Not Sent +"Not Sent","Not Sent" Sending,Sending Paused,Paused View,View Unknown,Unknown -Order #,Order # +"Order #","Order #" Purchased,Purchased -Bill-to Name,Bill-to Name -Ship-to Name,Ship-to Name -Order Total,Order Total -Purchase Point,Purchase Point -Customer View,Customer View -There are no items in customer's shopping cart.,There are no items in customer's shopping cart. +"Bill-to Name","Bill-to Name" +"Ship-to Name","Ship-to Name" +"Order Total","Order Total" +"Purchase Point","Purchase Point" +"Customer View","Customer View" +"There are no items in customer's shopping cart.","There are no items in customer's shopping cart." Qty,Qty Confirmed,Confirmed -Confirmation Required,Confirmation Required -Confirmation Not Required,Confirmation Not Required +"Confirmation Required","Confirmation Required" +"Confirmation Not Required","Confirmation Not Required" Indeterminate,Indeterminate -The customer does not have default billing address.,The customer does not have default billing address. +"The customer does not have default billing address.","The customer does not have default billing address." Offline,Offline Online,Online Never,Never Unlocked,Unlocked Locked,Locked -Deleted Stores,Deleted Stores -Add Locale,Add Locale -Add Date,Add Date -Days in Wish List,Days in Wish List +"Deleted Stores","Deleted Stores" +"Add Locale","Add Locale" +"Add Date","Add Date" +"Days in Wish List","Days in Wish List" Unlock,Unlock No,No Yes,Yes -Delete File,Delete File +"Delete File","Delete File" Download,Download -Delete Image,Delete Image -View Full Size,View Full Size -All countries,All countries -Customer Groups,Customer Groups -Add New Customer Group,Add New Customer Group -Save Customer Group,Save Customer Group -Delete Customer Group,Delete Customer Group -New Customer Group,New Customer Group +"Delete Image","Delete Image" +"View Full Size","View Full Size" +"All countries","All countries" +"Customer Groups","Customer Groups" +"Add New Customer Group","Add New Customer Group" +"Save Customer Group","Save Customer Group" +"Delete Customer Group","Delete Customer Group" +"New Customer Group","New Customer Group" "Edit Customer Group ""%1""","Edit Customer Group ""%1""" -Group Information,Group Information -Group Name,Group Name -Maximum length must be less then %1 characters.,Maximum length must be less then %1 characters. -Tax Class,Tax Class -The customer is now assigned to Customer Group %s.,The customer is now assigned to Customer Group %s. -Would you like to change the Customer Group for this order?,Would you like to change the Customer Group for this order? -The VAT ID is valid.,The VAT ID is valid. -The VAT ID entered (%s) is not a valid VAT ID.,The VAT ID entered (%s) is not a valid VAT ID. -The VAT ID is valid. The current Customer Group will be used.,The VAT ID is valid. The current Customer Group will be used. -The VAT ID is valid but no Customer Group is assigned for it.,The VAT ID is valid but no Customer Group is assigned for it. +"Group Information","Group Information" +"Group Name","Group Name" +"Maximum length must be less then %1 characters.","Maximum length must be less then %1 characters." +"Tax Class","Tax Class" +"The customer is now assigned to Customer Group %s.","The customer is now assigned to Customer Group %s." +"Would you like to change the Customer Group for this order?","Would you like to change the Customer Group for this order?" +"The VAT ID is valid.","The VAT ID is valid." +"The VAT ID entered (%s) is not a valid VAT ID.","The VAT ID entered (%s) is not a valid VAT ID." +"The VAT ID is valid. The current Customer Group will be used.","The VAT ID is valid. The current Customer Group will be used." +"The VAT ID is valid but no Customer Group is assigned for it.","The VAT ID is valid but no Customer Group is assigned for it." "Based on the VAT ID, the customer belongs to the Customer Group %s.","Based on the VAT ID, the customer belongs to the Customer Group %s." -Something went wrong while validating the VAT ID.,Something went wrong while validating the VAT ID. -The customer would belong to Customer Group %s.,The customer would belong to Customer Group %s. -There was an error detecting Customer Group.,There was an error detecting Customer Group. -Validate VAT Number,Validate VAT Number -Customer Login,Customer Login -Create New Customer Account,Create New Customer Account -Date of Birth,Date of Birth -Bad request.,Bad request. -This confirmation key is invalid or has expired.,This confirmation key is invalid or has expired. -There was an error confirming the account,There was an error confirming the account +"Something went wrong while validating the VAT ID.","Something went wrong while validating the VAT ID." +"The customer would belong to Customer Group %s.","The customer would belong to Customer Group %s." +"There was an error detecting Customer Group.","There was an error detecting Customer Group." +"Validate VAT Number","Validate VAT Number" +"Customer Login","Customer Login" +"Create New Customer Account","Create New Customer Account" +"Date of Birth","Date of Birth" +"Bad request.","Bad request." +"This confirmation key is invalid or has expired.","This confirmation key is invalid or has expired." +"There was an error confirming the account","There was an error confirming the account" "If you are a registered VAT customer, please click here to enter your shipping address for proper VAT calculation.","If you are a registered VAT customer, please click here to enter your shipping address for proper VAT calculation." "If you are a registered VAT customer, please click here to enter your billing address for proper VAT calculation.","If you are a registered VAT customer, please click here to enter your billing address for proper VAT calculation." -Thank you for registering with %1.,Thank you for registering with %1. -Please check your email for confirmation key.,Please check your email for confirmation key. -This email does not require confirmation.,This email does not require confirmation. -Wrong email.,Wrong email. -Your password reset link has expired.,Your password reset link has expired. +"Thank you for registering with %1.","Thank you for registering with %1." +"Please check your email for confirmation key.","Please check your email for confirmation key." +"This email does not require confirmation.","This email does not require confirmation." +"Wrong email.","Wrong email." +"Your password reset link has expired.","Your password reset link has expired." "You must confirm your account. Please check your email for the confirmation link or click here for a new link.","You must confirm your account. Please check your email for the confirmation link or click here for a new link." "There is already an account with this email address. If you are sure that it is your email address, click here to get your password and access your account.","There is already an account with this email address. If you are sure that it is your email address, click here to get your password and access your account." -We can't save the customer.,We can't save the customer. -Please make sure your passwords match.,Please make sure your passwords match. +"We can't save the customer.","We can't save the customer." +"Please make sure your passwords match.","Please make sure your passwords match." "If you are a registered VAT customer, please click here to enter your shipping address for proper VAT calculation.","If you are a registered VAT customer, please click here to enter your shipping address for proper VAT calculation." "If you are a registered VAT customer, please click here to enter your billing address for proper VAT calculation.","If you are a registered VAT customer, please click here to enter your billing address for proper VAT calculation." -Account Information,Account Information -You saved the account information.,You saved the account information. -You did not sign in correctly or your account is temporarily disabled.,You did not sign in correctly or your account is temporarily disabled. -Password confirmation doesn't match entered password.,Password confirmation doesn't match entered password. -The password doesn't match this account.,The password doesn't match this account. -Please correct the email address.,Please correct the email address. -We're unable to send the password reset email.,We're unable to send the password reset email. -Please enter your email.,Please enter your email. -If there is an account associated with %1 you will receive an email with a link to reset your password.,If there is an account associated with %1 you will receive an email with a link to reset your password. -My Account,My Account +"Account Information","Account Information" +"You saved the account information.","You saved the account information." +"You did not sign in correctly or your account is temporarily disabled.","You did not sign in correctly or your account is temporarily disabled." +"Password confirmation doesn't match entered password.","Password confirmation doesn't match entered password." +"The password doesn't match this account.","The password doesn't match this account." +"Please correct the email address.","Please correct the email address." +"We're unable to send the password reset email.","We're unable to send the password reset email." +"Please enter your email.","Please enter your email." +"If there is an account associated with %1 you will receive an email with a link to reset your password.","If there is an account associated with %1 you will receive an email with a link to reset your password." +"My Account","My Account" "This account is not confirmed. Click here to resend confirmation email.","This account is not confirmed. Click here to resend confirmation email." -An unspecified error occurred. Please contact us for assistance.,An unspecified error occurred. Please contact us for assistance. -A login and a password are required.,A login and a password are required. -New Password and Confirm New Password values didn't match.,New Password and Confirm New Password values didn't match. -Please enter a new password.,Please enter a new password. -You updated your password.,You updated your password. -Something went wrong while saving the new password.,Something went wrong while saving the new password. -You deleted the address.,You deleted the address. -We can't delete the address right now.,We can't delete the address right now. -You saved the address.,You saved the address. -We can't save the address.,We can't save the address. -No customer ID defined.,No customer ID defined. -Please correct the quote items and try again.,Please correct the quote items and try again. -You have revoked the customer's tokens.,You have revoked the customer's tokens. -We can't find a customer to revoke.,We can't find a customer to revoke. -Something went wrong while saving file.,Something went wrong while saving file. -You deleted the customer group.,You deleted the customer group. -The customer group no longer exists.,The customer group no longer exists. +"An unspecified error occurred. Please contact us for assistance.","An unspecified error occurred. Please contact us for assistance." +"A login and a password are required.","A login and a password are required." +"New Password and Confirm New Password values didn't match.","New Password and Confirm New Password values didn't match." +"Please enter a new password.","Please enter a new password." +"You updated your password.","You updated your password." +"Something went wrong while saving the new password.","Something went wrong while saving the new password." +"You deleted the address.","You deleted the address." +"We can't delete the address right now.","We can't delete the address right now." +"You saved the address.","You saved the address." +"We can't save the address.","We can't save the address." +"No customer ID defined.","No customer ID defined." +"Please correct the quote items and try again.","Please correct the quote items and try again." +"You have revoked the customer's tokens.","You have revoked the customer's tokens." +"We can't find a customer to revoke.","We can't find a customer to revoke." +"Something went wrong while saving file.","Something went wrong while saving file." +"You deleted the customer group.","You deleted the customer group." +"The customer group no longer exists.","The customer group no longer exists." Customers,Customers -New Group,New Group -New Customer Groups,New Customer Groups -Edit Group,Edit Group -Edit Customer Groups,Edit Customer Groups -You saved the customer group.,You saved the customer group. -Please select customer(s).,Please select customer(s). -Customer could not be deleted.,Customer could not be deleted. -You deleted the customer.,You deleted the customer. -Something went wrong while editing the customer.,Something went wrong while editing the customer. -Manage Customers,Manage Customers -Please correct the data sent.,Please correct the data sent. -A total of %1 record(s) were updated.,A total of %1 record(s) were updated. -A total of %1 record(s) were deleted.,A total of %1 record(s) were deleted. -The customer will receive an email with a link to reset password.,The customer will receive an email with a link to reset password. -Something went wrong while resetting customer password.,Something went wrong while resetting customer password. -You saved the customer.,You saved the customer. -Something went wrong while saving the customer.,Something went wrong while saving the customer. -Page not found.,Page not found. -Customer has been unlocked successfully.,Customer has been unlocked successfully. -Online Customers,Online Customers -Customers Now Online,Customers Now Online -Please define Wish List item ID.,Please define Wish List item ID. -Please load Wish List item.,Please load Wish List item. -Login successful.,Login successful. -Invalid login or password.,Invalid login or password. +"New Group","New Group" +"New Customer Groups","New Customer Groups" +"Edit Group","Edit Group" +"Edit Customer Groups","Edit Customer Groups" +"You saved the customer group.","You saved the customer group." +"Please select customer(s).","Please select customer(s)." +"Customer could not be deleted.","Customer could not be deleted." +"You deleted the customer.","You deleted the customer." +"Something went wrong while editing the customer.","Something went wrong while editing the customer." +"Manage Customers","Manage Customers" +"Please correct the data sent.","Please correct the data sent." +"A total of %1 record(s) were updated.","A total of %1 record(s) were updated." +"A total of %1 record(s) were deleted.","A total of %1 record(s) were deleted." +"The customer will receive an email with a link to reset password.","The customer will receive an email with a link to reset password." +"Something went wrong while resetting customer password.","Something went wrong while resetting customer password." +"You saved the customer.","You saved the customer." +"Something went wrong while saving the customer.","Something went wrong while saving the customer." +"Page not found.","Page not found." +"Customer has been unlocked successfully.","Customer has been unlocked successfully." +"Online Customers","Online Customers" +"Customers Now Online","Customers Now Online" +"Please define Wish List item ID.","Please define Wish List item ID." +"Please load Wish List item.","Please load Wish List item." +"Login successful.","Login successful." +"Invalid login or password.","Invalid login or password." """%1"" section source is not supported","""%1"" section source is not supported" -%1 doesn't extend \Magento\Customer\CustomerData\SectionSourceInterface,%1 doesn't extend \Magento\Customer\CustomerData\SectionSourceInterface -No confirmation needed.,No confirmation needed. -Account already active,Account already active -Invalid confirmation token,Invalid confirmation token -The account is locked.,The account is locked. -This account is not confirmed.,This account is not confirmed. +"%1 doesn't extend \Magento\Customer\CustomerData\SectionSourceInterface","%1 doesn't extend \Magento\Customer\CustomerData\SectionSourceInterface" +"No confirmation needed.","No confirmation needed." +"Account already active","Account already active" +"Invalid confirmation token","Invalid confirmation token" +"The account is locked.","The account is locked." +"This account is not confirmed.","This account is not confirmed." "Invalid value of ""%value"" provided for the %fieldName field.","Invalid value of ""%value"" provided for the %fieldName field." -Please enter a password with at most %1 characters.,Please enter a password with at most %1 characters. -Please enter a password with at least %1 characters.,Please enter a password with at least %1 characters. -The password can't begin or end with a space.,The password can't begin or end with a space. +"Please enter a password with at most %1 characters.","Please enter a password with at most %1 characters." +"Please enter a password with at least %1 characters.","Please enter a password with at least %1 characters." +"The password can't begin or end with a space.","The password can't begin or end with a space." "Minimum of different classes of characters in password is %1. Classes of characters: Lower Case, Upper Case, Digits, Special Characters.","Minimum of different classes of characters in password is %1. Classes of characters: Lower Case, Upper Case, Digits, Special Characters." -Password cannot be the same as email address.,Password cannot be the same as email address. -This customer already exists in this store.,This customer already exists in this store. -A customer with the same email already exists in an associated website.,A customer with the same email already exists in an associated website. -%fieldName is a required field.,%fieldName is a required field. -Reset password token mismatch.,Reset password token mismatch. -Reset password token expired.,Reset password token expired. -Please correct the transactional account email type.,Please correct the transactional account email type. +"Password cannot be the same as email address.","Password cannot be the same as email address." +"This customer already exists in this store.","This customer already exists in this store." +"A customer with the same email already exists in an associated website.","A customer with the same email already exists in an associated website." +"%fieldName is a required field.","%fieldName is a required field." +"Reset password token mismatch.","Reset password token mismatch." +"Reset password token expired.","Reset password token expired." +"Please correct the transactional account email type.","Please correct the transactional account email type." """%1"" is a required value.","""%1"" is a required value." Global,Global -Per Website,Per Website -We can't share customer accounts globally when the accounts share identical email addresses on more than one website.,We can't share customer accounts globally when the accounts share identical email addresses on more than one website. -Billing Address,Billing Address -Shipping Address,Shipping Address --- Please Select --,-- Please Select -- -Please enter a valid password reset token.,Please enter a valid password reset token. -The password can not begin or end with a space.,The password can not begin or end with a space. +"Per Website","Per Website" +"We can't share customer accounts globally when the accounts share identical email addresses on more than one website.","We can't share customer accounts globally when the accounts share identical email addresses on more than one website." +"Billing Address","Billing Address" +"Shipping Address","Shipping Address" +"-- Please Select --","-- Please Select --" +"Please enter a valid password reset token.","Please enter a valid password reset token." +"The password can not begin or end with a space.","The password can not begin or end with a space." Admin,Admin -ALL GROUPS,ALL GROUPS +"ALL GROUPS","ALL GROUPS" "No such entity with %fieldName = %fieldValue, %field2Name = %field2Value","No such entity with %fieldName = %fieldValue, %field2Name = %field2Value" -File can not be saved to the destination folder.,File can not be saved to the destination folder. -Unable to create directory %1.,Unable to create directory %1. -Destination folder is not writable or does not exists.,Destination folder is not writable or does not exists. -Something went wrong while saving the file.,Something went wrong while saving the file. -Attribute object is undefined,Attribute object is undefined +"File can not be saved to the destination folder.","File can not be saved to the destination folder." +"Unable to create directory %1.","Unable to create directory %1." +"Destination folder is not writable or does not exists.","Destination folder is not writable or does not exists." +"Something went wrong while saving the file.","Something went wrong while saving the file." +"Attribute object is undefined","Attribute object is undefined" """%1"" invalid type entered.","""%1"" invalid type entered." """%1"" contains non-alphabetic or non-numeric characters.","""%1"" contains non-alphabetic or non-numeric characters." """%1"" is an empty string.","""%1"" is an empty string." @@ -217,19 +217,19 @@ Attribute object is undefined,Attribute object is undefined """%1"" is not a valid hostname.","""%1"" is not a valid hostname." """%1"" uses too many characters.","""%1"" uses too many characters." "'%value%' looks like an IP address, which is not an acceptable format.","'%value%' looks like an IP address, which is not an acceptable format." -'%value%' looks like a DNS hostname but we cannot match the TLD against known list.,'%value%' looks like a DNS hostname but we cannot match the TLD against known list. -'%value%' looks like a DNS hostname but contains a dash in an invalid position.,'%value%' looks like a DNS hostname but contains a dash in an invalid position. -'%value%' looks like a DNS hostname but we cannot match it against the hostname schema for TLD '%tld%'.,'%value%' looks like a DNS hostname but we cannot match it against the hostname schema for TLD '%tld%'. -'%value%' looks like a DNS hostname but cannot extract TLD part.,'%value%' looks like a DNS hostname but cannot extract TLD part. -'%value%' does not look like a valid local network name.,'%value%' does not look like a valid local network name. +"'%value%' looks like a DNS hostname but we cannot match the TLD against known list.","'%value%' looks like a DNS hostname but we cannot match the TLD against known list." +"'%value%' looks like a DNS hostname but contains a dash in an invalid position.","'%value%' looks like a DNS hostname but contains a dash in an invalid position." +"'%value%' looks like a DNS hostname but we cannot match it against the hostname schema for TLD '%tld%'.","'%value%' looks like a DNS hostname but we cannot match it against the hostname schema for TLD '%tld%'." +"'%value%' looks like a DNS hostname but cannot extract TLD part.","'%value%' looks like a DNS hostname but cannot extract TLD part." +"'%value%' does not look like a valid local network name.","'%value%' does not look like a valid local network name." "'%value%' looks like a local network name, which is not an acceptable format.","'%value%' looks like a local network name, which is not an acceptable format." "'%value%' appears to be a DNS hostname, but the given punycode notation cannot be decoded.","'%value%' appears to be a DNS hostname, but the given punycode notation cannot be decoded." """%1"" is not a valid URL.","""%1"" is not a valid URL." """%1"" is not a valid date.","""%1"" is not a valid date." """%1"" does not fit the entered date format.","""%1"" does not fit the entered date format." -Please enter a valid date between %1 and %2 at %3.,Please enter a valid date between %1 and %2 at %3. -Please enter a valid date equal to or greater than %1 at %2.,Please enter a valid date equal to or greater than %1 at %2. -Please enter a valid date less than or equal to %1 at %2.,Please enter a valid date less than or equal to %1 at %2. +"Please enter a valid date between %1 and %2 at %3.","Please enter a valid date between %1 and %2 at %3." +"Please enter a valid date equal to or greater than %1 at %2.","Please enter a valid date equal to or greater than %1 at %2." +"Please enter a valid date less than or equal to %1 at %2.","Please enter a valid date less than or equal to %1 at %2." """%1"" is not a valid file extension.","""%1"" is not a valid file extension." """%1"" is not a valid file.","""%1"" is not a valid file." """%1"" exceeds the allowed file size.","""%1"" exceeds the allowed file size." @@ -239,203 +239,203 @@ Please enter a valid date less than or equal to %1 at %2.,Please enter a valid d """%1"" length must be equal or greater than %2 characters.","""%1"" length must be equal or greater than %2 characters." """%1"" length must be equal or less than %2 characters.","""%1"" length must be equal or less than %2 characters." label,label -Please enter a customer email.,Please enter a customer email. -A customer website ID must be specified when using the website scope.,A customer website ID must be specified when using the website scope. -Customer Group,Customer Group +"Please enter a customer email.","Please enter a customer email." +"A customer website ID must be specified when using the website scope.","A customer website ID must be specified when using the website scope." +"Customer Group","Customer Group" "You can't delete group ""%1"".","You can't delete group ""%1""." -Customer Group already exists.,Customer Group already exists. -Cannot delete group.,Cannot delete group. -Error during VAT Number verification.,Error during VAT Number verification. -PHP SOAP extension is required.,PHP SOAP extension is required. -VAT Number is valid.,VAT Number is valid. -Please enter a valid VAT number.,Please enter a valid VAT number. -Your VAT ID was successfully validated.,Your VAT ID was successfully validated. -You will be charged tax.,You will be charged tax. -You will not be charged tax.,You will not be charged tax. -The VAT ID entered (%1) is not a valid VAT ID.,The VAT ID entered (%1) is not a valid VAT ID. -Your Tax ID cannot be validated.,Your Tax ID cannot be validated. +"Customer Group already exists.","Customer Group already exists." +"Cannot delete group.","Cannot delete group." +"Error during VAT Number verification.","Error during VAT Number verification." +"PHP SOAP extension is required.","PHP SOAP extension is required." +"VAT Number is valid.","VAT Number is valid." +"Please enter a valid VAT number.","Please enter a valid VAT number." +"Your VAT ID was successfully validated.","Your VAT ID was successfully validated." +"You will be charged tax.","You will be charged tax." +"You will not be charged tax.","You will not be charged tax." +"The VAT ID entered (%1) is not a valid VAT ID.","The VAT ID entered (%1) is not a valid VAT ID." +"Your Tax ID cannot be validated.","Your Tax ID cannot be validated." "If you believe this is an error, please contact us at %1","If you believe this is an error, please contact us at %1" -No such entity with %fieldName = %fieldValue,No such entity with %fieldName = %fieldValue +"No such entity with %fieldName = %fieldValue","No such entity with %fieldName = %fieldValue" Male,Male Female,Female -Not Specified,Not Specified -Thank you for registering with,Thank you for registering with -enter your billing address for proper VAT calculation,enter your billing address for proper VAT calculation -enter your shipping address for proper VAT calculation,enter your shipping address for proper VAT calculation -Please enter new password.,Please enter new password. +"Not Specified","Not Specified" +"Thank you for registering with","Thank you for registering with" +"enter your billing address for proper VAT calculation","enter your billing address for proper VAT calculation" +"enter your shipping address for proper VAT calculation","enter your shipping address for proper VAT calculation" +"Please enter new password.","Please enter new password." message,message NoSuchEntityException,NoSuchEntityException Exception,Exception InputException.,InputException. InputException,InputException -Exception message,Exception message -Validator Exception,Validator Exception -Localized Exception,Localized Exception -some error,some error +"Exception message","Exception message" +"Validator Exception","Validator Exception" +"Localized Exception","Localized Exception" +"some error","some error" frontend_label,frontend_label -NOT LOGGED IN,NOT LOGGED IN -Please enter the state/province.,Please enter the state/province. -region is a required field.,region is a required field. -regionId is a required field.,regionId is a required field. +"NOT LOGGED IN","NOT LOGGED IN" +"Please enter the state/province.","Please enter the state/province." +"region is a required field.","region is a required field." +"regionId is a required field.","regionId is a required field." Label,Label Select...,Select... Edit,Edit Visitor,Visitor Customer,Customer -No item specified.,No item specified. -Are you sure you want to remove this item?,Are you sure you want to remove this item? -Personal Information,Personal Information -Last Logged In:,Last Logged In: -Last Logged In (%1):,Last Logged In (%1): -Account Lock:,Account Lock: -Confirmed email:,Confirmed email: -Account Created:,Account Created: -Account Created on (%1):,Account Created on (%1): -Account Created in:,Account Created in: -Customer Group:,Customer Group: -Default Billing Address,Default Billing Address -Sales Statistics,Sales Statistics -Web Site,Web Site +"No item specified.","No item specified." +"Are you sure you want to remove this item?","Are you sure you want to remove this item?" +"Personal Information","Personal Information" +"Last Logged In:","Last Logged In:" +"Last Logged In (%1):","Last Logged In (%1):" +"Account Lock:","Account Lock:" +"Confirmed email:","Confirmed email:" +"Account Created:","Account Created:" +"Account Created on (%1):","Account Created on (%1):" +"Account Created in:","Account Created in:" +"Customer Group:","Customer Group:" +"Default Billing Address","Default Billing Address" +"Sales Statistics","Sales Statistics" +"Web Site","Web Site" Store,Store -Store View,Store View -Lifetime Sales,Lifetime Sales -Average Sale,Average Sale -All Store Views,All Store Views +"Store View","Store View" +"Lifetime Sales","Lifetime Sales" +"Average Sale","Average Sale" +"All Store Views","All Store Views" Change,Change -Manage Addresses,Manage Addresses -Default Shipping Address,Default Shipping Address -Contact Information,Contact Information -Change Password,Change Password +"Manage Addresses","Manage Addresses" +"Default Shipping Address","Default Shipping Address" +"Contact Information","Contact Information" +"Change Password","Change Password" Newsletters,Newsletters "You are subscribed to ""General Subscription"".","You are subscribed to ""General Subscription""." or,or -Default Addresses,Default Addresses -Change Billing Address,Change Billing Address -You have no default billing address in your address book.,You have no default billing address in your address book. -Change Shipping Address,Change Shipping Address -You have no default shipping address in your address book.,You have no default shipping address in your address book. -Additional Address Entries,Additional Address Entries -Delete Address,Delete Address -You have no other address entries in your address book.,You have no other address entries in your address book. -* Required Fields,* Required Fields +"Default Addresses","Default Addresses" +"Change Billing Address","Change Billing Address" +"You have no default billing address in your address book.","You have no default billing address in your address book." +"Change Shipping Address","Change Shipping Address" +"You have no default shipping address in your address book.","You have no default shipping address in your address book." +"Additional Address Entries","Additional Address Entries" +"Delete Address","Delete Address" +"You have no other address entries in your address book.","You have no other address entries in your address book." +"* Required Fields","* Required Fields" Address,Address -Street Address,Street Address -Street Address %1,Street Address %1 -VAT Number,VAT Number +"Street Address","Street Address" +"Street Address %1","Street Address %1" +"VAT Number","VAT Number" City,City State/Province,State/Province "Please select a region, state or province.","Please select a region, state or province." -Zip/Postal Code,Zip/Postal Code +"Zip/Postal Code","Zip/Postal Code" Country,Country -It's a default billing address.,It's a default billing address. -Use as my default billing address,Use as my default billing address -It's a default shipping address.,It's a default shipping address. -Use as my default shipping address,Use as my default shipping address -Save Address,Save Address -Go back,Go back -Please enter your email below and we will send you the confirmation link.,Please enter your email below and we will send you the confirmation link. +"It's a default billing address.","It's a default billing address." +"Use as my default billing address","Use as my default billing address" +"It's a default shipping address.","It's a default shipping address." +"Use as my default shipping address","Use as my default shipping address" +"Save Address","Save Address" +"Go back","Go back" +"Please enter your email below and we will send you the confirmation link.","Please enter your email below and we will send you the confirmation link." Email,Email -Send confirmation link,Send confirmation link -Back to Sign In,Back to Sign In -Change Email,Change Email -Change Email and Password,Change Email and Password -Current Password,Current Password -New Password,New Password -Password Strength,Password Strength -No Password,No Password -Confirm New Password,Confirm New Password +"Send confirmation link","Send confirmation link" +"Back to Sign In","Back to Sign In" +"Change Email","Change Email" +"Change Email and Password","Change Email and Password" +"Current Password","Current Password" +"New Password","New Password" +"Password Strength","Password Strength" +"No Password","No Password" +"Confirm New Password","Confirm New Password" Save,Save -Please enter your email address below to receive a password reset link.,Please enter your email address below to receive a password reset link. -Reset My Password,Reset My Password -Registered Customers,Registered Customers +"Please enter your email address below to receive a password reset link.","Please enter your email address below to receive a password reset link." +"Reset My Password","Reset My Password" +"Registered Customers","Registered Customers" "If you have an account, sign in with your email address.","If you have an account, sign in with your email address." Password,Password -Forgot Your Password?,Forgot Your Password? -Subscription option,Subscription option -General Subscription,General Subscription -Sign Up for Newsletter,Sign Up for Newsletter -Address Information,Address Information -Sign-in Information,Sign-in Information -Confirm Password,Confirm Password -Create an Account,Create an Account -Set a New Password,Set a New Password -You have signed out and will go to our homepage in 5 seconds.,You have signed out and will go to our homepage in 5 seconds. -New Customers,New Customers +"Forgot Your Password?","Forgot Your Password?" +"Subscription option","Subscription option" +"General Subscription","General Subscription" +"Sign Up for Newsletter","Sign Up for Newsletter" +"Address Information","Address Information" +"Sign-in Information","Sign-in Information" +"Confirm Password","Confirm Password" +"Create an Account","Create an Account" +"Set a New Password","Set a New Password" +"You have signed out and will go to our homepage in 5 seconds.","You have signed out and will go to our homepage in 5 seconds." +"New Customers","New Customers" "Creating an account has many benefits: check out faster, keep more than one address, track orders and more.","Creating an account has many benefits: check out faster, keep more than one address, track orders and more." Company,Company Fax,Fax Gender,Gender Name,Name -Tax/VAT number,Tax/VAT number -Phone Number,Phone Number -Welcome to %store_name,Welcome to %store_name +"Tax/VAT number","Tax/VAT number" +"Phone Number","Phone Number" +"Welcome to %store_name","Welcome to %store_name" "%name,","%name," -Welcome to %store_name.,Welcome to %store_name. +"Welcome to %store_name.","Welcome to %store_name." "To sign in to our site, use these credentials during checkout or on the My Account page:","To sign in to our site, use these credentials during checkout or on the My Account page:" Email:,Email: Password:,Password: -Password you set when creating account,Password you set when creating account +"Password you set when creating account","Password you set when creating account" "Forgot your account password? Click here to reset it.","Forgot your account password? Click here to reset it." "When you sign in to your account, you will be able to:","When you sign in to your account, you will be able to:" -Proceed through checkout faster,Proceed through checkout faster -Check the status of orders,Check the status of orders -View past orders,View past orders -Store alternative addresses (for shipping to multiple family members and friends),Store alternative addresses (for shipping to multiple family members and friends) -Please confirm your %store_name account,Please confirm your %store_name account -You must confirm your %customer_email email before you can sign in (link is only valid once):,You must confirm your %customer_email email before you can sign in (link is only valid once): -Confirm Your Account,Confirm Your Account -Thank you for confirming your %store_name account.,Thank you for confirming your %store_name account. +"Proceed through checkout faster","Proceed through checkout faster" +"Check the status of orders","Check the status of orders" +"View past orders","View past orders" +"Store alternative addresses (for shipping to multiple family members and friends)","Store alternative addresses (for shipping to multiple family members and friends)" +"Please confirm your %store_name account","Please confirm your %store_name account" +"You must confirm your %customer_email email before you can sign in (link is only valid once):","You must confirm your %customer_email email before you can sign in (link is only valid once):" +"Confirm Your Account","Confirm Your Account" +"Thank you for confirming your %store_name account.","Thank you for confirming your %store_name account." "To sign in to our site and set a password, click on the link:","To sign in to our site and set a password, click on the link:" -Your %store_name email has been changed,Your %store_name email has been changed +"Your %store_name email has been changed","Your %store_name email has been changed" "Hello,","Hello," -We have received a request to change the following information associated with your account at %store_name: email.,We have received a request to change the following information associated with your account at %store_name: email. +"We have received a request to change the following information associated with your account at %store_name: email.","We have received a request to change the following information associated with your account at %store_name: email." "If you have not authorized this action, please contact us immediately at %store_email","If you have not authorized this action, please contact us immediately at %store_email" "or call us at %store_phone","or call us at %store_phone" "Thanks,
%store_name","Thanks,
%store_name" -Your %store_name email and password has been changed,Your %store_name email and password has been changed +"Your %store_name email and password has been changed","Your %store_name email and password has been changed" "We have received a request to change the following information associated with your account at %store_name: email, password.","We have received a request to change the following information associated with your account at %store_name: email, password." -Reset your %store_name password,Reset your %store_name password -There was recently a request to change the password for your account.,There was recently a request to change the password for your account. +"Reset your %store_name password","Reset your %store_name password" +"There was recently a request to change the password for your account.","There was recently a request to change the password for your account." "If you requested this change, set a new password here:","If you requested this change, set a new password here:" "If you did not make this request, you can ignore this email and your password will remain the same.","If you did not make this request, you can ignore this email and your password will remain the same." -Your %store_name password has been changed,Your %store_name password has been changed -We have received a request to change the following information associated with your account at %store_name: password.,We have received a request to change the following information associated with your account at %store_name: password. -Checkout as a new customer,Checkout as a new customer -Creating an account has many benefits:,Creating an account has many benefits: -See order and shipping status,See order and shipping status -Track order history,Track order history -Check out faster,Check out faster -Checkout using your account,Checkout using your account -Email Address,Email Address -Are you sure you want to do this?,Are you sure you want to do this? -Are you sure you want to delete this address?,Are you sure you want to delete this address? +"Your %store_name password has been changed","Your %store_name password has been changed" +"We have received a request to change the following information associated with your account at %store_name: password.","We have received a request to change the following information associated with your account at %store_name: password." +"Checkout as a new customer","Checkout as a new customer" +"Creating an account has many benefits:","Creating an account has many benefits:" +"See order and shipping status","See order and shipping status" +"Track order history","Track order history" +"Check out faster","Check out faster" +"Checkout using your account","Checkout using your account" +"Email Address","Email Address" +"Are you sure you want to do this?","Are you sure you want to do this?" +"Are you sure you want to delete this address?","Are you sure you want to delete this address?" Weak,Weak Medium,Medium Strong,Strong -Very Strong,Very Strong -Guest checkout is disabled.,Guest checkout is disabled. -All Customers,All Customers -Now Online,Now Online -Customers Section,Customers Section -Customer Configuration,Customer Configuration -Account Sharing Options,Account Sharing Options -Share Customer Accounts,Share Customer Accounts -Create New Account Options,Create New Account Options -Enable Automatic Assignment to Customer Group,Enable Automatic Assignment to Customer Group -Tax Calculation Based On,Tax Calculation Based On -Default Group,Default Group -Group for Valid VAT ID - Domestic,Group for Valid VAT ID - Domestic -Group for Valid VAT ID - Intra-Union,Group for Valid VAT ID - Intra-Union -Group for Invalid VAT ID,Group for Invalid VAT ID -Validation Error Group,Validation Error Group -Validate on Each Transaction,Validate on Each Transaction -Default Value for Disable Automatic Group Changes Based on VAT ID,Default Value for Disable Automatic Group Changes Based on VAT ID -Show VAT Number on Storefront,Show VAT Number on Storefront +"Very Strong","Very Strong" +"Guest checkout is disabled.","Guest checkout is disabled." +"All Customers","All Customers" +"Now Online","Now Online" +"Customers Section","Customers Section" +"Customer Configuration","Customer Configuration" +"Account Sharing Options","Account Sharing Options" +"Share Customer Accounts","Share Customer Accounts" +"Create New Account Options","Create New Account Options" +"Enable Automatic Assignment to Customer Group","Enable Automatic Assignment to Customer Group" +"Tax Calculation Based On","Tax Calculation Based On" +"Default Group","Default Group" +"Group for Valid VAT ID - Domestic","Group for Valid VAT ID - Domestic" +"Group for Valid VAT ID - Intra-Union","Group for Valid VAT ID - Intra-Union" +"Group for Invalid VAT ID","Group for Invalid VAT ID" +"Validation Error Group","Validation Error Group" +"Validate on Each Transaction","Validate on Each Transaction" +"Default Value for Disable Automatic Group Changes Based on VAT ID","Default Value for Disable Automatic Group Changes Based on VAT ID" +"Show VAT Number on Storefront","Show VAT Number on Storefront" "To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes.","To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes." -Default Email Domain,Default Email Domain -Default Welcome Email,Default Welcome Email +"Default Email Domain","Default Email Domain" +"Default Welcome Email","Default Welcome Email" "Email template chosen based on theme fallback when ""Default"" option is selected.","Email template chosen based on theme fallback when ""Default"" option is selected." -Default Welcome Email Without Password,Default Welcome Email Without Password +"Default Welcome Email Without Password","Default Welcome Email Without Password" " This email will be sent instead of the Default Welcome Email, if a customer was created without password.

Email template chosen based on theme fallback when ""Default"" option is selected. @@ -443,10 +443,10 @@ Default Welcome Email Without Password,Default Welcome Email Without Password This email will be sent instead of the Default Welcome Email, if a customer was created without password.

Email template chosen based on theme fallback when ""Default"" option is selected. " -Email Sender,Email Sender -Require Emails Confirmation,Require Emails Confirmation -Confirmation Link Email,Confirmation Link Email -Welcome Email,Welcome Email +"Email Sender","Email Sender" +"Require Emails Confirmation","Require Emails Confirmation" +"Confirmation Link Email","Confirmation Link Email" +"Welcome Email","Welcome Email" " This email will be sent instead of the Default Welcome Email, after account confirmation.

Email template chosen based on theme fallback when ""Default"" option is selected. @@ -454,88 +454,88 @@ Welcome Email,Welcome Email This email will be sent instead of the Default Welcome Email, after account confirmation.

Email template chosen based on theme fallback when ""Default"" option is selected. " -Generate Human-Friendly Customer ID,Generate Human-Friendly Customer ID -Password Options,Password Options -Forgot Email Template,Forgot Email Template -Remind Email Template,Remind Email Template -Reset Password Template,Reset Password Template -Password Template Email Sender,Password Template Email Sender -Recovery Link Expiration Period (hours),Recovery Link Expiration Period (hours) -Please enter a number 1 or greater in this field.,Please enter a number 1 or greater in this field. -Number of Required Character Classes,Number of Required Character Classes +"Generate Human-Friendly Customer ID","Generate Human-Friendly Customer ID" +"Password Options","Password Options" +"Forgot Email Template","Forgot Email Template" +"Remind Email Template","Remind Email Template" +"Reset Password Template","Reset Password Template" +"Password Template Email Sender","Password Template Email Sender" +"Recovery Link Expiration Period (hours)","Recovery Link Expiration Period (hours)" +"Please enter a number 1 or greater in this field.","Please enter a number 1 or greater in this field." +"Number of Required Character Classes","Number of Required Character Classes" "Number of different character classes required in password: Lowercase, Uppercase, Digits, Special Characters.","Number of different character classes required in password: Lowercase, Uppercase, Digits, Special Characters." -Minimum Password Length,Minimum Password Length -Maximum Login Failures to Lockout Account,Maximum Login Failures to Lockout Account -Use 0 to disable account locking.,Use 0 to disable account locking. -Lockout Time (minutes),Lockout Time (minutes) -Enable Autocomplete on login/forgot password forms,Enable Autocomplete on login/forgot password forms -Account Information Options,Account Information Options -Change Email Template,Change Email Template -Change Email and Password Template,Change Email and Password Template -Name and Address Options,Name and Address Options -Number of Lines in a Street Address,Number of Lines in a Street Address -Leave empty for default (2). Valid range: 1-4,Leave empty for default (2). Valid range: 1-4 -Show Prefix,Show Prefix +"Minimum Password Length","Minimum Password Length" +"Maximum Login Failures to Lockout Account","Maximum Login Failures to Lockout Account" +"Use 0 to disable account locking.","Use 0 to disable account locking." +"Lockout Time (minutes)","Lockout Time (minutes)" +"Enable Autocomplete on login/forgot password forms","Enable Autocomplete on login/forgot password forms" +"Account Information Options","Account Information Options" +"Change Email Template","Change Email Template" +"Change Email and Password Template","Change Email and Password Template" +"Name and Address Options","Name and Address Options" +"Number of Lines in a Street Address","Number of Lines in a Street Address" +"Leave empty for default (2). Valid range: 1-4","Leave empty for default (2). Valid range: 1-4" +"Show Prefix","Show Prefix" "The title that goes before name (Mr., Mrs., etc.)","The title that goes before name (Mr., Mrs., etc.)" -Prefix Dropdown Options,Prefix Dropdown Options +"Prefix Dropdown Options","Prefix Dropdown Options" " Semicolon (;) separated values.
Leave empty for open text field. "," Semicolon (;) separated values.
Leave empty for open text field. " -Show Middle Name (initial),Show Middle Name (initial) -Always optional.,Always optional. -Show Suffix,Show Suffix +"Show Middle Name (initial)","Show Middle Name (initial)" +"Always optional.","Always optional." +"Show Suffix","Show Suffix" "The suffix that goes after name (Jr., Sr., etc.)","The suffix that goes after name (Jr., Sr., etc.)" -Suffix Dropdown Options,Suffix Dropdown Options -Show Date of Birth,Show Date of Birth -Show Tax/VAT Number,Show Tax/VAT Number -Show Gender,Show Gender -Show Telephone,Show Telephone -Show Company,Show Company -Show Fax,Show Fax -Login Options,Login Options -Redirect Customer to Account Dashboard after Logging in,Redirect Customer to Account Dashboard after Logging in +"Suffix Dropdown Options","Suffix Dropdown Options" +"Show Date of Birth","Show Date of Birth" +"Show Tax/VAT Number","Show Tax/VAT Number" +"Show Gender","Show Gender" +"Show Telephone","Show Telephone" +"Show Company","Show Company" +"Show Fax","Show Fax" +"Login Options","Login Options" +"Redirect Customer to Account Dashboard after Logging in","Redirect Customer to Account Dashboard after Logging in" "Customer will stay on the current page if ""No"" is selected.","Customer will stay on the current page if ""No"" is selected." -Address Templates,Address Templates -Online Customers Options,Online Customers Options -Online Minutes Interval,Online Minutes Interval +"Address Templates","Address Templates" +"Online Customers Options","Online Customers Options" +"Online Minutes Interval","Online Minutes Interval" "Only 'b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul' tags are allowed","Only 'b', 'br', 'em', 'i', 'li', 'ol', 'p', 'strong', 'sub', 'sup', 'ul' tags are allowed" -Leave empty for default (15 minutes).,Leave empty for default (15 minutes). -Customer Notification,Customer Notification -Customer Grid,Customer Grid -Rebuild Customer grid index,Rebuild Customer grid index +"Leave empty for default (15 minutes).","Leave empty for default (15 minutes)." +"Customer Notification","Customer Notification" +"Customer Grid","Customer Grid" +"Rebuild Customer grid index","Rebuild Customer grid index" Group,Group -Add New Customer,Add New Customer -Are you sure you want to delete the selected customers?,Are you sure you want to delete the selected customers? -Delete items,Delete items -Subscribe to Newsletter,Subscribe to Newsletter -Are you sure you want to unsubscribe the selected customers from the newsletter?,Are you sure you want to unsubscribe the selected customers from the newsletter? -Unsubscribe from Newsletter,Unsubscribe from Newsletter -Assign a Customer Group,Assign a Customer Group +"Add New Customer","Add New Customer" +"Are you sure you want to delete the selected customers?","Are you sure you want to delete the selected customers?" +"Delete items","Delete items" +"Subscribe to Newsletter","Subscribe to Newsletter" +"Are you sure you want to unsubscribe the selected customers from the newsletter?","Are you sure you want to unsubscribe the selected customers from the newsletter?" +"Unsubscribe from Newsletter","Unsubscribe from Newsletter" +"Assign a Customer Group","Assign a Customer Group" Phone,Phone ZIP,ZIP -Customer Since,Customer Since -Confirmed email,Confirmed email -Account Created in,Account Created in -Tax VAT Number,Tax VAT Number -Billing Firstname,Billing Firstname -Billing Lastname,Billing Lastname -Account Lock,Account Lock -First Name,First Name -Last Name,Last Name -Last Activity,Last Activity +"Customer Since","Customer Since" +"Confirmed email","Confirmed email" +"Account Created in","Account Created in" +"Tax VAT Number","Tax VAT Number" +"Billing Firstname","Billing Firstname" +"Billing Lastname","Billing Lastname" +"Account Lock","Account Lock" +"First Name","First Name" +"Last Name","Last Name" +"Last Activity","Last Activity" Type,Type -Customer Information,Customer Information +"Customer Information","Customer Information" "If your Magento installation has multiple websites, you can edit the scope to associate the customer with a specific site.","If your Magento installation has multiple websites, you can edit the scope to associate the customer with a specific site." -Disable Automatic Group Change Based on VAT ID,Disable Automatic Group Change Based on VAT ID -Send Welcome Email From,Send Welcome Email From -Are you sure you want to delete this item?,Are you sure you want to delete this item? +"Disable Automatic Group Change Based on VAT ID","Disable Automatic Group Change Based on VAT ID" +"Send Welcome Email From","Send Welcome Email From" +"Are you sure you want to delete this item?","Are you sure you want to delete this item?" Addresses,Addresses -Edit Account Information,Edit Account Information -Password forgotten,Password forgotten -You are signed out,You are signed out -Associate to Website,Associate to Website -Prefix,Prefix -Middle Name/Initial,Middle Name/Initial -Suffix,Suffix +"Edit Account Information","Edit Account Information" +"Password forgotten","Password forgotten" +"You are signed out","You are signed out" +"Associate to Website","Associate to Website" +"Prefix","Prefix" +"Middle Name/Initial","Middle Name/Initial" +"Suffix","Suffix" From 6dcdd8af62b234b8c14cf221757b3489822188e2 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Sat, 21 Sep 2019 17:18:10 +0530 Subject: [PATCH 010/153] Discard NonComposerComponentRegistration file --- app/etc/NonComposerComponentRegistration.php | 33 -------------------- 1 file changed, 33 deletions(-) delete mode 100755 app/etc/NonComposerComponentRegistration.php diff --git a/app/etc/NonComposerComponentRegistration.php b/app/etc/NonComposerComponentRegistration.php deleted file mode 100755 index a7377ebfca3af..0000000000000 --- a/app/etc/NonComposerComponentRegistration.php +++ /dev/null @@ -1,33 +0,0 @@ - Date: Sat, 21 Sep 2019 17:25:30 +0530 Subject: [PATCH 011/153] discard files --- app/etc/db_schema.xml | 17 - app/etc/di.xml | 1784 ----------------------- app/etc/registration_globlist.php | 19 - app/etc/vendor_path.php | 5 - generated/.htaccess | 8 - pub/media/.htaccess | 134 -- pub/media/customer/.htaccess | 8 - pub/media/downloadable/.htaccess | 8 - pub/media/import/.htaccess | 8 - pub/media/theme_customization/.htaccess | 10 - pub/static/.htaccess | 133 -- var/.htaccess | 8 - 12 files changed, 2142 deletions(-) delete mode 100755 app/etc/db_schema.xml delete mode 100755 app/etc/di.xml delete mode 100755 app/etc/registration_globlist.php delete mode 100755 app/etc/vendor_path.php delete mode 100755 generated/.htaccess delete mode 100755 pub/media/.htaccess delete mode 100755 pub/media/customer/.htaccess delete mode 100755 pub/media/downloadable/.htaccess delete mode 100755 pub/media/import/.htaccess delete mode 100755 pub/media/theme_customization/.htaccess delete mode 100755 pub/static/.htaccess delete mode 100755 var/.htaccess diff --git a/app/etc/db_schema.xml b/app/etc/db_schema.xml deleted file mode 100755 index d7af9091b238d..0000000000000 --- a/app/etc/db_schema.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - -
-
diff --git a/app/etc/di.xml b/app/etc/di.xml deleted file mode 100755 index 882d1be623988..0000000000000 --- a/app/etc/di.xml +++ /dev/null @@ -1,1784 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - system/currency/installed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Magento\Framework\Acl\Builder\Proxy - - - - - Magento\Framework\Filesystem\Driver\File - - - - - Magento\Framework\Filesystem\Driver\File - - - - - - - - Magento\WebapiAsync\Code\Generator\Config\RemoteServiceReader\Communication - 0 - - - Magento\Framework\Communication\Config\Reader\XmlReader - 10 - - - Magento\Framework\Communication\Config\Reader\EnvReader - 20 - - - Magento\Framework\MessageQueue\Code\Generator\Config\RemoteServiceReader\Communication - 5 - - - - - - - main - - Magento\Framework\Logger\Handler\System - Magento\Framework\Logger\Handler\Debug - Magento\Framework\Logger\Handler\Syslog - - - - - - Magento - - - - - Magento\Framework\Model\ActionValidator\RemoveAction\Proxy - - - - - - - - - Magento\Framework\Message\Session\Proxy - Magento\Framework\Message\ExceptionMessageLookupFactory - - - - - - Magento\Backend\App\Request\PathInfoProcessor\Proxy - - - - - Magento\Framework\Session\Config\ConfigInterface\Proxy - - - - - - - Magento\Framework\Session\SaveHandler\DbTable - Magento\Framework\Session\SaveHandler\Redis - - - - - - - Magento\Framework\App\Feed - - - - - - Cm\RedisSession\Handler\ConfigInterface - Cm\RedisSession\Handler\LoggerInterface - - - - - global - - - - - Magento\Framework\App\State::PARAM_MODE - - - - - Magento\Framework\App\State::PARAM_MODE - - - - - Magento\Framework\App\State::PARAM_MODE - - - - - Magento\Framework\App\State::PARAM_MODE - - - - - Magento\Framework\App\Cache\Frontend\Factory::PARAM_CACHE_FORCED_OPTIONS - - - Magento\Framework\Cache\Frontend\Decorator\TagScope - - MAGE - - - - Magento\Framework\Cache\Frontend\Decorator\Logger - - - Magento\Framework\App\ResourceConnection\Proxy - - - - - Magento\Backend\Setup\ConfigOptionsList::CONFIG_PATH_BACKEND_FRONTNAME - - - - - Magento\Framework\App\Cache\State::PARAM_BAN_CACHE - - - - - Magento\Store\Model\StoreManager::PARAM_RUN_CODE - Magento\Store\Model\StoreManager::PARAM_RUN_TYPE - - - - - Magento\Framework\App\Cache\Type\Translate - Magento\Framework\Locale\Resolver\Proxy - Magento\Framework\Translate\ResourceInterface\Proxy - Magento\Framework\App\Request\Http\Proxy - - - - - Magento\Framework\Translate\InlineInterface\Proxy - - - - - - - Magento\Store\Model\StoreManagerInterface\Proxy - - - - - - Magento\Framework\App\Cache\Type\Config - Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy - - - - - Magento\Framework\App\Cache\Type\Config - - - - - config_cache - Magento\Framework\Cache\Config\Reader\Proxy - - - - - Magento\Framework\App\Cache\Type\Config - Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy - interception - - - - - Magento\Framework\App\Cache\Type\Config - - - - - Magento\Framework\App\Cache\Type\Config - Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy - plugin-list - - global - - - - - - Magento\Framework\App\ResourceConnection\ConnectionFactory - - - - - Magento\Framework\App\ResourceConnection\Config\Reader\Proxy - Magento\Framework\App\Cache\Type\Config\Proxy - - - - - Magento\Framework\App\Config\FileResolver\Proxy - - - - - primary - Magento\Framework\App\AreaList\Proxy - - - - - Magento\Framework\Session\Generic\Proxy - Magento\Store\Model\ScopeInterface::SCOPE_STORE - - - - - - Magento\Framework\View\Layout\Argument\Interpreter\Options - layoutArrayArgumentReaderInterpreterProxy - Magento\Framework\Data\Argument\Interpreter\Boolean - Magento\Framework\Data\Argument\Interpreter\Number - Magento\Framework\Data\Argument\Interpreter\StringUtils - Magento\Framework\Data\Argument\Interpreter\NullType - Magento\Framework\View\Layout\Argument\Interpreter\Passthrough - Magento\Framework\View\Layout\Argument\Interpreter\Passthrough - Magento\Framework\View\Layout\Argument\Interpreter\Passthrough - - Magento\Framework\View\Model\Layout\Merge::TYPE_ATTRIBUTE - - - - - - Magento\Framework\View\Layout\Argument\Interpreter\Options - layoutArrayArgumentGeneratorInterpreterProxy - Magento\Framework\Data\Argument\Interpreter\Boolean - Magento\Framework\Data\Argument\Interpreter\Number - Magento\Framework\Data\Argument\Interpreter\StringUtils - Magento\Framework\Data\Argument\Interpreter\NullType - layoutObjectArgumentInterpreter - Magento\Framework\View\Layout\Argument\Interpreter\Url - Magento\Framework\View\Layout\Argument\Interpreter\HelperMethod - - Magento\Framework\View\Model\Layout\Merge::TYPE_ATTRIBUTE - - - - - layoutArgumentGeneratorInterpreterInternal - - - - - layoutArgumentReaderInterpreter - - - - - layoutArgumentGeneratorInterpreterInternal - - - - - - layoutArrayArgumentReaderInterpreter - - - - - layoutArrayArgumentGeneratorInterpreter - - - - - Magento\Framework\View\Element\Block\ArgumentInterface - - - - - Magento\Framework\Data\Argument\Interpreter\StringUtils - - - - - - Magento\Framework\View\Layout\Reader\Container - Magento\Framework\View\Layout\Reader\Block - Magento\Framework\View\Layout\Reader\UiComponent - - - - - - containerRenderPool - - - - - - Magento\Framework\View\Layout\Reader\Container - Magento\Framework\View\Layout\Reader\Block - Magento\Framework\View\Layout\Reader\Move - Magento\Framework\View\Layout\Reader\UiComponent - - - - - - blockRenderPool - Magento\Store\Model\ScopeInterface::SCOPE_STORE - layoutArgumentReaderInterpreter - - - - - blockRenderPool - - - - - Magento\Store\Model\ScopeInterface::SCOPE_STORE - - - - - - Magento\Framework\View\Layout\Reader\Container - Magento\Framework\View\Layout\Reader\Block - Magento\Framework\View\Layout\Reader\Move - Magento\Framework\View\Layout\Reader\UiComponent - - - - - - bodyRenderPool - - - - - - Magento\Framework\View\Page\Config\Reader\Html - Magento\Framework\View\Page\Config\Reader\Head - Magento\Framework\View\Page\Config\Reader\Body - Magento\Framework\View\Layout\Reader\Container - Magento\Framework\View\Layout\Reader\Block - Magento\Framework\View\Layout\Reader\Move - Magento\Framework\View\Layout\Reader\UiComponent - - - - - - commonRenderPool - Magento\Framework\App\Cache\Type\Layout - - - - - - Magento\Framework\View\Layout\Reader\Container - Magento\Framework\View\Layout\Reader\Block - Magento\Framework\View\Layout\Reader\Move - Magento\Framework\View\Layout\Reader\UiComponent - - - - - - genericLayoutRenderPool - - - - - - Magento\Framework\View\Page\Config\Reader\Html - Magento\Framework\View\Page\Config\Reader\Head - Magento\Framework\View\Page\Config\Reader\Body - - - - - - - Magento\Framework\View\Page\Config\Generator\Head - Magento\Framework\View\Page\Config\Generator\Body - Magento\Framework\View\Layout\Generator\Block - Magento\Framework\View\Layout\Generator\Container - Magento\Framework\View\Layout\Generator\UiComponent - - - - - - - Magento\Framework\View\Page\Config\Generator\Head - Magento\Framework\View\Page\Config\Generator\Body - Magento\Framework\View\Layout\Generator\Block - Magento\Framework\View\Layout\Generator\Container - Magento\Framework\View\Layout\Generator\UiComponent - - - - - - pageConfigRenderPool - pageLayoutGeneratorPool - Magento_Theme::root.phtml - - - - - layoutArgumentGeneratorInterpreter - - - - - Magento\Indexer\Model\Mview\View\State - Magento\Framework\Mview\View\Changelog - - - - - Magento\Framework\Mview\Config\Data\Proxy - - - - - Magento\Framework\Mview\View\State\CollectionInterface - - - - - - - AlternativeSourceProcessors - - - - - - Magento\MediaStorage\Model\File\Storage\Response - developerPublisher - - - - - Magento\Framework\View\Asset\PreProcessor\MinificationFilenameResolver - alternative-source-css - Magento\Framework\View\Asset\LockerProcess - - - Magento\Framework\Css\PreProcessor\Adapter\Less\Processor - - - - - - - developerMaterialization - - - - - - Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink - Magento\Framework\App\View\Asset\MaterializationStrategy\Copy - - - - - - Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple - - - - - Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple - - - - - Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple - - - - - - viewFileFallbackResolver - - - - - - viewFileMinifiedFallbackResolver - - - - - - \Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceFactoryGenerator - \Magento\Framework\ObjectManager\Code\Generator\Factory - \Magento\Framework\ObjectManager\Code\Generator\Proxy - \Magento\Framework\Interception\Code\Generator\Interceptor - \Magento\Framework\ObjectManager\Profiler\Code\Generator\Logger - \Magento\Framework\Api\Code\Generator\Mapper - \Magento\Framework\ObjectManager\Code\Generator\Persistor - \Magento\Framework\ObjectManager\Code\Generator\Repository - \Magento\Framework\ObjectManager\Code\Generator\Converter - \Magento\Framework\Api\Code\Generator\SearchResults - \Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceGenerator - \Magento\Framework\Api\Code\Generator\ExtensionAttributesGenerator - \Magento\Framework\MessageQueue\Code\Generator\RemoteServiceGenerator - \Magento\Framework\Async\Code\Generator\ProxyDeferredGenerator - - - - - - - - - page_cache - - - - - - - - - page_cache - - - - - - Magento\Framework\Translate\Inline\ParserInterface\Proxy - - - - - - - - Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Term - Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Range - Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Dynamic - - - - - - - Magento\Framework\Search\Dynamic\Algorithm\Auto - Magento\Framework\Search\Dynamic\Algorithm\Manual - Magento\Framework\Search\Dynamic\Algorithm\Improved - - - - - - Magento\Framework\View\Layout\File\Collector\Aggregated\Proxy - pageLayoutFileCollectorAggregated - Magento\Framework\App\Cache\Type\Layout - Magento\Framework\View\Layout\LayoutCacheKeyInterface - - - - - false - - - - - - core - index - index - - - - - - Magento\Framework\App\Cache\Type\Collection - collection_ - 86400 - - - - - Magento\Framework\Event\Config\Reader\Proxy - - - - - - layout - - - - - layoutFileSourceBase - - - - - layoutFileSourceBaseFiltered - - - - - - layout - - - - - layoutFileSourceTheme - - - - - layoutFileSourceThemeFiltered - - - - - - layout/override/base - - - - - layoutFileSourceOverrideBase - - - - - layoutFileSourceOverrideBaseFiltered - - - - - - layout/override/theme - - - - - layoutFileSourceOverrideTheme - - - - - layoutFileSourceOverrideThemeFiltered - - - - - layoutFileSourceBaseSorted - layoutFileSourceThemeSorted - layoutFileSourceOverrideBaseSorted - layoutFileSourceOverrideThemeSorted - - - - - page_layout - - - - - pageLayoutFileSourceBase - - - - - pageLayoutFileSourceBaseFiltered - - - - - page_layout - - - - - pageLayoutFileSourceTheme - - - - - pageLayoutFileSourceThemeFiltered - - - - - - page_layout/override/base - - - - - pageLayoutFileSourceOverrideBase - - - - - pageLayoutFileSourceOverrideBaseFiltered - - - - - - page_layout/override/theme - - - - - pageLayoutFileSourceOverrideTheme - - - - - pageLayoutFileSourceOverrideThemeFiltered - - - - - - pageLayoutFileSourceBaseSorted - pageLayoutFileSourceThemeSorted - pageLayoutFileSourceOverrideBaseSorted - pageLayoutFileSourceOverrideThemeSorted - - - - - - - pageFileSourceBase - - - - - pageFileSourceBaseFiltered - - - - - - - pageFileSourceTheme - - - - - pageFileSourceThemeFiltered - - - - - - page/override - - - - - pageFileSourceOverrideBase - - - - - pageFileSourceOverrideBaseFiltered - - - - - - override/theme - - - - - pageFileSourceOverrideTheme - - - - - pageFileSourceOverrideThemeFiltered - - - - - - Magento\Framework\View\Layout\Reader\Container - Magento\Framework\View\Layout\Reader\Move - - - - - - pageLayoutFileCollectorAggregated - pageLayoutRenderPool - - - - - pageFileSourceBaseSorted - pageFileSourceThemeSorted - pageFileSourceOverrideBaseSorted - pageFileSourceOverrideThemeSorted - - - - - Magento\Framework\View\Design\Theme\Image\Uploader\Proxy - - - - - Magento\Framework\App\Config\Initial\Reader\Proxy - - - - - Magento\Framework\App\Config\Initial\Converter - - - - - Magento\Framework\App\Route\Config\Reader\Proxy - - - - - Magento\Store\Model\ScopeInterface::SCOPE_STORE - - Shockwave Flash - - - - - - - Magento\Framework\DataObject\Copy\Config\Data\Proxy - - - - - fieldset.xml - Magento\Framework\DataObject\Copy\Config\SchemaLocator - - - - - urn:magento:framework:DataObject/etc/fieldset.xsd - urn:magento:framework:DataObject/etc/fieldset_file.xsd - - - - - Magento\Framework\DataObject\Copy\Config\Reader\Proxy - fieldset_config - - - - - Magento\Framework\Image\Adapter\Gd2 - - - - - page_types.xml - Magento\Framework\View\Layout\PageType\Config\Converter - Magento\Framework\View\Layout\PageType\Config\SchemaLocator - frontend - - - - - Magento\Framework\View\Layout\PageType\Config\Reader - page_types_config - - - - - Magento\Framework\View\Layout\PageType\Config\Data - - - - - message - - - - - Magento\Framework\Message\Session\Storage - - - - - frontend - - - - - - Magento\Framework\Filesystem\Driver\File - - - - - - [a-z]+[_a-z\d]*?\/[a-z]+[_a-z\d]*?)::.*?$/sui]]> - [a-z]+[_a-z\d]*?\/[a-z]+[_a-z\d]*?)\".*?}}/sui]]> - [a-z]+[_a-z\d]*?\/[a-z]+[_a-z\d]*?)\".*?>/sui]]> - s:\d+:"(?P[a-z]+[_a-z\d]*?/[a-z]+[_a-z\d]*?)")#sui]]> - - - - - - - - application/json - Magento\Framework\Webapi\Rest\Request\Deserializer\Json - - - application/xml - Magento\Framework\Webapi\Rest\Request\Deserializer\Xml - - - application/xhtml+xml - Magento\Framework\Webapi\Rest\Request\Deserializer\Xml - - - text/xml - Magento\Framework\Webapi\Rest\Request\Deserializer\Xml - - - - - - - Magento\Framework\App\Cache\Type\Config - - - - - - Magento\Framework\Reflection\ExtensionAttributesProcessor\Proxy - Magento\Framework\Reflection\CustomAttributesProcessor\Proxy - - - - - Magento\Framework\UrlInterface - - - - - - - view.xml - Magento\Framework\Config\Converter - Magento\Framework\Config\SchemaLocator - Magento\Framework\Config\FileResolver - - - - - Magento\Framework\DB\Select\RendererProxy - - - - - Magento\Framework\Locale\ResolverInterface - - - - - - - Magento\Framework\DB\Select\DistinctRenderer - 100 - distinct - - - Magento\Framework\DB\Select\ColumnsRenderer - 200 - columns - - - Magento\Framework\DB\Select\UnionRenderer - 300 - union - - - Magento\Framework\DB\Select\FromRenderer - 400 - from - - - Magento\Framework\DB\Select\WhereRenderer - 500 - where - - - Magento\Framework\DB\Select\GroupRenderer - 600 - group - - - Magento\Framework\DB\Select\HavingRenderer - 700 - having - - - Magento\Framework\DB\Select\OrderRenderer - 800 - order - - - Magento\Framework\DB\Select\LimitRenderer - 900 - limitcount - - - Magento\Framework\DB\Select\ForUpdateRenderer - 1000 - forupdate - - - - - - - - - Magento\Framework\EntityManager\Operation\CheckIfExists - Magento\Framework\EntityManager\Operation\Read - Magento\Framework\EntityManager\Operation\Create - Magento\Framework\EntityManager\Operation\Update - Magento\Framework\EntityManager\Operation\Delete - - - - - - - - Magento\Framework\App\Cache\Type\Block::TYPE_IDENTIFIER - Magento\Framework\App\Cache\Type\Collection::TYPE_IDENTIFIER - - - - - - - Magento\Framework\EntityManager\Mapper - - - - - - - - Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor - Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor - Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor - - - - - - - Magento\Framework\DB\Select\InQueryModifier - Magento\Framework\DB\Select\LikeQueryModifier - Magento\Framework\DB\Select\CompositeQueryModifier - - - - - - - HASH - BTREE - - - INNODB - MEMORY - MYISAM - - - - - - Magento\Framework\DB\FieldDataConverter::BATCH_SIZE_VARIABLE_NAME - - - - - - - true - - - - - - - Magento\Framework\View\Asset\PreProcessor\Passthrough - - - - - Magento\Framework\App\Filesystem\DirectoryList::STATIC_VIEW - deployed_version.txt - - - - - Magento\Directory\Helper\Data::XML_PATH_DEFAULT_LOCALE - Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT - - - - - - Magento\Framework\View\Element\Message\Renderer\EscapeRenderer - Magento\Framework\View\Element\Message\Renderer\BlockRenderer - - - - - - - - \Magento\Framework\View\Element\Message\Renderer\EscapeRenderer::CODE - - - - - - - Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_LOGGER_OUTPUT - Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_LOGGER_LOG_EVERYTHING - Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_LOGGER_QUERY_TIME_THRESHOLD - Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_LOGGER_INCLUDE_STACKTRACE - - - - - Magento\Config\App\Config\Source\EnvironmentConfigSource - - - - - Magento\Framework\Message\ExceptionMessageFactory - - - - - - updated_at - - - - - - - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Table - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Real - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Real - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Real - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Integer - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Integer - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Integer - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Integer - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Date - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Timestamp - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Timestamp - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\LongText - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\MediumText - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Text - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\StringBinary - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\StringBinary - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Blob - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\MediumBlob - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\LongBlob - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Boolean - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Unique - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Primary - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Foreign - \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Index - - - - - - - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Boolean - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Integer - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Integer - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Integer - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Integer - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Real - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Real - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Real - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Timestamp - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Date - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Timestamp - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\StringBinary - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\StringBinary - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\StringBinary - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\StringBinary - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Index - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Constraints\Internal - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Constraints\Internal - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Constraints\Internal - \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Constraints\ForeignKey - - - - - - - Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DDL\Triggers\MigrateDataFrom - - - - - - - Magento\Framework\Setup\Declaration\Schema\FileSystem\XmlReader - - - - - - urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd - - - - - Magento\Framework\Config\FileResolverByModule - Magento\Framework\Setup\Declaration\Schema\Config\Converter - Magento\Framework\Setup\Declaration\Schema\Config\SchemaLocator - db_schema.xml - - name - name - referenceId - referenceId - name - name - - - - - - - Magento\Framework\Setup\Declaration\Schema\Operations\ReCreateTable - Magento\Framework\Setup\Declaration\Schema\Operations\CreateTable - Magento\Framework\Setup\Declaration\Schema\Operations\DropTable - Magento\Framework\Setup\Declaration\Schema\Operations\DropReference - Magento\Framework\Setup\Declaration\Schema\Operations\ModifyColumn - Magento\Framework\Setup\Declaration\Schema\Operations\AddColumn - Magento\Framework\Setup\Declaration\Schema\Operations\DropElement - Magento\Framework\Setup\Declaration\Schema\Operations\AddComplexElement - Magento\Framework\Setup\Declaration\Schema\Operations\ModifyTable - - - Magento\Framework\Setup\Declaration\Schema\DataSavior\TableSavior - Magento\Framework\Setup\Declaration\Schema\DataSavior\ColumnSavior - - - - - - - default - - - - - - - Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\CheckReferenceColumnHasIndex - Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\RealTypes - Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\PrimaryKeyCanBeCreated - Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\IncosistentReferenceDefinition - Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\AutoIncrementColumnValidation - - - - - - - Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition - Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition - Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition - Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition - Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition - Magento\Framework\Setup\SchemaListenerDefinition\RealDefinition - Magento\Framework\Setup\SchemaListenerDefinition\RealDefinition - Magento\Framework\Setup\SchemaListenerDefinition\RealDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TimestampDefinition - Magento\Framework\Setup\SchemaListenerDefinition\TimestampDefinition - Magento\Framework\Setup\SchemaListenerDefinition\DateDefinition - Magento\Framework\Setup\SchemaListenerDefinition\BooleanDefinition - - - - - - schema - - - - - data - - - - - \Magento\Framework\Setup\Patch\DataPatchReader - \Magento\Framework\Setup\Patch\SchemaPatchReader - - - - - \Magento\Framework\Setup\Patch\DataPatchReader - - - - - \Magento\Framework\Setup\Patch\SchemaPatchReader - - - - - - - Magento\Framework\MessageQueue\Config\Reader\Xml - 10 - - - Magento\Framework\MessageQueue\Config\Reader\Env - 20 - - - - - - - - - Magento\Framework\MessageQueue\Config\Reader\Xml\Converter\TopicConfig - 20 - - - - - - - Magento\Framework\MessageQueue\Consumer\Config\CompositeReader - - - - - - Magento\Framework\MessageQueue\Consumer\Config\Xml\Reader - Magento\Framework\MessageQueue\Consumer\Config\Env\Reader - - - - - - - Magento\Framework\MessageQueue\Consumer\Config\Validator\RequiredFields - Magento\Framework\MessageQueue\Consumer\Config\Validator\FieldsTypes - Magento\Framework\MessageQueue\Consumer\Config\Validator\Handlers - Magento\Framework\MessageQueue\Consumer\Config\Validator\ConsumerInstance - - - - - - - Magento\Framework\MessageQueue\Publisher\Config\Validator\Format - Magento\Framework\MessageQueue\Publisher\Config\Validator\EnabledConnection - - - - - - - Magento\WebapiAsync\Code\Generator\Config\RemoteServiceReader\Publisher - Magento\Framework\MessageQueue\Publisher\Config\RemoteService\Reader - Magento\Framework\MessageQueue\Publisher\Config\Xml\Reader - Magento\Framework\MessageQueue\Publisher\Config\Env\Reader - - - - - - - Magento\Framework\MessageQueue\Topology\Config\Validator\Format - Magento\Framework\MessageQueue\Topology\Config\Validator\FieldsTypes - Magento\Framework\MessageQueue\Topology\Config\Validator\DependentFields - - - - - - - Magento\Framework\MessageQueue\Topology\Config\RemoteService\Reader - Magento\Framework\MessageQueue\Topology\Config\Xml\Reader - - - - - - - Magento\Framework\Amqp\Topology\BindingInstallerType\Queue - Magento\Framework\Amqp\Topology\BindingInstallerType\Exchange - - - - - - - magento - magento-db - - - - - - - amqp - db - - - - - - - Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DDL\Triggers\MigrateDataFromAnotherTable - - - - - - - - Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT - - - - - - - CsrfRequestValidator - - Magento\Framework\App\Request\HttpMethodValidator - - - - - - - - - \Magento\Framework\App\Action\HttpOptionsActionInterface - \Magento\Framework\App\Action\HttpGetActionInterface - \Magento\Framework\App\Action\HttpGetActionInterface - \Magento\Framework\App\Action\HttpPostActionInterface - \Magento\Framework\App\Action\HttpPutActionInterface - \Magento\Framework\App\Action\HttpPatchActionInterface - \Magento\Framework\App\Action\HttpDeleteActionInterface - \Magento\Framework\App\Action\HttpConnectActionInterface - \Magento\Framework\App\Action\HttpPropfindActionInterface - \Magento\Framework\App\Action\HttpTraceActionInterface - - - - - - - Magento\Framework\App\ScopeResolver - - - - - - Magento\Framework\Lock\Backend\Cache - 10000 - 20 - - - - - - - - - - - - - - diff --git a/app/etc/registration_globlist.php b/app/etc/registration_globlist.php deleted file mode 100755 index 23caae00cb303..0000000000000 --- a/app/etc/registration_globlist.php +++ /dev/null @@ -1,19 +0,0 @@ - - order allow,deny - deny from all - -= 2.4> - Require all denied - - diff --git a/pub/media/.htaccess b/pub/media/.htaccess deleted file mode 100755 index d68d163d7a6b5..0000000000000 --- a/pub/media/.htaccess +++ /dev/null @@ -1,134 +0,0 @@ -Options -Indexes - - -php_flag engine 0 - - - -php_flag engine 0 - - -AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi -Options -ExecCGI - - -SetHandler default-handler - - - - -############################################ -## enable rewrites - - Options +FollowSymLinks - RewriteEngine on - - ## you can put here your pub/media folder path relative to web root - #RewriteBase /magento/pub/media/ - -############################################ -## never rewrite for existing files - RewriteCond %{REQUEST_FILENAME} !-f - -############################################ -## rewrite everything else to get.php - - RewriteRule .* ../get.php [L] - - -############################################ -## setting MIME types - -# JavaScript -AddType application/javascript js jsonp -AddType application/json json - -# CSS -AddType text/css css - -# Images and icons -AddType image/x-icon ico -AddType image/gif gif -AddType image/png png -AddType image/jpeg jpg -AddType image/jpeg jpeg - -# SVG -AddType image/svg+xml svg - -# Fonts -AddType application/vnd.ms-fontobject eot -AddType application/x-font-ttf ttf -AddType application/x-font-otf otf -AddType application/x-font-woff woff -AddType application/font-woff2 woff2 - -# Flash -AddType application/x-shockwave-flash swf - -# Archives and exports -AddType application/zip gzip -AddType application/x-gzip gz gzip -AddType application/x-bzip2 bz2 -AddType text/csv csv -AddType application/xml xml - - - - - Header append Cache-Control public - - - - Header append Cache-Control no-store - - - - - - -############################################ -## Add default Expires header -## http://developer.yahoo.com/performance/rules.html#expires - - ExpiresActive On - - # Data - - ExpiresDefault "access plus 0 seconds" - - ExpiresByType text/xml "access plus 0 seconds" - ExpiresByType text/csv "access plus 0 seconds" - ExpiresByType application/json "access plus 0 seconds" - ExpiresByType application/zip "access plus 0 seconds" - ExpiresByType application/x-gzip "access plus 0 seconds" - ExpiresByType application/x-bzip2 "access plus 0 seconds" - - # CSS, JavaScript - - ExpiresDefault "access plus 1 year" - - ExpiresByType text/css "access plus 1 year" - ExpiresByType application/javascript "access plus 1 year" - - # Favicon, images, flash - - ExpiresDefault "access plus 1 year" - - ExpiresByType image/gif "access plus 1 year" - ExpiresByType image/png "access plus 1 year" - ExpiresByType image/jpg "access plus 1 year" - ExpiresByType image/jpeg "access plus 1 year" - ExpiresByType image/svg+xml "access plus 1 year" - - # Fonts - - ExpiresDefault "access plus 1 year" - - ExpiresByType application/vnd.ms-fontobject "access plus 1 year" - ExpiresByType application/x-font-ttf "access plus 1 year" - ExpiresByType application/x-font-otf "access plus 1 year" - ExpiresByType application/x-font-woff "access plus 1 year" - ExpiresByType application/font-woff2 "access plus 1 year" - - diff --git a/pub/media/customer/.htaccess b/pub/media/customer/.htaccess deleted file mode 100755 index 707c26b075e16..0000000000000 --- a/pub/media/customer/.htaccess +++ /dev/null @@ -1,8 +0,0 @@ - - order allow,deny - deny from all - -= 2.4> - Require all denied - - diff --git a/pub/media/downloadable/.htaccess b/pub/media/downloadable/.htaccess deleted file mode 100755 index 707c26b075e16..0000000000000 --- a/pub/media/downloadable/.htaccess +++ /dev/null @@ -1,8 +0,0 @@ - - order allow,deny - deny from all - -= 2.4> - Require all denied - - diff --git a/pub/media/import/.htaccess b/pub/media/import/.htaccess deleted file mode 100755 index 707c26b075e16..0000000000000 --- a/pub/media/import/.htaccess +++ /dev/null @@ -1,8 +0,0 @@ - - order allow,deny - deny from all - -= 2.4> - Require all denied - - diff --git a/pub/media/theme_customization/.htaccess b/pub/media/theme_customization/.htaccess deleted file mode 100755 index 2b93da6b4c079..0000000000000 --- a/pub/media/theme_customization/.htaccess +++ /dev/null @@ -1,10 +0,0 @@ -Options -Indexes - - - order allow,deny - deny from all - - = 2.4> - Require all denied - - diff --git a/pub/static/.htaccess b/pub/static/.htaccess deleted file mode 100755 index a5aa6fb0d5cfd..0000000000000 --- a/pub/static/.htaccess +++ /dev/null @@ -1,133 +0,0 @@ - -php_flag engine 0 - - - -php_flag engine 0 - - -# To avoid situation when web server automatically adds extension to path -Options -MultiViews - - - RewriteEngine On - - ## you can put here your pub/static folder path relative to web root - #RewriteBase /magento/pub/static/ - - # Remove signature of the static files that is used to overcome the browser cache - RewriteRule ^version.+?/(.+)$ $1 [L] - - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-l - - RewriteRule .* ../static.php?resource=$0 [L] - # Detects if moxieplayer request with uri params and redirects to uri without params - - RewriteCond %{QUERY_STRING} !^$ - RewriteRule ^(.*)$ %{REQUEST_URI}? [R=301,L] - - - -############################################ -## setting MIME types - -# JavaScript -AddType application/javascript js jsonp -AddType application/json json - -# HTML - -AddType text/html html - -# CSS -AddType text/css css - -# Images and icons -AddType image/x-icon ico -AddType image/gif gif -AddType image/png png -AddType image/jpeg jpg -AddType image/jpeg jpeg - -# SVG -AddType image/svg+xml svg - -# Fonts -AddType application/vnd.ms-fontobject eot -AddType application/x-font-ttf ttf -AddType application/x-font-otf otf -AddType application/x-font-woff woff -AddType application/font-woff2 woff2 - -# Flash -AddType application/x-shockwave-flash swf - -# Archives and exports -AddType application/zip gzip -AddType application/x-gzip gz gzip -AddType application/x-bzip2 bz2 -AddType text/csv csv -AddType application/xml xml - - - - - Header append Cache-Control public - - - - Header append Cache-Control no-store - - - - - - -############################################ -## Add default Expires header -## http://developer.yahoo.com/performance/rules.html#expires - - ExpiresActive On - - # Data - - ExpiresDefault "access plus 0 seconds" - - ExpiresByType text/xml "access plus 0 seconds" - ExpiresByType text/csv "access plus 0 seconds" - ExpiresByType application/json "access plus 0 seconds" - ExpiresByType application/zip "access plus 0 seconds" - ExpiresByType application/x-gzip "access plus 0 seconds" - ExpiresByType application/x-bzip2 "access plus 0 seconds" - - # CSS, JavaScript, html - - ExpiresDefault "access plus 1 year" - - ExpiresByType text/css "access plus 1 year" - ExpiresByType text/html "access plus 1 year" - ExpiresByType application/javascript "access plus 1 year" - ExpiresByType application/json "access plus 1 year" - - # Favicon, images, flash - - ExpiresDefault "access plus 1 year" - - ExpiresByType image/gif "access plus 1 year" - ExpiresByType image/png "access plus 1 year" - ExpiresByType image/jpg "access plus 1 year" - ExpiresByType image/jpeg "access plus 1 year" - ExpiresByType image/svg+xml "access plus 1 year" - - # Fonts - - ExpiresDefault "access plus 1 year" - - ExpiresByType application/vnd.ms-fontobject "access plus 1 year" - ExpiresByType application/x-font-ttf "access plus 1 year" - ExpiresByType application/x-font-otf "access plus 1 year" - ExpiresByType application/x-font-woff "access plus 1 year" - ExpiresByType application/font-woff2 "access plus 1 year" - - diff --git a/var/.htaccess b/var/.htaccess deleted file mode 100755 index 707c26b075e16..0000000000000 --- a/var/.htaccess +++ /dev/null @@ -1,8 +0,0 @@ - - order allow,deny - deny from all - -= 2.4> - Require all denied - - From d4bcc7f18efa9f3e9feb4d837872c2f0c9162431 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Mon, 23 Sep 2019 10:50:49 +0530 Subject: [PATCH 012/153] file permission change for account.php and create.php file --- .../Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php | 0 app/code/Magento/Sales/Model/AdminOrder/Create.php | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php mode change 100755 => 100644 app/code/Magento/Sales/Model/AdminOrder/Create.php diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php old mode 100755 new mode 100644 diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php old mode 100755 new mode 100644 From 4e4e6a296ab4176cdf1c525a0128a66137147451 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Mon, 23 Sep 2019 12:49:37 +0530 Subject: [PATCH 013/153] added required discared files --- app/etc/NonComposerComponentRegistration.php | 33 + app/etc/db_schema.xml | 17 + app/etc/di.xml | 1780 ++++++++++++++++++ app/etc/registration_globlist.php | 19 + app/etc/vendor_path.php | 5 + generated/.htaccess | 8 + pub/media/.htaccess | 134 ++ pub/media/customer/.htaccess | 8 + pub/media/downloadable/.htaccess | 8 + pub/media/import/.htaccess | 8 + pub/media/theme_customization/.htaccess | 10 + pub/static/.htaccess | 133 ++ var/.htaccess | 8 + 13 files changed, 2171 insertions(+) create mode 100644 app/etc/NonComposerComponentRegistration.php create mode 100644 app/etc/db_schema.xml create mode 100644 app/etc/di.xml create mode 100644 app/etc/registration_globlist.php create mode 100644 app/etc/vendor_path.php create mode 100644 generated/.htaccess create mode 100644 pub/media/.htaccess create mode 100644 pub/media/customer/.htaccess create mode 100644 pub/media/downloadable/.htaccess create mode 100644 pub/media/import/.htaccess create mode 100644 pub/media/theme_customization/.htaccess create mode 100644 pub/static/.htaccess create mode 100644 var/.htaccess diff --git a/app/etc/NonComposerComponentRegistration.php b/app/etc/NonComposerComponentRegistration.php new file mode 100644 index 0000000000000..a7377ebfca3af --- /dev/null +++ b/app/etc/NonComposerComponentRegistration.php @@ -0,0 +1,33 @@ + + + + + + + + + +
+
diff --git a/app/etc/di.xml b/app/etc/di.xml new file mode 100644 index 0000000000000..1a74fd9d7f840 --- /dev/null +++ b/app/etc/di.xml @@ -0,0 +1,1780 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + system/currency/installed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Magento\Framework\Acl\Builder\Proxy + + + + + Magento\Framework\Filesystem\Driver\File + + + + + Magento\Framework\Filesystem\Driver\File + + + + + + + + Magento\WebapiAsync\Code\Generator\Config\RemoteServiceReader\Communication + 0 + + + Magento\Framework\Communication\Config\Reader\XmlReader + 10 + + + Magento\Framework\Communication\Config\Reader\EnvReader + 20 + + + Magento\Framework\MessageQueue\Code\Generator\Config\RemoteServiceReader\Communication + 5 + + + + + + + main + + Magento\Framework\Logger\Handler\System + Magento\Framework\Logger\Handler\Debug + Magento\Framework\Logger\Handler\Syslog + + + + + + Magento + + + + + Magento\Framework\Model\ActionValidator\RemoveAction\Proxy + + + + + + + + + Magento\Framework\Message\Session\Proxy + Magento\Framework\Message\ExceptionMessageLookupFactory + + + + + + Magento\Backend\App\Request\PathInfoProcessor\Proxy + + + + + Magento\Framework\Session\Config\ConfigInterface\Proxy + + + + + + + Magento\Framework\Session\SaveHandler\DbTable + Magento\Framework\Session\SaveHandler\Redis + + + + + + + Magento\Framework\App\Feed + + + + + + Cm\RedisSession\Handler\ConfigInterface + Cm\RedisSession\Handler\LoggerInterface + + + + + global + + + + + Magento\Framework\App\State::PARAM_MODE + + + + + Magento\Framework\App\State::PARAM_MODE + + + + + Magento\Framework\App\State::PARAM_MODE + + + + + Magento\Framework\App\State::PARAM_MODE + + + + + Magento\Framework\App\Cache\Frontend\Factory::PARAM_CACHE_FORCED_OPTIONS + + + Magento\Framework\Cache\Frontend\Decorator\TagScope + + MAGE + + + + Magento\Framework\Cache\Frontend\Decorator\Logger + + + Magento\Framework\App\ResourceConnection\Proxy + + + + + Magento\Backend\Setup\ConfigOptionsList::CONFIG_PATH_BACKEND_FRONTNAME + + + + + Magento\Framework\App\Cache\State::PARAM_BAN_CACHE + + + + + Magento\Store\Model\StoreManager::PARAM_RUN_CODE + Magento\Store\Model\StoreManager::PARAM_RUN_TYPE + + + + + Magento\Framework\App\Cache\Type\Translate + Magento\Framework\Locale\Resolver\Proxy + Magento\Framework\Translate\ResourceInterface\Proxy + Magento\Framework\App\Request\Http\Proxy + + + + + Magento\Framework\Translate\InlineInterface\Proxy + + + + + + + Magento\Store\Model\StoreManagerInterface\Proxy + + + + + + Magento\Framework\App\Cache\Type\Config + Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy + + + + + Magento\Framework\App\Cache\Type\Config + + + + + config_cache + Magento\Framework\Cache\Config\Reader\Proxy + + + + + Magento\Framework\App\Cache\Type\Config + Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy + interception + + + + + Magento\Framework\App\Cache\Type\Config + + + + + Magento\Framework\App\Cache\Type\Config + Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy + plugin-list + + global + + + + + + Magento\Framework\App\ResourceConnection\ConnectionFactory + + + + + Magento\Framework\App\ResourceConnection\Config\Reader\Proxy + Magento\Framework\App\Cache\Type\Config\Proxy + + + + + Magento\Framework\App\Config\FileResolver\Proxy + + + + + primary + Magento\Framework\App\AreaList\Proxy + + + + + Magento\Framework\Session\Generic\Proxy + Magento\Store\Model\ScopeInterface::SCOPE_STORE + + + + + + Magento\Framework\View\Layout\Argument\Interpreter\Options + layoutArrayArgumentReaderInterpreterProxy + Magento\Framework\Data\Argument\Interpreter\Boolean + Magento\Framework\Data\Argument\Interpreter\Number + Magento\Framework\Data\Argument\Interpreter\StringUtils + Magento\Framework\Data\Argument\Interpreter\NullType + Magento\Framework\View\Layout\Argument\Interpreter\Passthrough + Magento\Framework\View\Layout\Argument\Interpreter\Passthrough + Magento\Framework\View\Layout\Argument\Interpreter\Passthrough + + Magento\Framework\View\Model\Layout\Merge::TYPE_ATTRIBUTE + + + + + + Magento\Framework\View\Layout\Argument\Interpreter\Options + layoutArrayArgumentGeneratorInterpreterProxy + Magento\Framework\Data\Argument\Interpreter\Boolean + Magento\Framework\Data\Argument\Interpreter\Number + Magento\Framework\Data\Argument\Interpreter\StringUtils + Magento\Framework\Data\Argument\Interpreter\NullType + layoutObjectArgumentInterpreter + Magento\Framework\View\Layout\Argument\Interpreter\Url + Magento\Framework\View\Layout\Argument\Interpreter\HelperMethod + + Magento\Framework\View\Model\Layout\Merge::TYPE_ATTRIBUTE + + + + + layoutArgumentGeneratorInterpreterInternal + + + + + layoutArgumentReaderInterpreter + + + + + layoutArgumentGeneratorInterpreterInternal + + + + + + layoutArrayArgumentReaderInterpreter + + + + + layoutArrayArgumentGeneratorInterpreter + + + + + Magento\Framework\View\Element\Block\ArgumentInterface + + + + + Magento\Framework\Data\Argument\Interpreter\StringUtils + + + + + + Magento\Framework\View\Layout\Reader\Container + Magento\Framework\View\Layout\Reader\Block + Magento\Framework\View\Layout\Reader\UiComponent + + + + + + containerRenderPool + + + + + + Magento\Framework\View\Layout\Reader\Container + Magento\Framework\View\Layout\Reader\Block + Magento\Framework\View\Layout\Reader\Move + Magento\Framework\View\Layout\Reader\UiComponent + + + + + + blockRenderPool + Magento\Store\Model\ScopeInterface::SCOPE_STORE + layoutArgumentReaderInterpreter + + + + + blockRenderPool + + + + + Magento\Store\Model\ScopeInterface::SCOPE_STORE + + + + + + Magento\Framework\View\Layout\Reader\Container + Magento\Framework\View\Layout\Reader\Block + Magento\Framework\View\Layout\Reader\Move + Magento\Framework\View\Layout\Reader\UiComponent + + + + + + bodyRenderPool + + + + + + Magento\Framework\View\Page\Config\Reader\Html + Magento\Framework\View\Page\Config\Reader\Head + Magento\Framework\View\Page\Config\Reader\Body + Magento\Framework\View\Layout\Reader\Container + Magento\Framework\View\Layout\Reader\Block + Magento\Framework\View\Layout\Reader\Move + Magento\Framework\View\Layout\Reader\UiComponent + + + + + + commonRenderPool + Magento\Framework\App\Cache\Type\Layout + + + + + + Magento\Framework\View\Layout\Reader\Container + Magento\Framework\View\Layout\Reader\Block + Magento\Framework\View\Layout\Reader\Move + Magento\Framework\View\Layout\Reader\UiComponent + + + + + + genericLayoutRenderPool + + + + + + Magento\Framework\View\Page\Config\Reader\Html + Magento\Framework\View\Page\Config\Reader\Head + Magento\Framework\View\Page\Config\Reader\Body + + + + + + + Magento\Framework\View\Page\Config\Generator\Head + Magento\Framework\View\Page\Config\Generator\Body + Magento\Framework\View\Layout\Generator\Block + Magento\Framework\View\Layout\Generator\Container + Magento\Framework\View\Layout\Generator\UiComponent + + + + + + + Magento\Framework\View\Page\Config\Generator\Head + Magento\Framework\View\Page\Config\Generator\Body + Magento\Framework\View\Layout\Generator\Block + Magento\Framework\View\Layout\Generator\Container + Magento\Framework\View\Layout\Generator\UiComponent + + + + + + pageConfigRenderPool + pageLayoutGeneratorPool + Magento_Theme::root.phtml + + + + + layoutArgumentGeneratorInterpreter + + + + + Magento\Indexer\Model\Mview\View\State + Magento\Framework\Mview\View\Changelog + + + + + Magento\Framework\Mview\Config\Data\Proxy + + + + + Magento\Framework\Mview\View\State\CollectionInterface + + + + + + + AlternativeSourceProcessors + + + + + + Magento\MediaStorage\Model\File\Storage\Response + developerPublisher + + + + + Magento\Framework\View\Asset\PreProcessor\MinificationFilenameResolver + alternative-source-css + Magento\Framework\View\Asset\LockerProcess + + + Magento\Framework\Css\PreProcessor\Adapter\Less\Processor + + + + + + + developerMaterialization + + + + + + Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink + Magento\Framework\App\View\Asset\MaterializationStrategy\Copy + + + + + + Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple + + + + + Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple + + + + + Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple + + + + + + viewFileFallbackResolver + + + + + + viewFileMinifiedFallbackResolver + + + + + + \Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceFactoryGenerator + \Magento\Framework\ObjectManager\Code\Generator\Factory + \Magento\Framework\ObjectManager\Code\Generator\Proxy + \Magento\Framework\Interception\Code\Generator\Interceptor + \Magento\Framework\ObjectManager\Profiler\Code\Generator\Logger + \Magento\Framework\Api\Code\Generator\Mapper + \Magento\Framework\ObjectManager\Code\Generator\Persistor + \Magento\Framework\ObjectManager\Code\Generator\Repository + \Magento\Framework\ObjectManager\Code\Generator\Converter + \Magento\Framework\Api\Code\Generator\SearchResults + \Magento\Framework\Api\Code\Generator\ExtensionAttributesInterfaceGenerator + \Magento\Framework\Api\Code\Generator\ExtensionAttributesGenerator + \Magento\Framework\MessageQueue\Code\Generator\RemoteServiceGenerator + \Magento\Framework\Async\Code\Generator\ProxyDeferredGenerator + + + + + + + + + page_cache + + + + + + + + + page_cache + + + + + + Magento\Framework\Translate\Inline\ParserInterface\Proxy + + + + + + + + Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Term + Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Range + Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Dynamic + + + + + + + Magento\Framework\Search\Dynamic\Algorithm\Auto + Magento\Framework\Search\Dynamic\Algorithm\Manual + Magento\Framework\Search\Dynamic\Algorithm\Improved + + + + + + Magento\Framework\View\Layout\File\Collector\Aggregated\Proxy + pageLayoutFileCollectorAggregated + Magento\Framework\App\Cache\Type\Layout + Magento\Framework\View\Layout\LayoutCacheKeyInterface + + + + + false + + + + + + core + index + index + + + + + + Magento\Framework\App\Cache\Type\Collection + collection_ + 86400 + + + + + Magento\Framework\Event\Config\Reader\Proxy + + + + + + layout + + + + + layoutFileSourceBase + + + + + layoutFileSourceBaseFiltered + + + + + + layout + + + + + layoutFileSourceTheme + + + + + layoutFileSourceThemeFiltered + + + + + + layout/override/base + + + + + layoutFileSourceOverrideBase + + + + + layoutFileSourceOverrideBaseFiltered + + + + + + layout/override/theme + + + + + layoutFileSourceOverrideTheme + + + + + layoutFileSourceOverrideThemeFiltered + + + + + layoutFileSourceBaseSorted + layoutFileSourceThemeSorted + layoutFileSourceOverrideBaseSorted + layoutFileSourceOverrideThemeSorted + + + + + page_layout + + + + + pageLayoutFileSourceBase + + + + + pageLayoutFileSourceBaseFiltered + + + + + page_layout + + + + + pageLayoutFileSourceTheme + + + + + pageLayoutFileSourceThemeFiltered + + + + + + page_layout/override/base + + + + + pageLayoutFileSourceOverrideBase + + + + + pageLayoutFileSourceOverrideBaseFiltered + + + + + + page_layout/override/theme + + + + + pageLayoutFileSourceOverrideTheme + + + + + pageLayoutFileSourceOverrideThemeFiltered + + + + + + pageLayoutFileSourceBaseSorted + pageLayoutFileSourceThemeSorted + pageLayoutFileSourceOverrideBaseSorted + pageLayoutFileSourceOverrideThemeSorted + + + + + + + pageFileSourceBase + + + + + pageFileSourceBaseFiltered + + + + + + + pageFileSourceTheme + + + + + pageFileSourceThemeFiltered + + + + + + page/override + + + + + pageFileSourceOverrideBase + + + + + pageFileSourceOverrideBaseFiltered + + + + + + override/theme + + + + + pageFileSourceOverrideTheme + + + + + pageFileSourceOverrideThemeFiltered + + + + + + Magento\Framework\View\Layout\Reader\Container + Magento\Framework\View\Layout\Reader\Move + + + + + + pageLayoutFileCollectorAggregated + pageLayoutRenderPool + + + + + pageFileSourceBaseSorted + pageFileSourceThemeSorted + pageFileSourceOverrideBaseSorted + pageFileSourceOverrideThemeSorted + + + + + Magento\Framework\View\Design\Theme\Image\Uploader\Proxy + + + + + Magento\Framework\App\Config\Initial\Reader\Proxy + + + + + Magento\Framework\App\Config\Initial\Converter + + + + + Magento\Framework\App\Route\Config\Reader\Proxy + + + + + Magento\Store\Model\ScopeInterface::SCOPE_STORE + + Shockwave Flash + + + + + + + Magento\Framework\DataObject\Copy\Config\Data\Proxy + + + + + fieldset.xml + Magento\Framework\DataObject\Copy\Config\SchemaLocator + + + + + urn:magento:framework:DataObject/etc/fieldset.xsd + urn:magento:framework:DataObject/etc/fieldset_file.xsd + + + + + Magento\Framework\DataObject\Copy\Config\Reader\Proxy + fieldset_config + + + + + Magento\Framework\Image\Adapter\Gd2 + + + + + page_types.xml + Magento\Framework\View\Layout\PageType\Config\Converter + Magento\Framework\View\Layout\PageType\Config\SchemaLocator + frontend + + + + + Magento\Framework\View\Layout\PageType\Config\Reader + page_types_config + + + + + Magento\Framework\View\Layout\PageType\Config\Data + + + + + message + + + + + Magento\Framework\Message\Session\Storage + + + + + frontend + + + + + + Magento\Framework\Filesystem\Driver\File + + + + + + [a-z]+[_a-z\d]*?\/[a-z]+[_a-z\d]*?)::.*?$/sui]]> + [a-z]+[_a-z\d]*?\/[a-z]+[_a-z\d]*?)\".*?}}/sui]]> + [a-z]+[_a-z\d]*?\/[a-z]+[_a-z\d]*?)\".*?>/sui]]> + s:\d+:"(?P[a-z]+[_a-z\d]*?/[a-z]+[_a-z\d]*?)")#sui]]> + + + + + + + + application/json + Magento\Framework\Webapi\Rest\Request\Deserializer\Json + + + application/xml + Magento\Framework\Webapi\Rest\Request\Deserializer\Xml + + + application/xhtml+xml + Magento\Framework\Webapi\Rest\Request\Deserializer\Xml + + + text/xml + Magento\Framework\Webapi\Rest\Request\Deserializer\Xml + + + + + + + Magento\Framework\App\Cache\Type\Config + + + + + + Magento\Framework\Reflection\ExtensionAttributesProcessor\Proxy + Magento\Framework\Reflection\CustomAttributesProcessor\Proxy + + + + + Magento\Framework\UrlInterface + + + + + + + view.xml + Magento\Framework\Config\Converter + Magento\Framework\Config\SchemaLocator + Magento\Framework\Config\FileResolver + + + + + Magento\Framework\DB\Select\RendererProxy + + + + + Magento\Framework\Locale\ResolverInterface + + + + + + + Magento\Framework\DB\Select\DistinctRenderer + 100 + distinct + + + Magento\Framework\DB\Select\ColumnsRenderer + 200 + columns + + + Magento\Framework\DB\Select\UnionRenderer + 300 + union + + + Magento\Framework\DB\Select\FromRenderer + 400 + from + + + Magento\Framework\DB\Select\WhereRenderer + 500 + where + + + Magento\Framework\DB\Select\GroupRenderer + 600 + group + + + Magento\Framework\DB\Select\HavingRenderer + 700 + having + + + Magento\Framework\DB\Select\OrderRenderer + 800 + order + + + Magento\Framework\DB\Select\LimitRenderer + 900 + limitcount + + + Magento\Framework\DB\Select\ForUpdateRenderer + 1000 + forupdate + + + + + + + + + Magento\Framework\EntityManager\Operation\CheckIfExists + Magento\Framework\EntityManager\Operation\Read + Magento\Framework\EntityManager\Operation\Create + Magento\Framework\EntityManager\Operation\Update + Magento\Framework\EntityManager\Operation\Delete + + + + + + + + Magento\Framework\App\Cache\Type\Block::TYPE_IDENTIFIER + Magento\Framework\App\Cache\Type\Collection::TYPE_IDENTIFIER + + + + + + + Magento\Framework\EntityManager\Mapper + + + + + + + + Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor + Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor + Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor + + + + + + + Magento\Framework\DB\Select\InQueryModifier + Magento\Framework\DB\Select\LikeQueryModifier + Magento\Framework\DB\Select\CompositeQueryModifier + + + + + + + HASH + BTREE + + + INNODB + MEMORY + MYISAM + + + + + + Magento\Framework\DB\FieldDataConverter::BATCH_SIZE_VARIABLE_NAME + + + + + + + true + + + + + + + Magento\Framework\View\Asset\PreProcessor\Passthrough + + + + + Magento\Framework\App\Filesystem\DirectoryList::STATIC_VIEW + deployed_version.txt + + + + + Magento\Directory\Helper\Data::XML_PATH_DEFAULT_LOCALE + Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT + + + + + + Magento\Framework\View\Element\Message\Renderer\EscapeRenderer + Magento\Framework\View\Element\Message\Renderer\BlockRenderer + + + + + + + + \Magento\Framework\View\Element\Message\Renderer\EscapeRenderer::CODE + + + + + + + Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_LOGGER_OUTPUT + Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_LOGGER_LOG_EVERYTHING + Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_LOGGER_QUERY_TIME_THRESHOLD + Magento\Framework\Config\ConfigOptionsListConstants::CONFIG_PATH_DB_LOGGER_INCLUDE_STACKTRACE + + + + + Magento\Config\App\Config\Source\EnvironmentConfigSource + + + + + Magento\Framework\Message\ExceptionMessageFactory + + + + + + updated_at + + + + + + + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Table + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Real + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Real + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Real + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Integer + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Integer + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Integer + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Integer + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Date + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Timestamp + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Timestamp + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\LongText + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\MediumText + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Text + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\StringBinary + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\StringBinary + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Blob + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\MediumBlob + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\LongBlob + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Boolean + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Unique + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Primary + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Foreign + \Magento\Framework\Setup\Declaration\Schema\Dto\Factories\Index + + + + + + + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Boolean + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Integer + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Integer + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Integer + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Integer + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Real + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Real + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Real + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Blob + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Timestamp + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Date + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\Timestamp + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\StringBinary + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\StringBinary + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\StringBinary + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Columns\StringBinary + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Index + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Constraints\Internal + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Constraints\Internal + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Constraints\Internal + \Magento\Framework\Setup\Declaration\Schema\Db\MySQL\Definition\Constraints\ForeignKey + + + + + + + Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DDL\Triggers\MigrateDataFrom + + + + + + + Magento\Framework\Setup\Declaration\Schema\FileSystem\XmlReader + + + + + + urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd + + + + + Magento\Framework\Config\FileResolverByModule + Magento\Framework\Setup\Declaration\Schema\Config\Converter + Magento\Framework\Setup\Declaration\Schema\Config\SchemaLocator + db_schema.xml + + name + name + referenceId + referenceId + name + name + + + + + + + Magento\Framework\Setup\Declaration\Schema\Operations\ReCreateTable + Magento\Framework\Setup\Declaration\Schema\Operations\CreateTable + Magento\Framework\Setup\Declaration\Schema\Operations\DropTable + Magento\Framework\Setup\Declaration\Schema\Operations\DropReference + Magento\Framework\Setup\Declaration\Schema\Operations\ModifyColumn + Magento\Framework\Setup\Declaration\Schema\Operations\AddColumn + Magento\Framework\Setup\Declaration\Schema\Operations\DropElement + Magento\Framework\Setup\Declaration\Schema\Operations\AddComplexElement + Magento\Framework\Setup\Declaration\Schema\Operations\ModifyTable + + + Magento\Framework\Setup\Declaration\Schema\DataSavior\TableSavior + Magento\Framework\Setup\Declaration\Schema\DataSavior\ColumnSavior + + + + + + + default + + + + + + + Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\CheckReferenceColumnHasIndex + Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\RealTypes + Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\PrimaryKeyCanBeCreated + Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\IncosistentReferenceDefinition + Magento\Framework\Setup\Declaration\Schema\Declaration\ValidationRules\AutoIncrementColumnValidation + + + + + + + Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition + Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition + Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition + Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition + Magento\Framework\Setup\SchemaListenerDefinition\IntegerDefinition + Magento\Framework\Setup\SchemaListenerDefinition\RealDefinition + Magento\Framework\Setup\SchemaListenerDefinition\RealDefinition + Magento\Framework\Setup\SchemaListenerDefinition\RealDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TextBlobDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TimestampDefinition + Magento\Framework\Setup\SchemaListenerDefinition\TimestampDefinition + Magento\Framework\Setup\SchemaListenerDefinition\DateDefinition + Magento\Framework\Setup\SchemaListenerDefinition\BooleanDefinition + + + + + + schema + + + + + data + + + + + \Magento\Framework\Setup\Patch\DataPatchReader + \Magento\Framework\Setup\Patch\SchemaPatchReader + + + + + \Magento\Framework\Setup\Patch\DataPatchReader + + + + + \Magento\Framework\Setup\Patch\SchemaPatchReader + + + + + + + Magento\Framework\MessageQueue\Config\Reader\Xml + 10 + + + Magento\Framework\MessageQueue\Config\Reader\Env + 20 + + + + + + + + + Magento\Framework\MessageQueue\Config\Reader\Xml\Converter\TopicConfig + 20 + + + + + + + Magento\Framework\MessageQueue\Consumer\Config\CompositeReader + + + + + + Magento\Framework\MessageQueue\Consumer\Config\Xml\Reader + Magento\Framework\MessageQueue\Consumer\Config\Env\Reader + + + + + + + Magento\Framework\MessageQueue\Consumer\Config\Validator\RequiredFields + Magento\Framework\MessageQueue\Consumer\Config\Validator\FieldsTypes + Magento\Framework\MessageQueue\Consumer\Config\Validator\Handlers + Magento\Framework\MessageQueue\Consumer\Config\Validator\ConsumerInstance + + + + + + + Magento\Framework\MessageQueue\Publisher\Config\Validator\Format + Magento\Framework\MessageQueue\Publisher\Config\Validator\EnabledConnection + + + + + + + Magento\WebapiAsync\Code\Generator\Config\RemoteServiceReader\Publisher + Magento\Framework\MessageQueue\Publisher\Config\RemoteService\Reader + Magento\Framework\MessageQueue\Publisher\Config\Xml\Reader + Magento\Framework\MessageQueue\Publisher\Config\Env\Reader + + + + + + + Magento\Framework\MessageQueue\Topology\Config\Validator\Format + Magento\Framework\MessageQueue\Topology\Config\Validator\FieldsTypes + Magento\Framework\MessageQueue\Topology\Config\Validator\DependentFields + + + + + + + Magento\Framework\MessageQueue\Topology\Config\RemoteService\Reader + Magento\Framework\MessageQueue\Topology\Config\Xml\Reader + + + + + + + Magento\Framework\Amqp\Topology\BindingInstallerType\Queue + Magento\Framework\Amqp\Topology\BindingInstallerType\Exchange + + + + + + + magento + magento-db + + + + + + + amqp + db + + + + + + + Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DDL\Triggers\MigrateDataFromAnotherTable + + + + + + + + Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT + + + + + + + CsrfRequestValidator + + Magento\Framework\App\Request\HttpMethodValidator + + + + + + + + + \Magento\Framework\App\Action\HttpOptionsActionInterface + \Magento\Framework\App\Action\HttpGetActionInterface + \Magento\Framework\App\Action\HttpGetActionInterface + \Magento\Framework\App\Action\HttpPostActionInterface + \Magento\Framework\App\Action\HttpPutActionInterface + \Magento\Framework\App\Action\HttpPatchActionInterface + \Magento\Framework\App\Action\HttpDeleteActionInterface + \Magento\Framework\App\Action\HttpConnectActionInterface + \Magento\Framework\App\Action\HttpPropfindActionInterface + \Magento\Framework\App\Action\HttpTraceActionInterface + + + + + + + Magento\Framework\App\ScopeResolver + + + + + + Magento\Framework\Lock\Backend\Cache + 10000 + 20 + + + + + + + + + + + diff --git a/app/etc/registration_globlist.php b/app/etc/registration_globlist.php new file mode 100644 index 0000000000000..23caae00cb303 --- /dev/null +++ b/app/etc/registration_globlist.php @@ -0,0 +1,19 @@ + + order allow,deny + deny from all + += 2.4> + Require all denied + + diff --git a/pub/media/.htaccess b/pub/media/.htaccess new file mode 100644 index 0000000000000..d68d163d7a6b5 --- /dev/null +++ b/pub/media/.htaccess @@ -0,0 +1,134 @@ +Options -Indexes + + +php_flag engine 0 + + + +php_flag engine 0 + + +AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi +Options -ExecCGI + + +SetHandler default-handler + + + + +############################################ +## enable rewrites + + Options +FollowSymLinks + RewriteEngine on + + ## you can put here your pub/media folder path relative to web root + #RewriteBase /magento/pub/media/ + +############################################ +## never rewrite for existing files + RewriteCond %{REQUEST_FILENAME} !-f + +############################################ +## rewrite everything else to get.php + + RewriteRule .* ../get.php [L] + + +############################################ +## setting MIME types + +# JavaScript +AddType application/javascript js jsonp +AddType application/json json + +# CSS +AddType text/css css + +# Images and icons +AddType image/x-icon ico +AddType image/gif gif +AddType image/png png +AddType image/jpeg jpg +AddType image/jpeg jpeg + +# SVG +AddType image/svg+xml svg + +# Fonts +AddType application/vnd.ms-fontobject eot +AddType application/x-font-ttf ttf +AddType application/x-font-otf otf +AddType application/x-font-woff woff +AddType application/font-woff2 woff2 + +# Flash +AddType application/x-shockwave-flash swf + +# Archives and exports +AddType application/zip gzip +AddType application/x-gzip gz gzip +AddType application/x-bzip2 bz2 +AddType text/csv csv +AddType application/xml xml + + + + + Header append Cache-Control public + + + + Header append Cache-Control no-store + + + + + + +############################################ +## Add default Expires header +## http://developer.yahoo.com/performance/rules.html#expires + + ExpiresActive On + + # Data + + ExpiresDefault "access plus 0 seconds" + + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/csv "access plus 0 seconds" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/zip "access plus 0 seconds" + ExpiresByType application/x-gzip "access plus 0 seconds" + ExpiresByType application/x-bzip2 "access plus 0 seconds" + + # CSS, JavaScript + + ExpiresDefault "access plus 1 year" + + ExpiresByType text/css "access plus 1 year" + ExpiresByType application/javascript "access plus 1 year" + + # Favicon, images, flash + + ExpiresDefault "access plus 1 year" + + ExpiresByType image/gif "access plus 1 year" + ExpiresByType image/png "access plus 1 year" + ExpiresByType image/jpg "access plus 1 year" + ExpiresByType image/jpeg "access plus 1 year" + ExpiresByType image/svg+xml "access plus 1 year" + + # Fonts + + ExpiresDefault "access plus 1 year" + + ExpiresByType application/vnd.ms-fontobject "access plus 1 year" + ExpiresByType application/x-font-ttf "access plus 1 year" + ExpiresByType application/x-font-otf "access plus 1 year" + ExpiresByType application/x-font-woff "access plus 1 year" + ExpiresByType application/font-woff2 "access plus 1 year" + + diff --git a/pub/media/customer/.htaccess b/pub/media/customer/.htaccess new file mode 100644 index 0000000000000..707c26b075e16 --- /dev/null +++ b/pub/media/customer/.htaccess @@ -0,0 +1,8 @@ + + order allow,deny + deny from all + += 2.4> + Require all denied + + diff --git a/pub/media/downloadable/.htaccess b/pub/media/downloadable/.htaccess new file mode 100644 index 0000000000000..707c26b075e16 --- /dev/null +++ b/pub/media/downloadable/.htaccess @@ -0,0 +1,8 @@ + + order allow,deny + deny from all + += 2.4> + Require all denied + + diff --git a/pub/media/import/.htaccess b/pub/media/import/.htaccess new file mode 100644 index 0000000000000..707c26b075e16 --- /dev/null +++ b/pub/media/import/.htaccess @@ -0,0 +1,8 @@ + + order allow,deny + deny from all + += 2.4> + Require all denied + + diff --git a/pub/media/theme_customization/.htaccess b/pub/media/theme_customization/.htaccess new file mode 100644 index 0000000000000..2b93da6b4c079 --- /dev/null +++ b/pub/media/theme_customization/.htaccess @@ -0,0 +1,10 @@ +Options -Indexes + + + order allow,deny + deny from all + + = 2.4> + Require all denied + + diff --git a/pub/static/.htaccess b/pub/static/.htaccess new file mode 100644 index 0000000000000..a5aa6fb0d5cfd --- /dev/null +++ b/pub/static/.htaccess @@ -0,0 +1,133 @@ + +php_flag engine 0 + + + +php_flag engine 0 + + +# To avoid situation when web server automatically adds extension to path +Options -MultiViews + + + RewriteEngine On + + ## you can put here your pub/static folder path relative to web root + #RewriteBase /magento/pub/static/ + + # Remove signature of the static files that is used to overcome the browser cache + RewriteRule ^version.+?/(.+)$ $1 [L] + + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-l + + RewriteRule .* ../static.php?resource=$0 [L] + # Detects if moxieplayer request with uri params and redirects to uri without params + + RewriteCond %{QUERY_STRING} !^$ + RewriteRule ^(.*)$ %{REQUEST_URI}? [R=301,L] + + + +############################################ +## setting MIME types + +# JavaScript +AddType application/javascript js jsonp +AddType application/json json + +# HTML + +AddType text/html html + +# CSS +AddType text/css css + +# Images and icons +AddType image/x-icon ico +AddType image/gif gif +AddType image/png png +AddType image/jpeg jpg +AddType image/jpeg jpeg + +# SVG +AddType image/svg+xml svg + +# Fonts +AddType application/vnd.ms-fontobject eot +AddType application/x-font-ttf ttf +AddType application/x-font-otf otf +AddType application/x-font-woff woff +AddType application/font-woff2 woff2 + +# Flash +AddType application/x-shockwave-flash swf + +# Archives and exports +AddType application/zip gzip +AddType application/x-gzip gz gzip +AddType application/x-bzip2 bz2 +AddType text/csv csv +AddType application/xml xml + + + + + Header append Cache-Control public + + + + Header append Cache-Control no-store + + + + + + +############################################ +## Add default Expires header +## http://developer.yahoo.com/performance/rules.html#expires + + ExpiresActive On + + # Data + + ExpiresDefault "access plus 0 seconds" + + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/csv "access plus 0 seconds" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/zip "access plus 0 seconds" + ExpiresByType application/x-gzip "access plus 0 seconds" + ExpiresByType application/x-bzip2 "access plus 0 seconds" + + # CSS, JavaScript, html + + ExpiresDefault "access plus 1 year" + + ExpiresByType text/css "access plus 1 year" + ExpiresByType text/html "access plus 1 year" + ExpiresByType application/javascript "access plus 1 year" + ExpiresByType application/json "access plus 1 year" + + # Favicon, images, flash + + ExpiresDefault "access plus 1 year" + + ExpiresByType image/gif "access plus 1 year" + ExpiresByType image/png "access plus 1 year" + ExpiresByType image/jpg "access plus 1 year" + ExpiresByType image/jpeg "access plus 1 year" + ExpiresByType image/svg+xml "access plus 1 year" + + # Fonts + + ExpiresDefault "access plus 1 year" + + ExpiresByType application/vnd.ms-fontobject "access plus 1 year" + ExpiresByType application/x-font-ttf "access plus 1 year" + ExpiresByType application/x-font-otf "access plus 1 year" + ExpiresByType application/x-font-woff "access plus 1 year" + ExpiresByType application/font-woff2 "access plus 1 year" + + diff --git a/var/.htaccess b/var/.htaccess new file mode 100644 index 0000000000000..707c26b075e16 --- /dev/null +++ b/var/.htaccess @@ -0,0 +1,8 @@ + + order allow,deny + deny from all + += 2.4> + Require all denied + + From 7da3d539b7402f5561be8fd679d61a5334ec0067 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Wed, 25 Sep 2019 14:20:32 +0530 Subject: [PATCH 014/153] corrected di.xml and Account.php files --- .../Block/Adminhtml/Order/Create/Form/Account.php | 14 ++++++-------- app/etc/di.xml | 4 ++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index fc48e351b0e7e..aa5bd3702c6d1 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -165,16 +165,14 @@ public function getFormValues() { try { $customer = $this->customerRepository->getById($this->getCustomerId()); - } catch (\Exception $e) { - /** If customer does not exist do nothing. */ - } - $data = isset($customer) - ? $this->_extensibleDataObjectConverter->toFlatArray( + $data = $this->_extensibleDataObjectConverter->toFlatArray( $customer, [], - \Magento\Customer\Api\Data\CustomerInterface::class - ) - : []; + CustomerInterface::class + ); + } catch (\Exception $e) { + $data = []; + } foreach ($this->getQuote()->getData() as $key => $value) { if (strpos($key, 'customer_') === 0) { $data[substr($key, 9)] = $value; diff --git a/app/etc/di.xml b/app/etc/di.xml index 1a74fd9d7f840..882d1be623988 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -47,6 +47,7 @@ + system/currency/installed @@ -1777,4 +1778,7 @@ type="Magento\Framework\Mail\MimeMessage" /> + + + From 58511261b6ed15192b4014adc96e8a418df41e16 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Tue, 1 Oct 2019 16:24:42 +0530 Subject: [PATCH 015/153] Added Function and Integration --- .../Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml | 3 +++ .../Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml index 3f178ae02102a..e6e4f14854fc6 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml @@ -94,7 +94,10 @@ + + + diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml index 430211e52bfb5..f374b15ea2491 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml @@ -13,6 +13,7 @@ + From 7772d52ee9cbdd12346d8d2bc9583a4c05193884 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 4 Oct 2019 12:28:25 +0530 Subject: [PATCH 016/153] functional test changes --- .../Mftf/ActionGroup/AdminOrderActionGroup.xml | 15 ++++++--------- .../Mftf/Section/AdminOrderFormAccountSection.xml | 3 +-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml index e6e4f14854fc6..f0f50e757e38f 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml @@ -92,12 +92,9 @@ Clears the Email, First Name, Last Name, Street Line 1, City, Postal Code and Phone fields when adding an Order and then verifies that they are required after attempting to Save. - + - - - @@ -184,7 +181,7 @@ EXTENDS: addConfigurableProductToOrder. Selects the provided Option to the Configurable Product. - + @@ -198,7 +195,7 @@ - + @@ -216,7 +213,7 @@ - + @@ -238,7 +235,7 @@ - + {{price}} @@ -519,7 +516,7 @@ - + diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml index f374b15ea2491..65d86c2940bab 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml @@ -12,8 +12,7 @@ - - + From 6915dc8089a1403764e761c869a1e4130f636269 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 4 Oct 2019 16:12:42 +0530 Subject: [PATCH 017/153] Added Function and Integration email validation --- .../Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml | 1 - .../Test/Mftf/Section/AdminOrderFormBillingAddressSection.xml | 2 -- 2 files changed, 3 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml index f0f50e757e38f..3a4bb0b2a045e 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml @@ -106,7 +106,6 @@ - diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBillingAddressSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBillingAddressSection.xml index 2d1a4d5a4cbae..7fe241c3a118d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBillingAddressSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBillingAddressSection.xml @@ -27,8 +27,6 @@ - - From 65ae5b064415165f2df56435af392d4fa44d3339 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 11 Oct 2019 15:21:38 +0530 Subject: [PATCH 018/153] Integration test --- .../Adminhtml/Order/Create/Form/AccountTest.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php index b75501911be6b..4174e3108c34e 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php @@ -102,18 +102,6 @@ public function testGetFormWithCustomer() sprintf('Unexpected field "%s" in form.', $element->getId()) ); } - - self::assertContains( - '', - $content, - 'The Customer Group specified for the chosen customer should be selected.' - ); - - self::assertContains( - 'value="'.$customer->getEmail().'"', - $content, - 'The Customer Email specified for the chosen customer should be input ' - ); } /** From 93fc0eeea9618ed1008a661ff691a08b81abd91e Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 11 Oct 2019 17:58:33 +0530 Subject: [PATCH 019/153] integration test fails --- .../Adminhtml/Order/Create/Form/AccountTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php index 4174e3108c34e..b75501911be6b 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php @@ -102,6 +102,18 @@ public function testGetFormWithCustomer() sprintf('Unexpected field "%s" in form.', $element->getId()) ); } + + self::assertContains( + '', + $content, + 'The Customer Group specified for the chosen customer should be selected.' + ); + + self::assertContains( + 'value="'.$customer->getEmail().'"', + $content, + 'The Customer Email specified for the chosen customer should be input ' + ); } /** From d5997ce775ab5ae8d39ebadbce91fbc7f83c13d9 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Wed, 16 Oct 2019 16:54:18 +0530 Subject: [PATCH 020/153] version checker test failed --- .../Block/Adminhtml/Order/Create/Form/Account.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 03915c0499367..07800cc4c10a0 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -163,16 +163,14 @@ public function getFormValues() { try { $customer = $this->customerRepository->getById($this->getCustomerId()); - } catch (\Exception $e) { - /** If customer does not exist do nothing. */ - } - $data = isset($customer) - ? $this->_extensibleDataObjectConverter->toFlatArray( + $data = $this->_extensibleDataObjectConverter->toFlatArray( $customer, [], - \Magento\Customer\Api\Data\CustomerInterface::class - ) - : []; + CustomerInterface::class + ); + } catch (\Exception $e) { + $data = []; + } foreach ($this->getQuote()->getData() as $key => $value) { if (strpos($key, 'customer_') === 0) { $data[substr($key, 9)] = $value; From 781684ab90d077ae838a5b3c833e1760c408c30a Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Tue, 22 Oct 2019 17:31:26 +0530 Subject: [PATCH 021/153] Integration test changes --- .../Block/Adminhtml/Order/Create/Form/Account.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index aa5bd3702c6d1..726a8e80c793b 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -165,14 +165,17 @@ public function getFormValues() { try { $customer = $this->customerRepository->getById($this->getCustomerId()); - $data = $this->_extensibleDataObjectConverter->toFlatArray( - $customer, - [], - CustomerInterface::class - ); } catch (\Exception $e) { - $data = []; + /** If customer does not exist do nothing. */ } + $data = isset($customer) + ? $this->_extensibleDataObjectConverter->toFlatArray( + $customer, + [], + \Magento\Customer\Api\Data\CustomerInterface::class + ) + : []; + foreach ($this->getQuote()->getData() as $key => $value) { if (strpos($key, 'customer_') === 0) { $data[substr($key, 9)] = $value; From c0e73a8b3c01473060bf55c9166421ca5b69056c Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sat, 26 Oct 2019 13:32:23 +0100 Subject: [PATCH 022/153] Reduce severity of 'processing' state --- .../Indexer/Block/Backend/Grid/Column/Renderer/Status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Status.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Status.php index d8a017ef5a4b4..144d44fe42880 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Status.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Status.php @@ -27,7 +27,7 @@ public function render(\Magento\Framework\DataObject $row) $text = __('Ready'); break; case \Magento\Framework\Indexer\StateInterface::STATUS_WORKING: - $class = 'grid-severity-major'; + $class = 'grid-severity-minor'; $text = __('Processing'); break; } From e39b01284294be28e760a5ca884ae90cca7f373f Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sat, 26 Oct 2019 14:12:50 +0100 Subject: [PATCH 023/153] Add 'schedule status' column to admin indexer grid This is a copy of the 'schedule status' column available via command line. --- .../Grid/Column/Renderer/ScheduleStatus.php | 83 +++++++++++++++++++ .../layout/indexer_indexer_list_grid.xml | 9 ++ 2 files changed, 92 insertions(+) create mode 100644 app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php new file mode 100644 index 0000000000000..0a407527edb95 --- /dev/null +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php @@ -0,0 +1,83 @@ +viewModel = $viewModel; + } + + /** + * Render indexer status + * + * @param \Magento\Framework\DataObject $row + * @return string + */ + public function render(\Magento\Framework\DataObject $row) + { + try { + if (!$row->getIsScheduled()) { + return ''; + } + + try { + $view = $this->viewModel->load($row->getIndexerId()); + } catch (\InvalidArgumentException $exception) { + // No view for this index. + return ''; + } + + $state = $view->getState()->loadByView($view->getId()); + $changelog = $view->getChangelog()->setViewId($view->getId()); + $currentVersionId = $changelog->getVersion(); + $count = count($changelog->getList($state->getVersionId(), $currentVersionId)); + + if ($count > 1000) { + $class = 'grid-severity-critical'; + } elseif ($count > 100) { + $class = 'grid-severity-major'; + } elseif ($count > 10) { + $class = 'grid-severity-minor'; + } else { + $class = 'grid-severity-notice'; + } + + if ($state->getStatus() !== 'idle') { + $class = 'grid-severity-minor'; + } + + $text = new Phrase( + "%status (%count in backlog)", + [ + 'status' => $state->getStatus(), + 'count' => $count, + ] + ); + + return '' . $text . ''; + } catch (\Exception $exception) { + return '' . + htmlspecialchars( + get_class($exception) . ': ' . $exception->getMessage() + ) . ''; + } + } +} diff --git a/app/code/Magento/Indexer/view/adminhtml/layout/indexer_indexer_list_grid.xml b/app/code/Magento/Indexer/view/adminhtml/layout/indexer_indexer_list_grid.xml index f1099c4133bca..b6f9b0e53cba2 100644 --- a/app/code/Magento/Indexer/view/adminhtml/layout/indexer_indexer_list_grid.xml +++ b/app/code/Magento/Indexer/view/adminhtml/layout/indexer_indexer_list_grid.xml @@ -76,6 +76,15 @@ indexer-status + + + Schedule Status + schedule_status + Magento\Indexer\Block\Backend\Grid\Column\Renderer\ScheduleStatus + 0 + indexer-schedule-status + + Updated From 1a1cba61332f3d51ff2840a766f1aecf29ce88a9 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 28 Oct 2019 16:25:23 +0000 Subject: [PATCH 024/153] Add comment with parameter annotations --- .../Block/Backend/Grid/Column/Renderer/ScheduleStatus.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php index 0a407527edb95..fb2679c8f4c24 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php @@ -16,6 +16,11 @@ class ScheduleStatus extends AbstractRenderer */ protected $viewModel; + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Framework\Mview\ViewInterface $viewModel + * @param array $data + */ public function __construct( \Magento\Backend\Block\Context $context, View $viewModel, From 7200593bb5fcebfe1d5fa8be91649c1c7e23698c Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 28 Oct 2019 16:28:15 +0000 Subject: [PATCH 025/153] Use Magento\Framework\Escaper not htmlspecialchars --- .../Backend/Grid/Column/Renderer/ScheduleStatus.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php index fb2679c8f4c24..1aff83cdf4bbf 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php @@ -6,11 +6,17 @@ namespace Magento\Indexer\Block\Backend\Grid\Column\Renderer; use Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer; +use Magento\Framework\Escaper; use Magento\Framework\Mview\View; use Magento\Framework\Phrase; class ScheduleStatus extends AbstractRenderer { + /** + * @var \Magento\Framework\Escaper + */ + protected $escaper; + /** * @var \Magento\Framework\Mview\ViewInterface */ @@ -19,14 +25,17 @@ class ScheduleStatus extends AbstractRenderer /** * @param \Magento\Backend\Block\Context $context * @param \Magento\Framework\Mview\ViewInterface $viewModel + * @param \Magento\Framework\Escaper $escaper * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, + Escaper $escaper, View $viewModel, array $data = [] ) { parent::__construct($context, $data); + $this->escaper = $escaper; $this->viewModel = $viewModel; } @@ -80,7 +89,7 @@ public function render(\Magento\Framework\DataObject $row) return '' . $text . ''; } catch (\Exception $exception) { return '' . - htmlspecialchars( + $this->escaper->escapeHtml( get_class($exception) . ': ' . $exception->getMessage() ) . ''; } From b74b7a4984e9623adc92499ab530ab4103ded607 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 28 Oct 2019 16:30:13 +0000 Subject: [PATCH 026/153] Update unit test to match class change --- .../Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php index 705a9e3998ae8..7249f764a66a1 100644 --- a/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php +++ b/app/code/Magento/Indexer/Test/Unit/Block/Backend/Grid/Column/Renderer/StatusTest.php @@ -49,7 +49,7 @@ public function renderDataProvider() ], 'set3' => [ [\Magento\Framework\Indexer\StateInterface::STATUS_WORKING], - ['class' => 'grid-severity-major', 'text' => 'Processing'] + ['class' => 'grid-severity-minor', 'text' => 'Processing'] ] ]; } From c1f8adb53a2a33339f61852bb6e1e5d505f082c9 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Wed, 30 Oct 2019 16:51:05 +0000 Subject: [PATCH 027/153] Correct parameter order in comment --- .../Block/Backend/Grid/Column/Renderer/ScheduleStatus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php index 1aff83cdf4bbf..712b17b91a0d7 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php @@ -24,8 +24,8 @@ class ScheduleStatus extends AbstractRenderer /** * @param \Magento\Backend\Block\Context $context - * @param \Magento\Framework\Mview\ViewInterface $viewModel * @param \Magento\Framework\Escaper $escaper + * @param \Magento\Framework\Mview\ViewInterface $viewModel * @param array $data */ public function __construct( From fbe87ab80084aa4f1803377c6c69c1fdb0779467 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 1 Nov 2019 12:13:46 +0530 Subject: [PATCH 028/153] static test failed exception fix --- .../Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 726a8e80c793b..01d7625b9e63c 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -166,7 +166,7 @@ public function getFormValues() try { $customer = $this->customerRepository->getById($this->getCustomerId()); } catch (\Exception $e) { - /** If customer does not exist do nothing. */ + $data = []; } $data = isset($customer) ? $this->_extensibleDataObjectConverter->toFlatArray( From 93d698a4de0ba46094043cf895d87d271d67178e Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 1 Nov 2019 12:51:31 +0530 Subject: [PATCH 029/153] static test failed exception space fix --- .../Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 01d7625b9e63c..bffc51a11c5cb 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -166,7 +166,7 @@ public function getFormValues() try { $customer = $this->customerRepository->getById($this->getCustomerId()); } catch (\Exception $e) { - $data = []; + $data = []; } $data = isset($customer) ? $this->_extensibleDataObjectConverter->toFlatArray( From f4692b2274d986489c8c096096957c28de65040a Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 1 Nov 2019 15:22:14 +0530 Subject: [PATCH 030/153] Semantic Version Checker --- app/code/Magento/Sales/composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json index 8d4ef50a2ebc5..3b20f6e43e721 100644 --- a/app/code/Magento/Sales/composer.json +++ b/app/code/Magento/Sales/composer.json @@ -47,5 +47,6 @@ "psr-4": { "Magento\\Sales\\": "" } - } + }, + "version": "102.0.4" } From 3e8369ece31b9241c7b1ad6c3bf47f48ac7e5cfc Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Fri, 1 Nov 2019 16:29:30 +0530 Subject: [PATCH 031/153] revert for composer json change --- app/code/Magento/Sales/composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json index 3b20f6e43e721..8d4ef50a2ebc5 100644 --- a/app/code/Magento/Sales/composer.json +++ b/app/code/Magento/Sales/composer.json @@ -47,6 +47,5 @@ "psr-4": { "Magento\\Sales\\": "" } - }, - "version": "102.0.4" + } } From 6fe2ab2dbf043fad74c218cbd2a4d699843f573f Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Sat, 9 Nov 2019 11:59:42 +0530 Subject: [PATCH 032/153] git merge with 2.3-develop fix --- .../Sales/Block/Adminhtml/Order/Create/Form/Account.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 3b4fbac981f2e..6a62ba7fbf0fd 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -38,9 +38,7 @@ class Account extends AbstractForm * @var \Magento\Framework\Api\ExtensibleDataObjectConverter */ protected $_extensibleDataObjectConverter; - private const XML_PATH_EMAIL_REQUIRED_CREATE_ORDER = 'customer/create_account/email_required_create_order'; - /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Model\Session\Quote $sessionQuote @@ -168,20 +166,19 @@ public function getFormValues() } catch (\Exception $e) { $data = []; } - - $data = isset($customer) + $data = isset($customer) ? $this->_extensibleDataObjectConverter->toFlatArray( $customer, [], \Magento\Customer\Api\Data\CustomerInterface::class ) : []; - - foreach ($this->getQuote()->getData() as $key => $value) { + foreach ($this->getQuote()->getData() as $key => $value) { if (strpos($key, 'customer_') === 0) { $data[substr($key, 9)] = $value; } } + if ($this->getQuote()->getCustomerEmail()) { $data['email'] = $this->getQuote()->getCustomerEmail(); } From 74cfd180853f41d9b6634267c82b7e51cc99ff56 Mon Sep 17 00:00:00 2001 From: solwininfotech Date: Wed, 20 Nov 2019 15:09:51 +0530 Subject: [PATCH 033/153] merge with 2.3 --- app/code/Magento/Sales/Model/AdminOrder/Create.php | 9 +++++---- app/code/Magento/Sales/etc/config.xml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php index bc4c7a1ab47cf..d1b3e67815098 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -2038,11 +2038,11 @@ protected function _validate() protected function _getNewCustomerEmail() { $email = $this->getData('account/email'); - + if ($email || $this->isEmailRequired()) { return $email; } - + return $this->generateEmail(); } @@ -2055,7 +2055,8 @@ private function isEmailRequired(): bool { return (bool)$this->_scopeConfig->getValue( self::XML_PATH_EMAIL_REQUIRED_CREATE_ORDER, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + $this->_session->getStore()->getId() ); } @@ -2075,7 +2076,7 @@ private function generateEmail(): string $account = $this->getData('account'); $account['email'] = $email; $this->setData('account', $account); - + return $email; } diff --git a/app/code/Magento/Sales/etc/config.xml b/app/code/Magento/Sales/etc/config.xml index cb921b8b0a1bc..1a881fbea2449 100644 --- a/app/code/Magento/Sales/etc/config.xml +++ b/app/code/Magento/Sales/etc/config.xml @@ -113,7 +113,7 @@ - 0 + 1 From 5c121e20f909d666079654c6aa7ff325cc094278 Mon Sep 17 00:00:00 2001 From: Andrii Beziazychnyi Date: Sun, 24 Nov 2019 20:43:57 +0200 Subject: [PATCH 034/153] Magento#25669: health_check.php fails if any database cache engine configured - fixed wrong "@return description" of the remove method in class Magento\Framework\Cache\Backend\Database - fixed wrong returned type of the method "unlock" in class Magento\Framework\Lock\Backend\Cache - fixed health_check to create instances into block "check cache storage availability" --- lib/internal/Magento/Framework/Cache/Backend/Database.php | 2 +- lib/internal/Magento/Framework/Lock/Backend/Cache.php | 2 +- pub/health_check.php | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/Cache/Backend/Database.php b/lib/internal/Magento/Framework/Cache/Backend/Database.php index 231a8584cc8a5..c562957b9bf51 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Database.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Database.php @@ -240,7 +240,7 @@ public function save($data, $id, $tags = [], $specificLifetime = false) * Remove a cache record * * @param string $id Cache id - * @return boolean True if no problem + * @return int|boolean Number of affected rows or false on failure */ public function remove($id) { diff --git a/lib/internal/Magento/Framework/Lock/Backend/Cache.php b/lib/internal/Magento/Framework/Lock/Backend/Cache.php index dfe6bbb828352..b6faca8380667 100644 --- a/lib/internal/Magento/Framework/Lock/Backend/Cache.php +++ b/lib/internal/Magento/Framework/Lock/Backend/Cache.php @@ -45,7 +45,7 @@ public function lock(string $name, int $timeout = -1): bool */ public function unlock(string $name): bool { - return $this->cache->remove($this->getIdentifier($name)); + return (bool)$this->cache->remove($this->getIdentifier($name)); } /** diff --git a/pub/health_check.php b/pub/health_check.php index 4bdda68851bde..8642877323bbc 100644 --- a/pub/health_check.php +++ b/pub/health_check.php @@ -63,8 +63,10 @@ } $cacheBackendClass = $cacheConfig[ConfigOptionsListConstants::CONFIG_PATH_BACKEND]; try { + /** @var \Magento\Framework\App\Cache\Frontend\Factory $cacheFrontendFactory */ + $cacheFrontendFactory = $objectManager->get(Magento\Framework\App\Cache\Frontend\Factory::class); /** @var \Zend_Cache_Backend_Interface $backend */ - $backend = new $cacheBackendClass($cacheConfig[ConfigOptionsListConstants::CONFIG_PATH_BACKEND_OPTIONS]); + $backend = $cacheFrontendFactory->create($cacheConfig); $backend->test('test_cache_id'); } catch (\Exception $e) { http_response_code(500); From 3905038c09ee3c5f7a9dac63f5f28070c1197434 Mon Sep 17 00:00:00 2001 From: Andrii Beziazychnyi Date: Mon, 25 Nov 2019 08:51:40 +0200 Subject: [PATCH 035/153] Magento#25669: health_check.php fails if any database cache engine configured - fixed PHPDocs according to requirements static tests for CE --- .../Framework/Cache/Backend/Database.php | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/lib/internal/Magento/Framework/Cache/Backend/Database.php b/lib/internal/Magento/Framework/Cache/Backend/Database.php index c562957b9bf51..a33c8f1a0de0e 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/Database.php +++ b/lib/internal/Magento/Framework/Cache/Backend/Database.php @@ -59,6 +59,7 @@ class Database extends \Zend_Cache_Backend implements \Zend_Cache_Backend_Extend * Constructor * * @param array $options associative array of options + * @throws \Zend_Cache_Exception */ public function __construct($options = []) { @@ -82,6 +83,7 @@ public function __construct($options = []) * Get DB adapter * * @return \Magento\Framework\DB\Adapter\AdapterInterface + * @throws \Zend_Cache_Exception */ protected function _getConnection() { @@ -106,6 +108,7 @@ protected function _getConnection() * Get table name where data is stored * * @return string + * @throws \Zend_Cache_Exception */ protected function _getDataTable() { @@ -122,6 +125,7 @@ protected function _getDataTable() * Get table name where tags are stored * * @return string + * @throws \Zend_Cache_Exception */ protected function _getTagsTable() { @@ -139,9 +143,10 @@ protected function _getTagsTable() * * Note : return value is always "string" (unserialization is done by the core not by the backend) * - * @param string $id Cache id - * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested + * @param string $id Cache id + * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested * @return string|false cached datas + * @throws \Zend_Cache_Exception */ public function load($id, $doNotTestCacheValidity = false) { @@ -166,8 +171,9 @@ public function load($id, $doNotTestCacheValidity = false) /** * Test if a cache is available or not (for the given id) * - * @param string $id cache id + * @param string $id cache id * @return mixed|false (a cache is not available) or "last modified" timestamp (int) of the available cache record + * @throws \Zend_Cache_Exception */ public function test($id) { @@ -196,11 +202,13 @@ public function test($id) * Note : $data is always "string" (serialization is done by the * core not by the backend) * - * @param string $data Datas to cache - * @param string $id Cache id - * @param string[] $tags Array of strings, the cache record will be tagged by each string entry - * @param int|bool $specificLifetime Integer to set a specific lifetime or null for infinite lifetime + * @param string $data Datas to cache + * @param string $id Cache id + * @param string[] $tags Array of strings, the cache record will be tagged by each string entry + * @param int|bool $specificLifetime Integer to set a specific lifetime or null for infinite lifetime * @return bool true if no problem + * @throws \Zend_Db_Statement_Exception + * @throws \Zend_Cache_Exception */ public function save($data, $id, $tags = [], $specificLifetime = false) { @@ -239,8 +247,9 @@ public function save($data, $id, $tags = [], $specificLifetime = false) /** * Remove a cache record * - * @param string $id Cache id + * @param string $id Cache id * @return int|boolean Number of affected rows or false on failure + * @throws \Zend_Cache_Exception */ public function remove($id) { @@ -266,9 +275,10 @@ public function remove($id) * \Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => remove cache entries matching any given tags * ($tags can be an array of strings or a single string) * - * @param string $mode Clean mode - * @param string[] $tags Array of tags + * @param string $mode Clean mode + * @param string[] $tags Array of tags * @return boolean true if no problem + * @throws \Zend_Cache_Exception */ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, $tags = []) { @@ -301,6 +311,7 @@ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, $tags = []) * Return an array of stored cache ids * * @return string[] array of stored cache ids (string) + * @throws \Zend_Cache_Exception */ public function getIds() { @@ -316,6 +327,7 @@ public function getIds() * Return an array of stored tags * * @return string[] array of stored tags (string) + * @throws \Zend_Cache_Exception */ public function getTags() { @@ -330,6 +342,7 @@ public function getTags() * * @param string[] $tags array of tags * @return string[] array of matching cache ids (string) + * @throws \Zend_Cache_Exception */ public function getIdsMatchingTags($tags = []) { @@ -356,6 +369,7 @@ public function getIdsMatchingTags($tags = []) * * @param string[] $tags array of tags * @return string[] array of not matching cache ids (string) + * @throws \Zend_Cache_Exception */ public function getIdsNotMatchingTags($tags = []) { @@ -369,6 +383,7 @@ public function getIdsNotMatchingTags($tags = []) * * @param string[] $tags array of tags * @return string[] array of any matching cache ids (string) + * @throws \Zend_Cache_Exception */ public function getIdsMatchingAnyTags($tags = []) { @@ -404,6 +419,7 @@ public function getFillingPercentage() * * @param string $id cache id * @return array|false array of metadatas (false if the cache id is not found) + * @throws \Zend_Cache_Exception */ public function getMetadatas($id) { @@ -425,6 +441,7 @@ public function getMetadatas($id) * @param string $id cache id * @param int $extraLifetime * @return boolean true if ok + * @throws \Zend_Cache_Exception */ public function touch($id, $extraLifetime) { @@ -471,6 +488,7 @@ public function getCapabilities() * @param string $id * @param string[] $tags * @return bool + * @throws \Zend_Cache_Exception */ protected function _saveTags($id, $tags) { @@ -509,6 +527,8 @@ protected function _saveTags($id, $tags) * @param string $mode * @param string[] $tags * @return bool + * @throws \Zend_Cache_Exception + * @throws \Zend_Db_Statement_Exception * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _cleanByTags($mode, $tags) @@ -558,6 +578,7 @@ protected function _cleanByTags($mode, $tags) * * @param \Magento\Framework\DB\Adapter\AdapterInterface $connection * @return bool + * @throws \Zend_Cache_Exception */ private function cleanAll(\Magento\Framework\DB\Adapter\AdapterInterface $connection) { @@ -575,6 +596,7 @@ private function cleanAll(\Magento\Framework\DB\Adapter\AdapterInterface $connec * * @param \Magento\Framework\DB\Adapter\AdapterInterface $connection * @return bool + * @throws \Zend_Cache_Exception */ private function cleanOld(\Magento\Framework\DB\Adapter\AdapterInterface $connection) { From 52624d2f3f8749edf5c863dec4095f622720c236 Mon Sep 17 00:00:00 2001 From: Eden Date: Mon, 25 Nov 2019 21:52:09 +0700 Subject: [PATCH 036/153] Resolve Mass Delete Widget should have "Confirmation Modal" --- app/code/Magento/Widget/i18n/en_US.csv | 1 + .../view/adminhtml/layout/adminhtml_widget_instance_block.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/app/code/Magento/Widget/i18n/en_US.csv b/app/code/Magento/Widget/i18n/en_US.csv index 4156b94a1f988..3592cbe9a2042 100644 --- a/app/code/Magento/Widget/i18n/en_US.csv +++ b/app/code/Magento/Widget/i18n/en_US.csv @@ -71,3 +71,4 @@ Product,Product Conditions,Conditions "Widget ID","Widget ID" "Inserting a widget does not create a widget instance.","Inserting a widget does not create a widget instance." +"Are you sure you want to delete the selected widget(s)?","Are you sure you want to delete the selected widget(s)?" diff --git a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml index c78f9ec225be4..1604ac5ba1122 100644 --- a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml +++ b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml @@ -25,6 +25,7 @@ Delete */*/massDelete 0 + Are you sure you want to delete the selected widget(s)? From b906d2b40fc3401667878408d8cb97615cf7350f Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sat, 30 Nov 2019 14:43:55 +0000 Subject: [PATCH 037/153] Use interface constant not hard-coded string --- .../Block/Backend/Grid/Column/Renderer/ScheduleStatus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php index 712b17b91a0d7..0c8083d57bcd8 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php @@ -74,7 +74,7 @@ public function render(\Magento\Framework\DataObject $row) $class = 'grid-severity-notice'; } - if ($state->getStatus() !== 'idle') { + if ($state->getStatus() !== $state::STATUS_IDLE) { $class = 'grid-severity-minor'; } From e6e4bb80e44266502f1236e299bacc9824679421 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Tue, 10 Dec 2019 18:54:58 +0000 Subject: [PATCH 038/153] Add class comments to appease linter --- .../Block/Backend/Grid/Column/Renderer/ScheduleStatus.php | 3 +++ .../Indexer/Block/Backend/Grid/Column/Renderer/Scheduled.php | 3 +++ .../Indexer/Block/Backend/Grid/Column/Renderer/Status.php | 3 +++ .../Indexer/Block/Backend/Grid/Column/Renderer/Updated.php | 3 +++ 4 files changed, 12 insertions(+) diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php index 0c8083d57bcd8..7737077609b51 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php @@ -10,6 +10,9 @@ use Magento\Framework\Mview\View; use Magento\Framework\Phrase; +/** + * Renderer for 'Schedule Status' column in indexer grid + */ class ScheduleStatus extends AbstractRenderer { /** diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Scheduled.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Scheduled.php index d5a749270a66f..adfe3dd5b346b 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Scheduled.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Scheduled.php @@ -5,6 +5,9 @@ */ namespace Magento\Indexer\Block\Backend\Grid\Column\Renderer; +/** + * Renderer for 'Scheduled' column in indexer grid + */ class Scheduled extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { /** diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Status.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Status.php index 144d44fe42880..e8d6004b2727d 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Status.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Status.php @@ -5,6 +5,9 @@ */ namespace Magento\Indexer\Block\Backend\Grid\Column\Renderer; +/** + * Renderer for 'Status' column in indexer grid + */ class Status extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer { /** diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Updated.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Updated.php index 92ded9c1f0dc1..6c84ef0e628f7 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Updated.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/Updated.php @@ -5,6 +5,9 @@ */ namespace Magento\Indexer\Block\Backend\Grid\Column\Renderer; +/** + * Renderer for 'Updated' column in indexer grid + */ class Updated extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Datetime { /** From 16079d95e30cc6be2aa6a35b79f80db9e90ac155 Mon Sep 17 00:00:00 2001 From: Mudit Shukla Date: Sat, 11 Jan 2020 03:27:50 +0530 Subject: [PATCH 039/153] Update Reorder.php Update Reorder.php so that it can handle the Localized Exception and added try catch block --- .../Adminhtml/Order/Create/Reorder.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php index 995a6c216d3c2..04013df790a1d 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php @@ -90,10 +90,18 @@ public function execute() } $resultRedirect->setPath('sales/order/view', ['order_id' => $orderId]); } else { - $order->setReordered(true); - $this->_getSession()->setUseOldShippingMethod(true); - $this->_getOrderCreateModel()->initFromOrder($order); - $resultRedirect->setPath('sales/*'); + try { + $order->setReordered(true); + $this->_getSession()->setUseOldShippingMethod(true); + $this->_getOrderCreateModel()->initFromOrder($order); + $resultRedirect->setPath('sales/*'); + } catch (\Magento\Framework\Exception\LocalizedException $e) { + $this->messageManager->addErrorMessage($e->getMessage()); + return $resultRedirect->setPath('sales/*'); + } catch (\Exception $e) { + $this->messageManager->addException($e, __('Error while processing order.')); + return $resultRedirect->setPath('sales/*'); + } } return $resultRedirect; From e9300b790b9a21c3d217e56665ac1553d949adf6 Mon Sep 17 00:00:00 2001 From: "Galla, Daniel" Date: Thu, 23 Jan 2020 09:52:41 +0100 Subject: [PATCH 040/153] #26499 Always transliterate product url key --- .../CatalogUrlRewrite/Model/ProductUrlPathGenerator.php | 2 +- .../Test/Unit/Model/ProductUrlPathGeneratorTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlPathGenerator.php b/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlPathGenerator.php index ac3a5092bb3bf..a5553535b390a 100644 --- a/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlPathGenerator.php +++ b/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlPathGenerator.php @@ -150,7 +150,7 @@ protected function prepareProductUrlKey(Product $product) $urlKey = (string)$product->getUrlKey(); $urlKey = trim(strtolower($urlKey)); - return $urlKey ?: $product->formatUrlKey($product->getName()); + return $product->formatUrlKey($urlKey ?: $product->getName()); } /** diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlPathGeneratorTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlPathGeneratorTest.php index 5076577447af3..233d0703448ca 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlPathGeneratorTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlPathGeneratorTest.php @@ -80,8 +80,8 @@ protected function setUp(): void public function getUrlPathDataProvider(): array { return [ - 'path based on url key uppercase' => ['Url-Key', null, 0, 'url-key'], - 'path based on url key' => ['url-key', null, 0, 'url-key'], + 'path based on url key uppercase' => ['Url-Key', null, 1, 'url-key'], + 'path based on url key' => ['url-key', null, 1, 'url-key'], 'path based on product name 1' => ['', 'product-name', 1, 'product-name'], 'path based on product name 2' => [null, 'product-name', 1, 'product-name'], 'path based on product name 3' => [false, 'product-name', 1, 'product-name'] From 6cf9ebcad0a4f1747a2c9a8e56504b278f0dd863 Mon Sep 17 00:00:00 2001 From: Alexander Steshuk Date: Tue, 28 Jan 2020 16:50:48 +0200 Subject: [PATCH 041/153] magento/magento2#25733: MFTF test added. --- .../AdminMassDeleteWidgetActionGroup.xml | 49 +++++++++++++++++ .../Widget/Test/Mftf/Data/WidgetData.xml | 5 ++ .../Test/Mftf/Section/AdminWidgetsSection.xml | 12 +++- .../AdminContentWidgetsMassDeletesTest.xml | 55 +++++++++++++++++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminMassDeleteWidgetActionGroup.xml create mode 100644 app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsMassDeletesTest.xml diff --git a/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminMassDeleteWidgetActionGroup.xml b/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminMassDeleteWidgetActionGroup.xml new file mode 100644 index 0000000000000..e93f99fd475fd --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/ActionGroup/AdminMassDeleteWidgetActionGroup.xml @@ -0,0 +1,49 @@ + + + + + + + Goes to the Admin Widgets list page. Mass delete widgets. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Widget/Test/Mftf/Data/WidgetData.xml b/app/code/Magento/Widget/Test/Mftf/Data/WidgetData.xml index 4c6e98aafd765..9beb5d1da1b1c 100644 --- a/app/code/Magento/Widget/Test/Mftf/Data/WidgetData.xml +++ b/app/code/Magento/Widget/Test/Mftf/Data/WidgetData.xml @@ -11,9 +11,14 @@ CMS Static Block Magento Luma + Magento Luma testName All Store Views + + All Store Views + All Pages Page Top + All Pages diff --git a/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml b/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml index 162f4e9c41064..ad9db0dfb4af1 100644 --- a/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml +++ b/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml @@ -11,7 +11,17 @@
- + + + + + + + + + + +
diff --git a/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsMassDeletesTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsMassDeletesTest.xml new file mode 100644 index 0000000000000..073cdabf37698 --- /dev/null +++ b/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsMassDeletesTest.xml @@ -0,0 +1,55 @@ + + + + + + + + + + <description value="Admin select widgets in grid and try to mass delete action, will show pop-up with confirm action"/> + <severity value="MAJOR"/> + <group value="widget"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> + </before> + <after> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentWidgetsPageFirst"> + <argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuContentElementsWidgets.dataUiId}}"/> + </actionGroup> + <actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitleFirst"> + <argument name="title" value="{{AdminMenuContentElementsWidgets.pageTitle}}"/> + </actionGroup> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear1"/> + <actionGroup ref="AdminCreateAndSaveWidgetActionGroup" stepKey="addWidgetForTest1"> + <argument name="widget" value="ProductsListWidget"/> + </actionGroup> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/> + <actionGroup ref="AdminCreateAndSaveWidgetActionGroup" stepKey="addWidgetForTest2"> + <argument name="widget" value="ProductsListWidget"/> + </actionGroup> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear4"/> + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentWidgetsPageSecond"> + <argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuContentElementsWidgets.dataUiId}}"/> + </actionGroup> + <actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitleSecond"> + <argument name="title" value="{{AdminMenuContentElementsWidgets.pageTitle}}"/> + </actionGroup> + <waitForPageLoad stepKey="waitForPageLoad1"/> + <actionGroup ref="AdminMassDeleteWidgetActionGroup" stepKey="massWidgetDelete"> + <argument name="row" value="1"/> + </actionGroup> + </test> +</tests> + From 2685e4396b2d891556def6a50d6fd345cd725d3a Mon Sep 17 00:00:00 2001 From: Alexander Steshuk <grp-engcom-vendorworker-Kilo@adobe.com> Date: Wed, 29 Jan 2020 13:42:49 +0200 Subject: [PATCH 042/153] magento/magento2#25733: MFTF test updated. --- .../Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml b/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml index ad9db0dfb4af1..f6ca1b25a90f2 100644 --- a/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml +++ b/app/code/Magento/Widget/Test/Mftf/Section/AdminWidgetsSection.xml @@ -11,6 +11,7 @@ <section name="AdminWidgetsSection"> <element name="widgetTitleSearch" type="input" selector="#widgetInstanceGrid_filter_title"/> <element name="searchButton" type="button" selector=".action-default.scalable.action-secondary"/> + <element name="searchResult" type="text" selector="#widgetInstanceGrid_table>tbody>tr:nth-child(1)"/> <element name="resetFilter" type="button" selector="button[data-action='grid-filter-reset']"/> <element name="massActionSelect" type="select" selector="#widgetInstanceGrid_massaction-mass-select"/> <element name="massActionSelectOptionAll" type="select" selector="//*[@id='widgetInstanceGrid_massaction-mass-select']//option[@value='selectAll']"/> From b1b3e6ce6ddef57a8d6e59cc678160670f8b9e76 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Tue, 4 Feb 2020 14:08:07 +0200 Subject: [PATCH 043/153] Cover MFTF test --- .../Customer/Test/Mftf/Data/CustomerData.xml | 12 ++++ ...formationWithGeneratedEmailActionGroup.xml | 19 ++++++ .../Sales/Test/Mftf/Data/ConfigData.xml | 8 +++ ...reateOrderWithCustomerWithoutEmailTest.xml | 61 +++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 app/code/Magento/Sales/Test/Mftf/ActionGroup/VerifyCreatedOrderInformationWithGeneratedEmailActionGroup.xml create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml diff --git a/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml b/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml index b9227505871cf..d75afe0388193 100644 --- a/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml +++ b/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml @@ -178,6 +178,18 @@ <data key="website_id">0</data> <requiredEntity type="address">US_Address_CA</requiredEntity> </entity> + <entity name="Simple_US_Customer_CA_Without_Email" type="customer"> + <data key="group_id">0</data> + <data key="default_billing">true</data> + <data key="default_shipping">true</data> + <data key="firstname">John</data> + <data key="lastname">Doe</data> + <data key="fullname">John Doe</data> + <data key="password">pwdTest123!</data> + <data key="store_id">0</data> + <data key="website_id">0</data> + <requiredEntity type="address">US_Address_CA</requiredEntity> + </entity> <entity name="Simple_US_Customer_For_Update" type="customer"> <var key="id" entityKey="id" entityType="customer"/> <data key="firstname">Jane</data> diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/VerifyCreatedOrderInformationWithGeneratedEmailActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/VerifyCreatedOrderInformationWithGeneratedEmailActionGroup.xml new file mode 100644 index 0000000000000..9b1666763b2bc --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/VerifyCreatedOrderInformationWithGeneratedEmailActionGroup.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="VerifyCreatedOrderInformationWithGeneratedEmailActionGroup"> + <annotations> + <description>Validate customer email on order page. Starts on order page.</description> + </annotations> + <arguments> + <argument name="email" type="string" defaultValue="{{CustomerEntityOne.email}}"/> + </arguments> + <see selector="{{AdminOrderDetailsInformationSection.customerEmail}}" userInput="{{email}}" stepKey="seeGeneratedEmail"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Sales/Test/Mftf/Data/ConfigData.xml b/app/code/Magento/Sales/Test/Mftf/Data/ConfigData.xml index 730bebc047f93..25e25006d040a 100644 --- a/app/code/Magento/Sales/Test/Mftf/Data/ConfigData.xml +++ b/app/code/Magento/Sales/Test/Mftf/Data/ConfigData.xml @@ -20,4 +20,12 @@ <data key="label">No</data> <data key="value">0</data> </entity> + <entity name="DisableEmailRequiredForOrder"> + <data key="path">customer/create_account/email_required_create_order</data> + <data key="value">0</data> + </entity> + <entity name="EnableEmailRequiredForOrder"> + <data key="path">customer/create_account/email_required_create_order</data> + <data key="value">1</data> + </entity> </entities> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml new file mode 100644 index 0000000000000..bb1f5840ed6bf --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCreateOrderWithCustomerWithoutEmailTest"> + <annotations> + <title value="Admin Create Order"/> + <stories value="Admin create order with customer without email."/> + <description value="Verify, admin able to create order with customer without email."/> + <severity value="MINOR"/> + <group value="Sales"/> + </annotations> + <before> + <!--Disable required 'email' field on create order page.--> + <magentoCLI command="config:set {{DisableEmailRequiredForOrder.path}} {{DisableEmailRequiredForOrder.value}}" stepKey="disableRequiredFieldEmailForAdminOrderCreation"/> + <!--Create test data.--> + <createData entity="_defaultCategory" stepKey="category"/> + <createData entity="SimpleProduct" stepKey="simpleProduct"> + <requiredEntity createDataKey="category"/> + </createData> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <!--Clean up created test data.--> + <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> + <deleteData createDataKey="category" stepKey="deleteCategory"/> + <!--Enable required 'email' field on create order page.--> + <magentoCLI command="config:set {{EnableEmailRequiredForOrder.path}} {{EnableEmailRequiredForOrder.value}}" stepKey="enableRequiredFieldEmailForAdminOrderCreation"/> + <actionGroup ref="logout" stepKey="logout"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </after> + + <!--Create order.--> + <actionGroup ref="NavigateToNewOrderPageNewCustomerActionGroup" stepKey="navigateToNewOrderPageNewCustomerActionGroup" /> + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSimpleProductToOrder"> + <argument name="product" value="$$simpleProduct$$"/> + <argument name="productQty" value="{{SimpleProduct.quantity}}"/> + </actionGroup> + <!--Fill customer address without 'email'--> + <actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerInformation"> + <argument name="customer" value="Simple_US_Customer_CA_Without_Email"/> + <argument name="address" value="US_Address_CA"/> + </actionGroup> + <actionGroup ref="OrderSelectFlatRateShippingActionGroup" stepKey="orderSelectFlatRateShippingMethod"/> + <actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> + <!--Verify, 'email' is generated.--> + <actionGroup ref="VerifyCreatedOrderInformationWithGeneratedEmailActionGroup" stepKey="verifyCustomerEmail"> + <argument name="email" value="@example.com"/> + </actionGroup> + <grabTextFrom selector="{{AdminOrderDetailsInformationSection.customerEmail}}" stepKey="generatedCustomerEmail"/> + <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> + <argument name="email" value="$generatedCustomerEmail"/> + </actionGroup> + </test> +</tests> From 6633cc22aa266a0399a60d6a7b94f8d8841004be Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Tue, 4 Feb 2020 15:27:52 +0200 Subject: [PATCH 044/153] Covered unit test --- .../Lock/Test/Unit/Backend/CacheTest.php | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 lib/internal/Magento/Framework/Lock/Test/Unit/Backend/CacheTest.php diff --git a/lib/internal/Magento/Framework/Lock/Test/Unit/Backend/CacheTest.php b/lib/internal/Magento/Framework/Lock/Test/Unit/Backend/CacheTest.php new file mode 100644 index 0000000000000..2ec812092d654 --- /dev/null +++ b/lib/internal/Magento/Framework/Lock/Test/Unit/Backend/CacheTest.php @@ -0,0 +1,64 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Lock\Test\Unit\Backend; + +use Magento\Framework\Cache\FrontendInterface; +use Magento\Framework\Lock\Backend\Cache; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class CacheTest extends TestCase +{ + const LOCK_PREFIX = 'LOCKED_RECORD_INFO_'; + + /** + * @var FrontendInterface|MockObject + */ + private $frontendCacheMock; + + /** + * @var Cache + */ + private $cache; + + /** + * @inheritDoc + */ + public function setUp() + { + $this->frontendCacheMock = $this->createMock(FrontendInterface::class); + + $objectManager = new ObjectManagerHelper($this); + + $this->cache = $objectManager->getObject( + Cache::class, + [ + 'cache' => $this->frontendCacheMock + ] + ); + } + + /** + * Verify released a lock. + * + * @return void + */ + public function testUnlock(): void + { + $identifier = 'lock_name'; + + $this->frontendCacheMock + ->expects($this->once()) + ->method('remove') + ->with(self::LOCK_PREFIX . $identifier) + ->willReturn(true); + + $this->assertEquals(true, $this->cache->unlock($identifier)); + } +} From a21b2466f6d63e5b9d120ff0295f80f51c2ec7cc Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Thu, 6 Feb 2020 13:57:24 +0200 Subject: [PATCH 045/153] Cover unit test --- .../Adminhtml/Order/Create/ReorderTest.php | 193 +++++++++++++----- 1 file changed, 144 insertions(+), 49 deletions(-) diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ReorderTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ReorderTest.php index b11d73de736d4..ce777046b584d 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ReorderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Create/ReorderTest.php @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Sales\Test\Unit\Controller\Adminhtml\Order\Create; use Magento\Backend\App\Action\Context; @@ -14,19 +16,24 @@ use Magento\Framework\App\RequestInterface; use Magento\Framework\Message\ManagerInterface; use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Sales\Api\OrderRepositoryInterface; use Magento\Sales\Controller\Adminhtml\Order\Create\Reorder; use Magento\Sales\Model\AdminOrder\Create; use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Reorder\UnavailableProductsProvider; use Magento\Sales\Helper\Reorder as ReorderHelper; +use Magento\Framework\Exception\NoSuchEntityException; +use PHPUnit\Framework\TestCase; +use PHPUnit_Framework_MockObject_MockObject as MockObject; /** - * Class ReorderTest + * Verify reorder class. + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyFields) */ -class ReorderTest extends \PHPUnit\Framework\TestCase +class ReorderTest extends TestCase { /** * @var Reorder @@ -39,67 +46,67 @@ class ReorderTest extends \PHPUnit\Framework\TestCase private $context; /** - * @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject + * @var RequestInterface|MockObject */ private $requestMock; /** - * @var ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ObjectManagerInterface|MockObject */ private $objectManagerMock; /** - * @var Order|\PHPUnit_Framework_MockObject_MockObject + * @var Order|MockObject */ private $orderMock; /** - * @var ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ManagerInterface|MockObject */ private $messageManagerMock; /** - * @var ForwardFactory|\PHPUnit_Framework_MockObject_MockObject + * @var ForwardFactory|MockObject */ private $resultForwardFactoryMock; /** - * @var RedirectFactory|\PHPUnit_Framework_MockObject_MockObject + * @var RedirectFactory|MockObject */ private $resultRedirectFactoryMock; /** - * @var Redirect|\PHPUnit_Framework_MockObject_MockObject + * @var Redirect|MockObject */ private $resultRedirectMock; /** - * @var Forward|\PHPUnit_Framework_MockObject_MockObject + * @var Forward|MockObject */ private $resultForwardMock; /** - * @var Quote|\PHPUnit_Framework_MockObject_MockObject + * @var Quote|MockObject */ private $quoteSessionMock; /** - * @var OrderRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject + * @var OrderRepositoryInterface|MockObject */ private $orderRepositoryMock; /** - * @var ReorderHelper|\PHPUnit_Framework_MockObject_MockObject + * @var ReorderHelper|MockObject */ private $reorderHelperMock; /** - * @var UnavailableProductsProvider|\PHPUnit_Framework_MockObject_MockObject + * @var UnavailableProductsProvider|MockObject */ private $unavailableProductsProviderMock; /** - * @var Create|\PHPUnit_Framework_MockObject_MockObject + * @var Create|MockObject */ private $orderCreateMock; @@ -109,39 +116,33 @@ class ReorderTest extends \PHPUnit\Framework\TestCase private $orderId; /** - * @return void + * @inheritDoc */ protected function setUp() { $this->orderId = 111; - $this->orderRepositoryMock = $this->getMockBuilder(OrderRepositoryInterface::class)->getMockForAbstractClass(); + $this->orderRepositoryMock = $this->createMock(OrderRepositoryInterface::class); + $this->requestMock = $this->createMock(RequestInterface::class); + $this->objectManagerMock = $this->createMock(ObjectManagerInterface::class); + $this->resultForwardFactoryMock = $this->createMock(ForwardFactory::class); + $this->resultRedirectFactoryMock = $this->createMock(RedirectFactory::class); + $this->resultRedirectMock = $this->createMock(Redirect::class); + $this->resultForwardMock = $this->createMock(Forward::class); + $this->reorderHelperMock = $this->createMock(ReorderHelper::class); + $this->unavailableProductsProviderMock = $this->createMock(UnavailableProductsProvider::class); + $this->orderCreateMock = $this->createMock(Create::class); $this->orderMock = $this->getMockBuilder(Order::class) ->disableOriginalConstructor() ->setMethods(['getEntityId', 'getId', 'setReordered']) ->getMock(); - $this->requestMock = $this->getMockBuilder(RequestInterface::class)->getMockForAbstractClass(); - $this->objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class)->getMockForAbstractClass(); - $this->resultForwardFactoryMock = $this->getMockBuilder(ForwardFactory::class) - ->disableOriginalConstructor() - ->getMock(); - $this->resultRedirectFactoryMock = $this->getMockBuilder(RedirectFactory::class) - ->disableOriginalConstructor() - ->getMock(); - $this->resultRedirectMock = $this->getMockBuilder(Redirect::class)->disableOriginalConstructor()->getMock(); - $this->resultForwardMock = $this->getMockBuilder(Forward::class)->disableOriginalConstructor()->getMock(); $this->quoteSessionMock = $this->getMockBuilder(Quote::class) ->disableOriginalConstructor() ->setMethods(['clearStorage', 'setUseOldShippingMethod']) ->getMock(); - $this->reorderHelperMock = $this->getMockBuilder(ReorderHelper::class) - ->disableOriginalConstructor() - ->getMock(); - $this->messageManagerMock = $this->getMockBuilder(ManagerInterface::class)->getMockForAbstractClass(); - $this->unavailableProductsProviderMock = $this->getMockBuilder(UnavailableProductsProvider::class) - ->disableOriginalConstructor() - ->getMock(); - $this->orderCreateMock = $this->getMockBuilder(Create::class)->disableOriginalConstructor()->getMock(); - $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $this->messageManagerMock = $this->getMockBuilder(ManagerInterface::class) + ->getMockForAbstractClass(); + + $objectManager = new ObjectManager($this); $this->context = $objectManager->getObject( Context::class, [ @@ -165,9 +166,11 @@ protected function setUp() } /** + * Verify execute with no route. + * * @return void */ - public function testExecuteForward() + public function testExecuteForward(): void { $this->clearStorage(); $this->getOrder(); @@ -178,9 +181,11 @@ public function testExecuteForward() } /** + * Verify execute redirect order grid + * * @return void */ - public function testExecuteRedirectOrderGrid() + public function testExecuteRedirectOrderGrid(): void { $this->clearStorage(); $this->getOrder(); @@ -193,9 +198,11 @@ public function testExecuteRedirectOrderGrid() } /** + * Verify execute redirect back. + * * @return void */ - public function testExecuteRedirectBack() + public function testExecuteRedirectBack(): void { $this->clearStorage(); $this->getOrder(); @@ -210,9 +217,11 @@ public function testExecuteRedirectBack() } /** + * Verify execute redirect new order. + * * @return void */ - public function testExecuteRedirectNewOrder() + public function testExecuteRedirectNewOrder(): void { $this->clearStorage(); $this->getOrder(); @@ -227,9 +236,75 @@ public function testExecuteRedirectNewOrder() } /** + * Verify redirect new order with throws exception. + * + * @return void + */ + public function testExecuteRedirectNewOrderWithThrowsException(): void + { + $exception = new NoSuchEntityException(); + + $this->clearStorage(); + $this->getOrder(); + $this->canReorder(true); + $this->createRedirect(); + $this->getOrderId($this->orderId); + $this->getUnavailableProducts([]); + + $this->orderMock->expects($this->once()) + ->method('setReordered') + ->with(true) + ->willThrowException($exception); + $this->messageManagerMock + ->expects($this->once()) + ->method('addErrorMessage') + ->willReturnSelf(); + $this->resultRedirectMock + ->expects($this->once()) + ->method('setPath') + ->with('sales/*') + ->willReturnSelf(); + $this->assertInstanceOf(Redirect::class, $this->reorder->execute()); + } + + /** + * Verify redirect new order with exception. + * * @return void */ - private function clearStorage() + public function testExecuteRedirectNewOrderWithException(): void + { + $exception = new \Exception(); + + $this->clearStorage(); + $this->getOrder(); + $this->canReorder(true); + $this->createRedirect(); + $this->getOrderId($this->orderId); + $this->getUnavailableProducts([]); + $this->orderMock->expects($this->once()) + ->method('setReordered') + ->with(true) + ->willThrowException(new $exception); + $this->messageManagerMock + ->expects($this->once()) + ->method('addException') + ->with($exception, __('Error while processing order.')) + ->willReturnSelf(); + $this->resultRedirectMock + ->expects($this->once()) + ->method('setPath') + ->with('sales/*') + ->willReturnSelf(); + $this->assertInstanceOf(Redirect::class, $this->reorder->execute()); + } + + /** + * Mock clear storage. + * + * @return void + */ + private function clearStorage(): void { $this->objectManagerMock->expects($this->at(0)) ->method('get') @@ -239,9 +314,11 @@ private function clearStorage() } /** + * Mock get order. + * * @return void */ - private function getOrder() + private function getOrder(): void { $this->requestMock->expects($this->once()) ->method('getParam') @@ -254,9 +331,12 @@ private function getOrder() } /** + * Mock and return 'canReorder' method. + * * @param bool $result + * @return void */ - private function canReorder($result) + private function canReorder(bool $result): void { $entityId = 1; $this->orderMock->expects($this->once())->method('getEntityId')->willReturn($entityId); @@ -267,18 +347,22 @@ private function canReorder($result) } /** + * Mock result forward. + * * @return void */ - private function prepareForward() + private function prepareForward(): void { $this->resultForwardFactoryMock->expects($this->once())->method('create')->willReturn($this->resultForwardMock); $this->resultForwardMock->expects($this->once())->method('forward')->with('noroute')->willReturnSelf(); } /** + * Mock create. + * * @return void */ - private function createRedirect() + private function createRedirect(): void { $this->resultRedirectFactoryMock->expects($this->once()) ->method('create') @@ -286,26 +370,35 @@ private function createRedirect() } /** + * Mock order 'getId' method. + * * @param null|int $orderId + * @return void */ - private function getOrderId($orderId) + private function getOrderId($orderId): void { $this->orderMock->expects($this->once())->method('getId')->willReturn($orderId); } /** + * Mock result redirect 'setPath' method. + * * @param string $path * @param null|array $params + * @return void */ - private function setPath($path, $params = []) + private function setPath(string $path, $params = []): void { $this->resultRedirectMock->expects($this->once())->method('setPath')->with($path, $params); } /** + * Mock unavailable products provider. + * * @param array $unavailableProducts + * @return void */ - private function getUnavailableProducts(array $unavailableProducts) + private function getUnavailableProducts(array $unavailableProducts): void { $this->unavailableProductsProviderMock->expects($this->any()) ->method('getForOrder') @@ -314,9 +407,11 @@ private function getUnavailableProducts(array $unavailableProducts) } /** + * Mock init form order. + * * @return void */ - private function initFromOrder() + private function initFromOrder(): void { $this->orderMock->expects($this->once())->method('setReordered')->with(true)->willReturnSelf(); $this->objectManagerMock->expects($this->at(1)) From 43f9e2b61dca391ca4c887f0c0c939dcbace34b7 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Thu, 6 Feb 2020 14:50:28 +0200 Subject: [PATCH 046/153] Add implement HttpPostActionInterface for renderer controller --- .../Adminhtml/Order/Create/Reorder.php | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php index 04013df790a1d..481fa669b72d3 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php @@ -3,16 +3,28 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Sales\Controller\Adminhtml\Order\Create; use Magento\Backend\App\Action; +use Magento\Backend\Model\View\Result\Forward; use Magento\Backend\Model\View\Result\ForwardFactory; +use Magento\Backend\Model\View\Result\Redirect; +use Magento\Catalog\Helper\Product; +use Magento\Framework\Escaper; use Magento\Framework\View\Result\PageFactory; -use Magento\Sales\Model\Order\Reorder\UnavailableProductsProvider; use Magento\Sales\Api\OrderRepositoryInterface; +use Magento\Sales\Controller\Adminhtml\Order\Create; use Magento\Sales\Helper\Reorder as ReorderHelper; +use Magento\Sales\Model\Order; +use Magento\Sales\Model\Order\Reorder\UnavailableProductsProvider; +use Magento\Framework\App\Action\HttpPostActionInterface; -class Reorder extends \Magento\Sales\Controller\Adminhtml\Order\Create +/** + * Controller create order. + */ +class Reorder extends Create implements HttpPostActionInterface { /** * @var UnavailableProductsProvider @@ -31,8 +43,8 @@ class Reorder extends \Magento\Sales\Controller\Adminhtml\Order\Create /** * @param Action\Context $context - * @param \Magento\Catalog\Helper\Product $productHelper - * @param \Magento\Framework\Escaper $escaper + * @param Product $productHelper + * @param Escaper $escaper * @param PageFactory $resultPageFactory * @param ForwardFactory $resultForwardFactory * @param UnavailableProductsProvider $unavailableProductsProvider @@ -41,8 +53,8 @@ class Reorder extends \Magento\Sales\Controller\Adminhtml\Order\Create */ public function __construct( Action\Context $context, - \Magento\Catalog\Helper\Product $productHelper, - \Magento\Framework\Escaper $escaper, + Product $productHelper, + Escaper $escaper, PageFactory $resultPageFactory, ForwardFactory $resultForwardFactory, UnavailableProductsProvider $unavailableProductsProvider, @@ -62,19 +74,21 @@ public function __construct( } /** - * @return \Magento\Backend\Model\View\Result\Forward|\Magento\Backend\Model\View\Result\Redirect + * Adminhtml controller create order. + * + * @return Forward|Redirect */ public function execute() { $this->_getSession()->clearStorage(); $orderId = $this->getRequest()->getParam('order_id'); - /** @var \Magento\Sales\Model\Order $order */ + /** @var Order $order */ $order = $this->orderRepository->get($orderId); if (!$this->reorderHelper->canReorder($order->getEntityId())) { return $this->resultForwardFactory->create()->forward('noroute'); } - /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ + /** @var Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); if (!$order->getId()) { $resultRedirect->setPath('sales/order/'); @@ -90,7 +104,7 @@ public function execute() } $resultRedirect->setPath('sales/order/view', ['order_id' => $orderId]); } else { - try { + try { $order->setReordered(true); $this->_getSession()->setUseOldShippingMethod(true); $this->_getOrderCreateModel()->initFromOrder($order); From f0e14b0480effcc2b6f44a410f86b357fdb0f7cf Mon Sep 17 00:00:00 2001 From: Piotr Markiewicz <piotr.markiewicz@vaimo.com> Date: Fri, 7 Feb 2020 11:03:12 +0100 Subject: [PATCH 047/153] Use messageManager instead of throwing exceptions --- .../Adminhtml/Export/File/Delete.php | 34 ++++++++++--------- .../Adminhtml/Export/File/Download.php | 19 +++++++---- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php index 1e9d194653c9c..75d772922c70c 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php @@ -9,9 +9,7 @@ use Magento\Backend\App\Action; use Magento\Framework\App\Action\HttpPostActionInterface; -use Magento\Framework\Controller\ResultFactory; use Magento\Framework\Exception\FileSystemException; -use Magento\Framework\Exception\LocalizedException; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\ImportExport\Controller\Adminhtml\Export as ExportController; use Magento\Framework\Filesystem; @@ -56,29 +54,33 @@ public function __construct( /** * Controller basic method implementation. * - * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface - * @throws LocalizedException + * @return \Magento\Framework\Controller\ResultInterface */ public function execute() { + /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ + $resultRedirect = $this->resultRedirectFactory->create(); + $resultRedirect->setPath('adminhtml/export/index'); + $fileName = $this->getRequest()->getParam('filename'); + if (empty($fileName)) { + $this->messageManager->addErrorMessage(\__('Please provide valid export file name')); + + return $resultRedirect; + } try { - if (empty($fileName = $this->getRequest()->getParam('filename'))) { - throw new LocalizedException(__('Please provide export file name')); - } $directory = $this->filesystem->getDirectoryRead(DirectoryList::VAR_DIR); $path = $directory->getAbsolutePath() . 'export/' . $fileName; - if (!$directory->isFile($path)) { - throw new LocalizedException(__('Sorry, but the data is invalid or the file is not uploaded.')); + if ($directory->isFile($path)) { + $this->file->deleteFile($path); + $this->messageManager->addSuccessMessage(\__('File %1 deleted', $fileName)); + } else { + $this->messageManager->addErrorMessage(\__('%1 is not a valid file', $fileName)); } - - $this->file->deleteFile($path); - /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ - $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT); - $resultRedirect->setPath('adminhtml/export/index'); - return $resultRedirect; } catch (FileSystemException $exception) { - throw new LocalizedException(__('There are no export file with such name %1', $fileName)); + $this->messageManager->addErrorMessage($exception->getMessage()); } + + return $resultRedirect; } } diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Download.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Download.php index 8dbd9a0ae44ba..48e8b8f1d9d07 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Download.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Download.php @@ -10,7 +10,6 @@ use Magento\Backend\App\Action; use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\App\Response\Http\FileFactory; -use Magento\Framework\Exception\LocalizedException; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\ImportExport\Controller\Adminhtml\Export as ExportController; use Magento\Framework\Filesystem; @@ -55,12 +54,17 @@ public function __construct( * Controller basic method implementation. * * @return \Magento\Framework\App\ResponseInterface - * @throws LocalizedException */ public function execute() { - if (empty($fileName = $this->getRequest()->getParam('filename'))) { - throw new LocalizedException(__('Please provide export file name')); + /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ + $resultRedirect = $this->resultRedirectFactory->create(); + $resultRedirect->setPath('adminhtml/export/index'); + $fileName = $this->getRequest()->getParam('filename'); + if (empty($fileName) || \preg_match('/\.\.(\\\|\/)/', $fileName) !== 0) { + $this->messageManager->addErrorMessage(\__('Please provide valid export file name')); + + return $resultRedirect; } try { $path = 'export/' . $fileName; @@ -72,8 +76,11 @@ public function execute() DirectoryList::VAR_DIR ); } - } catch (LocalizedException | \Exception $exception) { - throw new LocalizedException(__('There are no export file with such name %1', $fileName)); + $this->messageManager->addErrorMessage(\__('%1 is not a valid file', $fileName)); + } catch (\Exception $exception) { + $this->messageManager->addErrorMessage($exception->getMessage()); } + + return $resultRedirect; } } From cb685d15b2b590bdb4d99a3d4ebe563037d0aa31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20Szyd=C5=82o?= <maksymilian.szydlo@bold.net.pl> Date: Sat, 24 Mar 2018 17:11:45 +0100 Subject: [PATCH 048/153] Fix generating product URL rewrites for anchor categories (cherry picked from commit 63111ed399b2e058efc0bf1c7c5427299cb8c5fc) --- .../Model/Product/AnchorUrlRewriteGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGenerator.php b/app/code/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGenerator.php index 5d08ea33ff8a1..a6589c6062846 100644 --- a/app/code/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGenerator.php +++ b/app/code/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGenerator.php @@ -67,7 +67,7 @@ public function generate($storeId, Product $product, ObjectRegistry $productCate $anchorCategoryIds = $category->getAnchorsAbove(); if ($anchorCategoryIds) { foreach ($anchorCategoryIds as $anchorCategoryId) { - $anchorCategory = $this->categoryRepository->get($anchorCategoryId); + $anchorCategory = $this->categoryRepository->get($anchorCategoryId, $storeId); if ((int)$anchorCategory->getParentId() === Category::TREE_ROOT_ID) { continue; } From acb8642c44d1ecb60ad023c81f6541fa9ebae47d Mon Sep 17 00:00:00 2001 From: Pieter Hoste <hoste.pieter@gmail.com> Date: Sun, 9 Feb 2020 14:32:08 +0100 Subject: [PATCH 049/153] Updated unit test and make sure it passes the store id to the get call on the category repository. This is not testing for the bugfix but makes sure that when not passing the storeId param in the tested code, the test starts complaining. --- .../Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php index 662e156b8f100..8eb46f912d491 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php @@ -100,9 +100,9 @@ public function testGenerateCategories() ->expects($this->any()) ->method('get') ->withConsecutive( - [ 'category_id' => $categoryIds[0]], - [ 'category_id' => $categoryIds[1]], - [ 'category_id' => $categoryIds[2]] + [$categoryIds[0], $storeId], + [$categoryIds[1], $storeId], + [$categoryIds[2], $storeId], ) ->will($this->returnValue($category)); $this->categoryRegistry->expects($this->any())->method('getList') From 97258e1a9ce97ad32971731eceac8fee32f66b74 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Thu, 13 Feb 2020 16:21:06 +0200 Subject: [PATCH 050/153] Changes are covered by the integration test --- .../Product/AnchorUrlRewriteGeneratorTest.php | 81 +++++++++++++++++++ .../_files/categories_with_stores.php | 81 +++++++++++++++++++ .../_files/product_with_stores.php | 46 +++++++++++ 3 files changed, 208 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php create mode 100644 dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php create mode 100644 dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores.php diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php new file mode 100644 index 0000000000000..a348a3eca2b74 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php @@ -0,0 +1,81 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CatalogUrlRewrite\Model\Product; + +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Category; +use Magento\CatalogUrlRewrite\Model\ObjectRegistryFactory; +use Magento\Framework\ObjectManagerInterface; +use Magento\Store\Model\Store; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; + +/**3 + * Verify generate url rewrites for anchor categories. + */ +class AnchorUrlRewriteGeneratorTest extends TestCase +{ + + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @var ProductRepositoryInterface + */ + private $productRepository; + + /** + * @var Category + */ + private $collectionCategory; + + /** + * @var ObjectRegistryFactory + */ + private $objectRegistryFactory; + + /** + * @inheritDoc + */ + public function setUp() + { + parent::setUp(); // TODO: Change the autogenerated stub + + $this->objectManager = Bootstrap::getObjectManager(); + $this->productRepository = $this->objectManager->create(ProductRepositoryInterface::class); + $this->collectionCategory = $this->objectManager->create(Category::class); + $this->objectRegistryFactory = $this->objectManager->create(ObjectRegistryFactory::class); + } + + /** + * Verify correct generate of the relative "StoreId" + * + * @magentoDataFixture Magento/CatalogUrlRewrite/_files/product_with_stores.php + * @magentoDbIsolation disabled + * + * @return void + */ + public function testGenerate(): void + { + $product = $this->productRepository->get('simple'); + $categories = $product->getCategoryCollection(); + $productCategories = $this->objectRegistryFactory->create(['entities' => $categories]); + + /** @var Store $store */ + $store = Bootstrap::getObjectManager()->get(Store::class); + $store->load('fixture_second_store', 'code'); + + /** @var AnchorUrlRewriteGenerator $generator */ + $generator = $this->objectManager->get(AnchorUrlRewriteGenerator::class); + + $this->assertEquals([], $generator->generate(1, $product, $productCategories)); + $this->assertNotEquals([], $generator->generate($store->getId(), $product, $productCategories)); + } +} diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php new file mode 100644 index 0000000000000..7ac0487478d57 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php @@ -0,0 +1,81 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Backend\App\Area\FrontNameResolver; +use Magento\Catalog\Model\Category; +use Magento\Store\Model\Store; +use Magento\TestFramework\Helper\Bootstrap; + +require __DIR__ . '/../../../Magento/Store/_files/second_store.php'; +Bootstrap::getInstance() + ->loadArea(FrontNameResolver::AREA_CODE); + +/** + * After installation system has categories: + * + * root one with ID:1 and Default category with ID:3 both with StoreId:1, + * + * root one with ID:1 and Default category with ID:2 both with StoreId:2 + */ + +$store = Bootstrap::getObjectManager()->get(Store::class); +$store->load('fixture_second_store', 'code'); + +/** @var $category Category */ +$category = Bootstrap::getObjectManager()->create(Category::class); +$category->isObjectNew(true); +$category->setId(3) + ->setName('Category 1') + ->setParentId(1) + ->setPath('1/2') + ->setLevel(1) + ->setAvailableSortBy('name') + ->setDefaultSortBy('name') + ->setIsActive(true) + ->setPosition(1) + ->save(); + +$category = Bootstrap::getObjectManager()->create(Category::class); +$category->isObjectNew(true); +$category->setId(4) + ->setName('Category 1.1') + ->setParentId(3) + ->setPath('1/2/3') + ->setLevel(2) + ->setAvailableSortBy('name') + ->setDefaultSortBy('name') + ->setIsActive(true) + ->setPosition(1) + ->save(); + +$category = Bootstrap::getObjectManager()->create(Category::class); +$category->isObjectNew(true); +$category->setId(3) + ->setName('Category 1') + ->setParentId(2) + ->setPath('1/2/3') + ->setLevel(2) + ->setAvailableSortBy('name') + ->setDefaultSortBy('name') + ->setStoreId($store->getId()) + ->setIsActive(true) + ->setPosition(1) + ->save(); + +$category = Bootstrap::getObjectManager()->create(Category::class); +$category->isObjectNew(true); +$category->setId(4) + ->setName('Category 1.1') + ->setParentId(3) + ->setPath('1/2/3/4') + ->setLevel(3) + ->setAvailableSortBy('name') + ->setDefaultSortBy('name') + ->setStoreId($store->getId()) + ->setIsActive(true) + ->setPosition(1) + ->save(); diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores.php new file mode 100644 index 0000000000000..bcc7c9ed313d3 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores.php @@ -0,0 +1,46 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +/** @var \Magento\Catalog\Setup\CategorySetup $installer */ +$installer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + \Magento\Catalog\Setup\CategorySetup::class +); +require __DIR__ . '/categories_with_stores.php'; + +$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); +$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class); +$categoryLinkRepository = $objectManager->create( + \Magento\Catalog\Api\CategoryLinkRepositoryInterface::class, + [ + 'productRepository' => $productRepository + ] +); + +/** @var Magento\Catalog\Api\CategoryLinkManagementInterface $linkManagement */ +$categoryLinkManagement = $objectManager->create( + \Magento\Catalog\Api\CategoryLinkManagementInterface::class, + [ + 'productRepository' => $productRepository, + 'categoryLinkRepository' => $categoryLinkRepository + ] +); + +/** @var $product \Magento\Catalog\Model\Product */ +$product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Catalog\Model\Product::class); +$product->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE) + ->setAttributeSetId($installer->getAttributeSetId('catalog_product', 'Default')) + ->setStoreId(1) + ->setWebsiteIds([1]) + ->setName('Simple Product') + ->setSku('simple') + ->setPrice(10) + ->setWeight(18) + ->setStockData(['use_config_manage_stock' => 0]) + ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH) + ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) + ->save(); +$categoryLinkManagement->assignProductToCategories($product->getSku(), [4]); From 0b941218dcc86dcbd518f5400934e995ad1f2e3c Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Fri, 14 Feb 2020 10:20:18 +0200 Subject: [PATCH 051/153] Minor change --- .../Product/AnchorUrlRewriteGeneratorTest.php | 60 +++++++++++++------ .../Product/AnchorUrlRewriteGeneratorTest.php | 2 +- .../_files/categories_with_stores.php | 3 +- 3 files changed, 44 insertions(+), 21 deletions(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php index 8eb46f912d491..d8fec2de0e46e 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Product/AnchorUrlRewriteGeneratorTest.php @@ -3,53 +3,67 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\CatalogUrlRewrite\Test\Unit\Model\Product; +use Magento\Catalog\Api\CategoryRepositoryInterface; +use Magento\Catalog\Model\Product; +use Magento\CatalogUrlRewrite\Model\ObjectRegistry; +use Magento\CatalogUrlRewrite\Model\Product\AnchorUrlRewriteGenerator; +use Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator; use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; +use Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory; +use PHPUnit\Framework\TestCase; +use PHPUnit_Framework_MockObject_MockObject as MockObject; -class AnchorUrlRewriteGeneratorTest extends \PHPUnit\Framework\TestCase +class AnchorUrlRewriteGeneratorTest extends TestCase { - /** @var \Magento\CatalogUrlRewrite\Model\Product\AnchorUrlRewriteGenerator */ + /** @var AnchorUrlRewriteGenerator */ protected $anchorUrlRewriteGenerator; - /** @var \Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ProductUrlPathGenerator|MockObject */ protected $productUrlPathGenerator; - /** @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Product|MockObject */ protected $product; - /** @var \Magento\Catalog\Api\CategoryRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var CategoryRepositoryInterface|MockObject */ private $categoryRepositoryInterface; - /** @var \Magento\CatalogUrlRewrite\Model\ObjectRegistry|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ObjectRegistry|MockObject */ protected $categoryRegistry; - /** @var \Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var UrlRewriteFactory|MockObject */ protected $urlRewriteFactory; - /** @var \Magento\UrlRewrite\Service\V1\Data\UrlRewrite|\PHPUnit_Framework_MockObject_MockObject */ + /** @var UrlRewrite|MockObject */ protected $urlRewrite; + /** + * @inheritDoc + */ protected function setUp() { - $this->urlRewriteFactory = $this->getMockBuilder(\Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory::class) + $this->urlRewriteFactory = $this->getMockBuilder(UrlRewriteFactory::class) ->setMethods(['create']) ->disableOriginalConstructor()->getMock(); - $this->urlRewrite = $this->getMockBuilder(\Magento\UrlRewrite\Service\V1\Data\UrlRewrite::class) + $this->urlRewrite = $this->getMockBuilder(UrlRewrite::class) ->disableOriginalConstructor()->getMock(); - $this->product = $this->getMockBuilder(\Magento\Catalog\Model\Product::class) + $this->product = $this->getMockBuilder(Product::class) ->disableOriginalConstructor()->getMock(); $this->categoryRepositoryInterface = $this->getMockBuilder( - \Magento\Catalog\Api\CategoryRepositoryInterface::class + CategoryRepositoryInterface::class )->disableOriginalConstructor()->getMock(); - $this->categoryRegistry = $this->getMockBuilder(\Magento\CatalogUrlRewrite\Model\ObjectRegistry::class) + $this->categoryRegistry = $this->getMockBuilder(ObjectRegistry::class) ->disableOriginalConstructor()->getMock(); $this->productUrlPathGenerator = $this->getMockBuilder( - \Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator::class + ProductUrlPathGenerator::class )->disableOriginalConstructor()->getMock(); $this->anchorUrlRewriteGenerator = (new ObjectManager($this))->getObject( - \Magento\CatalogUrlRewrite\Model\Product\AnchorUrlRewriteGenerator::class, + AnchorUrlRewriteGenerator::class, [ 'productUrlPathGenerator' => $this->productUrlPathGenerator, 'urlRewriteFactory' => $this->urlRewriteFactory, @@ -58,7 +72,12 @@ protected function setUp() ); } - public function testGenerateEmpty() + /** + * Verify generate if category registry list is empty. + * + * @return void + */ + public function testGenerateEmpty(): void { $this->categoryRegistry->expects($this->any())->method('getList')->will($this->returnValue([])); @@ -68,7 +87,12 @@ public function testGenerateEmpty() ); } - public function testGenerateCategories() + /** + * Verify generate product rewrites for anchor categories. + * + * @return void + */ + public function testGenerateCategories(): void { $urlPathWithCategory = 'category1/category2/category3/simple-product.html'; $storeId = 10; @@ -102,7 +126,7 @@ public function testGenerateCategories() ->withConsecutive( [$categoryIds[0], $storeId], [$categoryIds[1], $storeId], - [$categoryIds[2], $storeId], + [$categoryIds[2], $storeId] ) ->will($this->returnValue($category)); $this->categoryRegistry->expects($this->any())->method('getList') diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php index a348a3eca2b74..32eee8dd78250 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php @@ -15,7 +15,7 @@ use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; -/**3 +/** * Verify generate url rewrites for anchor categories. */ class AnchorUrlRewriteGeneratorTest extends TestCase diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php index 7ac0487478d57..6794316b4bb93 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php @@ -11,8 +11,7 @@ use Magento\TestFramework\Helper\Bootstrap; require __DIR__ . '/../../../Magento/Store/_files/second_store.php'; -Bootstrap::getInstance() - ->loadArea(FrontNameResolver::AREA_CODE); +Bootstrap::getInstance()->loadArea(FrontNameResolver::AREA_CODE); /** * After installation system has categories: From b0c0c59900b4ddf8d70cf2ae9c9ec12805d13908 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Mon, 17 Feb 2020 13:48:51 +0200 Subject: [PATCH 052/153] Cover MFTF test --- ...rSubCategoryWithoutRedirectActionGroup.xml | 21 +++++ .../Catalog/Test/Mftf/Data/CategoryData.xml | 16 ++++ ...roductRewriteUrlSubCategoryActionGroup.xml | 22 +++++ ...ateCategoryProductUrlRewriteConfigData.xml | 8 ++ .../AdminRewriteProductWithTwoStoreTest.xml | 80 +++++++++++++++++++ 5 files changed, 147 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml create mode 100644 app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml create mode 100644 app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml new file mode 100644 index 0000000000000..4f0b87937baa9 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" extends="ChangeSeoUrlKeyForSubCategoryActionGroup"> + <annotations> + <description>Requires navigation to subcategory creation/edit. Updates the Search Engine Optimization with uncheck Redirect Checkbox .</description> + </annotations> + <arguments> + <argument name="value" type="string"/> + </arguments> + + <uncheckOption selector="{{AdminCategorySEOSection.UrlKeyRedirectCheckbox}}" stepKey="uncheckRedirectCheckbox" after="enterURLKey"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml index 6ffb4e1902424..e766a233c401c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml @@ -110,6 +110,22 @@ <data key="is_active">false</data> <data key="include_in_menu">false</data> </entity> + <entity name="_defaultCategoryDifferentUrlStore" type="category"> + <data key="name" unique="suffix">SimpleCategory</data> + <data key="name_lwr" unique="suffix">simplecategory</data> + <data key="is_active">true</data> + <data key="url_key_default_store" unique="suffix">default-simplecategory</data> + <data key="url_key_custom_store" unique="suffix">custom-simplecategory</data> + </entity> + <entity name="SimpleSubCategoryDifferentUrlStore" type="category"> + <data key="name" unique="suffix">SimpleSubCategory</data> + <data key="name_lwr" unique="suffix">simplesubcategory</data> + <data key="is_active">true</data> + <data key="url_key_default_store" unique="suffix">default-simplesubcategory</data> + <data key="url_key_custom_store" unique="suffix">custom-simplesubcategory</data> + <data key="include_in_menu">true</data> + <var key="parent_id" entityType="category" entityKey="id" /> + </entity> <!-- Category from file "prepared-for-sample-data.csv"--> <entity name="Gear" type="category"> <data key="name">Gear</data> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml new file mode 100644 index 0000000000000..8c0519d08545c --- /dev/null +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontAssertProductRewriteUrlSubCategoryActionGroup"> + <annotations> + <description>Validates that the provided Product Title is present on the Rewrite URL with a subcategory page.</description> + </annotations> + <arguments> + <argument name="category" defaultValue="_defaultCategory"/> + <argument name="subCategory" defaultValue="SimpleSubCategory"/> + <argument name="product" defaultValue="SimpleProduct" /> + </arguments> + + <amOnPage url="{{category.url_key_default_store}}/{{subCategory.url_key_default_store}}/{{product.urlKey}}2.html" stepKey="goToProductPage"/> + <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{product.name}}" stepKey="seeProductNameInStoreFront"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Data/GenerateCategoryProductUrlRewriteConfigData.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Data/GenerateCategoryProductUrlRewriteConfigData.xml index 10d2213b64717..9ce6d397a551b 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Data/GenerateCategoryProductUrlRewriteConfigData.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Data/GenerateCategoryProductUrlRewriteConfigData.xml @@ -19,4 +19,12 @@ <data key="label">No</data> <data key="value">0</data> </entity> + <entity name="EnableCategoriesPathProductUrls"> + <data key="path">catalog/seo/product_use_categories</data> + <data key="value">1</data> + </entity> + <entity name="DisableCategoriesPathProductUrls"> + <data key="path">catalog/seo/product_use_categories</data> + <data key="value">0</data> + </entity> </entities> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml new file mode 100644 index 0000000000000..2f421276b1889 --- /dev/null +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminRewriteProductWithTwoStoreTest"> + <annotations> + <title value="Rewriting URL of product"/> + <description value="Rewriting URL of product. Verify the full URL address"/> + <group value="CatalogUrlRewrite"/> + </annotations> + + <before> + <magentoCLI command="config:set {{EnableCategoriesPathProductUrls.path}} {{EnableCategoriesPathProductUrls.value}}" stepKey="enableUseCategoriesPath"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" /> + <createData entity="_defaultCategoryDifferentUrlStore" stepKey="defaultCategory"/> + <createData entity="SimpleSubCategoryDifferentUrlStore" stepKey="subCategory"> + <requiredEntity createDataKey="defaultCategory"/> + </createData> + <createData entity="SimpleProduct" stepKey="simpleProduct"> + <requiredEntity createDataKey="subCategory"/> + </createData> + </before> + + <after> + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"/> + <actionGroup ref="logout" stepKey="logout"/> + <deleteData createDataKey="subCategory" stepKey="deleteSubCategory"/> + <deleteData createDataKey="defaultCategory" stepKey="deleteNewRootCategory"/> + + <magentoCLI command="config:set {{DisableCategoriesPathProductUrls.path}} {{DisableCategoriesPathProductUrls.value}}" stepKey="disableUseCategoriesPath"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </after> + + <actionGroup ref="NavigateToCreatedCategoryActionGroup" stepKey="navigateToCreatedDefaultCategory"> + <argument name="Category" value="$$defaultCategory$$"/> + </actionGroup> + <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchDefaultStoreViewForDefaultCategory"> + <argument name="storeView" value="_defaultStore.name"/> + </actionGroup> + <actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForDefaultCategoryDefaultStore"> + <argument name="value" value="{{_defaultCategoryDifferentUrlStore.url_key_default_store}}"/> + </actionGroup> + <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchCustomStoreViewForDefaultCategory"> + <argument name="storeView" value="customStore.name"/> + </actionGroup> + <actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForDefaultCategoryCustomStore"> + <argument name="value" value="{{_defaultCategoryDifferentUrlStore.url_key_custom_store}}"/> + </actionGroup> + + <actionGroup ref="NavigateToCreatedCategoryActionGroup" stepKey="navigateToCreatedSubCategory"> + <argument name="Category" value="$$subCategory$$"/> + </actionGroup> + <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchDefaultStoreViewForSubCategory"> + <argument name="storeView" value="_defaultStore.name"/> + </actionGroup> + <actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForSubCategoryDefaultStore"> + <argument name="value" value="{{SimpleSubCategoryDifferentUrlStore.url_key_default_store}}"/> + </actionGroup> + <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchCustomStoreViewForSubCategory"> + <argument name="storeView" value="customStore.name"/> + </actionGroup> + <actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForSubCategoryCustomStore"> + <argument name="value" value="{{SimpleSubCategoryDifferentUrlStore.url_key_custom_store}}"/> + </actionGroup> + + <actionGroup ref="StorefrontAssertProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrl"> + <argument name="category" value="_defaultCategoryDifferentUrlStore"/> + <argument name="subCategory" value="SimpleSubCategoryDifferentUrlStore" /> + <argument name="product" value="SimpleProduct" /> + </actionGroup> + + </test> +</tests> From 531e1b596c00eddd4af774c8d3a5ea998f409600 Mon Sep 17 00:00:00 2001 From: solwininfotech <info@solwininfotech.com> Date: Mon, 17 Feb 2020 17:58:01 +0530 Subject: [PATCH 053/153] resolved merge conflict --- app/code/Magento/Customer/etc/adminhtml/system.xml | 3 +++ app/code/Magento/Customer/etc/config.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/code/Magento/Customer/etc/adminhtml/system.xml b/app/code/Magento/Customer/etc/adminhtml/system.xml index 6234c2a84ac83..fca625d847a1d 100644 --- a/app/code/Magento/Customer/etc/adminhtml/system.xml +++ b/app/code/Magento/Customer/etc/adminhtml/system.xml @@ -86,6 +86,9 @@ <comment>To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes.</comment> <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> </field> + <field id="email_domain" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <label>Default Email Domain</label> + </field> <field id="email_template" translate="label comment" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> <label>Default Welcome Email</label> <comment>Email template chosen based on theme fallback when "Default" option is selected.</comment> diff --git a/app/code/Magento/Customer/etc/config.xml b/app/code/Magento/Customer/etc/config.xml index db04ad7c94963..ab2020580a2eb 100644 --- a/app/code/Magento/Customer/etc/config.xml +++ b/app/code/Magento/Customer/etc/config.xml @@ -23,6 +23,7 @@ <email_confirmed_template>customer_create_account_email_confirmed_template</email_confirmed_template> <viv_disable_auto_group_assign_default>0</viv_disable_auto_group_assign_default> <vat_frontend_visibility>0</vat_frontend_visibility> + <email_domain>example.com</email_domain> <generate_human_friendly_id>0</generate_human_friendly_id> </create_account> <default> From 28fa34531f4c7cd4bcad46500ba027b9b58ff297 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Mon, 17 Feb 2020 17:11:51 +0200 Subject: [PATCH 054/153] Minor change --- ...tProductRewriteUrlSubCategoryActionGroup.xml | 5 ++--- .../AdminRewriteProductWithTwoStoreTest.xml | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml index 8c0519d08545c..4e72c7f704866 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml @@ -11,12 +11,11 @@ <description>Validates that the provided Product Title is present on the Rewrite URL with a subcategory page.</description> </annotations> <arguments> - <argument name="category" defaultValue="_defaultCategory"/> - <argument name="subCategory" defaultValue="SimpleSubCategory"/> + <argument name="category" type="string" defaultValue="simplecategory"/> <argument name="product" defaultValue="SimpleProduct" /> </arguments> - <amOnPage url="{{category.url_key_default_store}}/{{subCategory.url_key_default_store}}/{{product.urlKey}}2.html" stepKey="goToProductPage"/> + <amOnPage url="{{category}}/{{product.urlKey}}2.html" stepKey="goToProductPage"/> <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{product.name}}" stepKey="seeProductNameInStoreFront"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml index 2f421276b1889..ac9b3f573deba 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml @@ -31,9 +31,8 @@ <after> <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"/> <actionGroup ref="logout" stepKey="logout"/> - <deleteData createDataKey="subCategory" stepKey="deleteSubCategory"/> + <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="defaultCategory" stepKey="deleteNewRootCategory"/> - <magentoCLI command="config:set {{DisableCategoriesPathProductUrls.path}} {{DisableCategoriesPathProductUrls.value}}" stepKey="disableUseCategoriesPath"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> </after> @@ -70,9 +69,17 @@ <argument name="value" value="{{SimpleSubCategoryDifferentUrlStore.url_key_custom_store}}"/> </actionGroup> - <actionGroup ref="StorefrontAssertProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrl"> - <argument name="category" value="_defaultCategoryDifferentUrlStore"/> - <argument name="subCategory" value="SimpleSubCategoryDifferentUrlStore" /> + <actionGroup ref="StorefrontAssertProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrlDefaultStore"> + <argument name="category" value="{{_defaultCategoryDifferentUrlStore.url_key_default_store}}"/> + <argument name="product" value="SimpleProduct" /> + </actionGroup> + + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStore"> + <argument name="storeView" value="customStore" /> + </actionGroup> + + <actionGroup ref="StorefrontAssertProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrlCustomStore"> + <argument name="category" value="{{_defaultCategoryDifferentUrlStore.url_key_custom_store}}"/> <argument name="product" value="SimpleProduct" /> </actionGroup> From 6c5fbcb16196a5e7757fe82c77f358da3aae1678 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Thu, 20 Feb 2020 12:01:14 +0200 Subject: [PATCH 055/153] Changed implements class --- .../Sales/Controller/Adminhtml/Order/Create/Reorder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php index 481fa669b72d3..925e8bfdd05aa 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php @@ -12,6 +12,7 @@ use Magento\Backend\Model\View\Result\ForwardFactory; use Magento\Backend\Model\View\Result\Redirect; use Magento\Catalog\Helper\Product; +use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\Escaper; use Magento\Framework\View\Result\PageFactory; use Magento\Sales\Api\OrderRepositoryInterface; @@ -19,12 +20,11 @@ use Magento\Sales\Helper\Reorder as ReorderHelper; use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Reorder\UnavailableProductsProvider; -use Magento\Framework\App\Action\HttpPostActionInterface; /** * Controller create order. */ -class Reorder extends Create implements HttpPostActionInterface +class Reorder extends Create implements HttpGetActionInterface { /** * @var UnavailableProductsProvider From 6a8a103ce27d872e5687402a50ba6e594ae82194 Mon Sep 17 00:00:00 2001 From: Alexander Aleman <a.aleman@xsarus.nl> Date: Fri, 21 Feb 2020 10:39:36 +0100 Subject: [PATCH 056/153] Do not escape custom attributes --- .../Magento/Catalog/view/frontend/templates/product/image.phtml | 2 +- .../view/frontend/templates/product/image_with_borders.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml index 5a31f3d125c81..ef2ba856fad84 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml @@ -7,7 +7,7 @@ <?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?> <img class="photo image <?= $block->escapeHtmlAttr($block->getClass()) ?>" - <?= $block->escapeHtml($block->getCustomAttributes()) ?> + <?= /* @noEscape */ $block->getCustomAttributes() ?> src="<?= $block->escapeUrl($block->getImageUrl()) ?>" width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>" diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml index 33f7620f1a1f5..8d0cd0294c48e 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml @@ -11,7 +11,7 @@ <span class="product-image-wrapper" style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;"> <img class="<?= $block->escapeHtmlAttr($block->getClass()) ?>" - <?= $block->escapeHtmlAttr($block->getCustomAttributes()) ?> + <?= /* @noEscape */ $block->getCustomAttributes() ?> src="<?= $block->escapeUrl($block->getImageUrl()) ?>" max-width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" max-height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>" From 4d3a05d101723432d8610160552b563c25cc3703 Mon Sep 17 00:00:00 2001 From: Alexander Aleman <a.aleman@xsarus.nl> Date: Fri, 21 Feb 2020 10:45:36 +0100 Subject: [PATCH 057/153] Custom attributes can not be escaped in the current form --- .../Magento/Catalog/view/frontend/templates/product/image.phtml | 2 +- .../view/frontend/templates/product/image_with_borders.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml index ef2ba856fad84..2a251b00521d8 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml @@ -7,7 +7,7 @@ <?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?> <img class="photo image <?= $block->escapeHtmlAttr($block->getClass()) ?>" - <?= /* @noEscape */ $block->getCustomAttributes() ?> + <?= /* @escapeNotVerified */ $block->getCustomAttributes() ?> src="<?= $block->escapeUrl($block->getImageUrl()) ?>" width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>" diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml index 8d0cd0294c48e..32d5ec8b288a9 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml @@ -11,7 +11,7 @@ <span class="product-image-wrapper" style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;"> <img class="<?= $block->escapeHtmlAttr($block->getClass()) ?>" - <?= /* @noEscape */ $block->getCustomAttributes() ?> + <?= /* @escapeNotVerified */ $block->getCustomAttributes() ?> src="<?= $block->escapeUrl($block->getImageUrl()) ?>" max-width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" max-height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>" From b0ccd4f9fed45147101195d71a7af298d4d8ff4b Mon Sep 17 00:00:00 2001 From: Alexander Aleman <a.aleman@xsarus.nl> Date: Fri, 21 Feb 2020 12:13:24 +0100 Subject: [PATCH 058/153] correctly handle escaping --- .../Magento/Catalog/Block/Product/Image.php | 2 +- .../Catalog/Block/Product/ImageFactory.php | 21 ++----------------- .../frontend/templates/product/image.phtml | 6 +++++- .../product/image_with_borders.phtml | 6 +++++- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Product/Image.php b/app/code/Magento/Catalog/Block/Product/Image.php index 7a7f9c0affc7d..ccc37029bedf7 100644 --- a/app/code/Magento/Catalog/Block/Product/Image.php +++ b/app/code/Magento/Catalog/Block/Product/Image.php @@ -14,7 +14,7 @@ * @method string getHeight() * @method string getLabel() * @method float getRatio() - * @method string getCustomAttributes() + * @method array getCustomAttributes() * @method string getClass() * @since 100.0.2 */ diff --git a/app/code/Magento/Catalog/Block/Product/ImageFactory.php b/app/code/Magento/Catalog/Block/Product/ImageFactory.php index 172cd794edfb9..2a0b31ec50942 100644 --- a/app/code/Magento/Catalog/Block/Product/ImageFactory.php +++ b/app/code/Magento/Catalog/Block/Product/ImageFactory.php @@ -67,23 +67,6 @@ public function __construct( $this->imageParamsBuilder = $imageParamsBuilder; } - /** - * Retrieve image custom attributes for HTML element - * - * @param array $attributes - * @return string - */ - private function getStringCustomAttributes(array $attributes): string - { - $result = []; - foreach ($attributes as $name => $value) { - if ($name != 'class') { - $result[] = $name . '="' . $value . '"'; - } - } - return !empty($result) ? implode(' ', $result) : ''; - } - /** * Retrieve image class for HTML element * @@ -161,7 +144,7 @@ public function create(Product $product, string $imageId, array $attributes = nu } $attributes = $attributes === null ? [] : $attributes; - + $data = [ 'data' => [ 'template' => 'Magento_Catalog::product/image_with_borders.phtml', @@ -170,7 +153,7 @@ public function create(Product $product, string $imageId, array $attributes = nu 'height' => $imageMiscParams['image_height'], 'label' => $this->getLabel($product, $imageMiscParams['image_type']), 'ratio' => $this->getRatio($imageMiscParams['image_width'], $imageMiscParams['image_height']), - 'custom_attributes' => $this->getStringCustomAttributes($attributes), + 'custom_attributes' => $attributes, 'class' => $this->getClass($attributes), 'product_id' => $product->getId() ], diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml index 2a251b00521d8..abd8038d266d9 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml @@ -7,7 +7,11 @@ <?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?> <img class="photo image <?= $block->escapeHtmlAttr($block->getClass()) ?>" - <?= /* @escapeNotVerified */ $block->getCustomAttributes() ?> + <?php foreach ($block->getCustomAttributes() as $name => $value): ?> + <?php if ($name !== 'class'): ?> + <?= $block->escapeHtmlAttr($name) ?>="<?= $block->escapeHtmlAttr($value) ?>" + <?php endif; ?> + <?php endforeach; ?> src="<?= $block->escapeUrl($block->getImageUrl()) ?>" width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>" diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml index 32d5ec8b288a9..0ea0ef1aa7a95 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml @@ -11,7 +11,11 @@ <span class="product-image-wrapper" style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;"> <img class="<?= $block->escapeHtmlAttr($block->getClass()) ?>" - <?= /* @escapeNotVerified */ $block->getCustomAttributes() ?> + <?php foreach ($block->getCustomAttributes() as $name => $value): ?> + <?php if ($name !== 'class'): ?> + <?= $block->escapeHtmlAttr($name) ?>="<?= $block->escapeHtmlAttr($value) ?>" + <?php endif; ?> + <?php endforeach; ?> src="<?= $block->escapeUrl($block->getImageUrl()) ?>" max-width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" max-height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>" From 79025f879e94c8b409a7d792588e4fe30ea14f36 Mon Sep 17 00:00:00 2001 From: Alexander Aleman <a.aleman@xsarus.nl> Date: Fri, 21 Feb 2020 13:18:08 +0100 Subject: [PATCH 059/153] Filter custom attributes and add changes to unit test --- .../Catalog/Block/Product/ImageFactory.php | 18 +++++++++++++++++- .../Unit/Block/Product/ImageFactoryTest.php | 7 +++++-- .../frontend/templates/product/image.phtml | 4 +--- .../templates/product/image_with_borders.phtml | 4 +--- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Product/ImageFactory.php b/app/code/Magento/Catalog/Block/Product/ImageFactory.php index 2a0b31ec50942..f025417095f29 100644 --- a/app/code/Magento/Catalog/Block/Product/ImageFactory.php +++ b/app/code/Magento/Catalog/Block/Product/ImageFactory.php @@ -67,6 +67,20 @@ public function __construct( $this->imageParamsBuilder = $imageParamsBuilder; } + /** + * Remove class from custom attributes + * + * @param array $attributes + * @return array + */ + private function filterCustomAttributes(array $attributes): array + { + if (isset($attributes['class'])) { + unset($attributes['class']); + } + return $attributes; + } + /** * Retrieve image class for HTML element * @@ -153,7 +167,7 @@ public function create(Product $product, string $imageId, array $attributes = nu 'height' => $imageMiscParams['image_height'], 'label' => $this->getLabel($product, $imageMiscParams['image_type']), 'ratio' => $this->getRatio($imageMiscParams['image_width'], $imageMiscParams['image_height']), - 'custom_attributes' => $attributes, + 'custom_attributes' => $this->filterCustomAttributes($attributes), 'class' => $this->getClass($attributes), 'product_id' => $product->getId() ], @@ -161,4 +175,6 @@ public function create(Product $product, string $imageId, array $attributes = nu return $this->objectManager->create(ImageBlock::class, $data); } + + } diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/ImageFactoryTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/ImageFactoryTest.php index 95b06e40602bf..5a6fff4c729b2 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/ImageFactoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/ImageFactoryTest.php @@ -144,7 +144,7 @@ private function getTestDataWithoutAttributes(): array 'height' => 100, 'label' => 'test_image_label', 'ratio' => 1, - 'custom_attributes' => '', + 'custom_attributes' => [], 'product_id' => null, 'class' => 'product-image-photo' ], @@ -202,7 +202,10 @@ private function getTestDataWithAttributes(): array 'height' => 50, 'label' => 'test_product_name', 'ratio' => 0.5, // <== - 'custom_attributes' => 'name_1="value_1" name_2="value_2"', + 'custom_attributes' => [ + 'name_1' => 'value_1', + 'name_2' => 'value_2', + ], 'product_id' => null, 'class' => 'my-class' ], diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml index abd8038d266d9..fcda005c655f9 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml @@ -8,9 +8,7 @@ <img class="photo image <?= $block->escapeHtmlAttr($block->getClass()) ?>" <?php foreach ($block->getCustomAttributes() as $name => $value): ?> - <?php if ($name !== 'class'): ?> - <?= $block->escapeHtmlAttr($name) ?>="<?= $block->escapeHtmlAttr($value) ?>" - <?php endif; ?> + <?= $block->escapeHtmlAttr($name) ?>="<?= $block->escapeHtmlAttr($value) ?>" <?php endforeach; ?> src="<?= $block->escapeUrl($block->getImageUrl()) ?>" width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml index 0ea0ef1aa7a95..6dcadfd2e4412 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml @@ -12,9 +12,7 @@ style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;"> <img class="<?= $block->escapeHtmlAttr($block->getClass()) ?>" <?php foreach ($block->getCustomAttributes() as $name => $value): ?> - <?php if ($name !== 'class'): ?> - <?= $block->escapeHtmlAttr($name) ?>="<?= $block->escapeHtmlAttr($value) ?>" - <?php endif; ?> + <?= $block->escapeHtmlAttr($name) ?>="<?= $block->escapeHtmlAttr($value) ?>" <?php endforeach; ?> src="<?= $block->escapeUrl($block->getImageUrl()) ?>" max-width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" From 5e84595da92ba3788edac27d8f35bc9a0e0e9d27 Mon Sep 17 00:00:00 2001 From: Alexander Aleman <a.aleman@xsarus.nl> Date: Fri, 21 Feb 2020 13:19:59 +0100 Subject: [PATCH 060/153] Remove empty lines --- app/code/Magento/Catalog/Block/Product/ImageFactory.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Product/ImageFactory.php b/app/code/Magento/Catalog/Block/Product/ImageFactory.php index f025417095f29..1dd55f75bdd0e 100644 --- a/app/code/Magento/Catalog/Block/Product/ImageFactory.php +++ b/app/code/Magento/Catalog/Block/Product/ImageFactory.php @@ -175,6 +175,4 @@ public function create(Product $product, string $imageId, array $attributes = nu return $this->objectManager->create(ImageBlock::class, $data); } - - } From afac7ead70c7c11329c56d3264ee51df655dc995 Mon Sep 17 00:00:00 2001 From: alexander-aleman <35915533+alexander-aleman@users.noreply.github.com> Date: Sat, 22 Feb 2020 10:36:36 +0100 Subject: [PATCH 061/153] Update expectation for return type of getCustomAttributes --- .../Magento/Swatches/Block/Product/ListProductTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Swatches/Block/Product/ListProductTest.php b/dev/tests/integration/testsuite/Magento/Swatches/Block/Product/ListProductTest.php index 460e4559a0e84..e6f566ac156db 100644 --- a/dev/tests/integration/testsuite/Magento/Swatches/Block/Product/ListProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Swatches/Block/Product/ListProductTest.php @@ -166,7 +166,7 @@ private function assertProductImage(array $images, string $area, array $expectat $this->updateProductImages($images); $productImage = $this->listingBlock->getImage($this->productRepository->get('configurable'), $area); $this->assertInstanceOf(Image::class, $productImage); - $this->assertEquals($productImage->getCustomAttributes(), ''); + $this->assertEquals($productImage->getCustomAttributes(), []); $this->assertEquals($productImage->getClass(), 'product-image-photo'); $this->assertEquals($productImage->getRatio(), 1.25); $this->assertEquals($productImage->getLabel(), $expectation['label']); From 5c29e1998e399696046e8562f8ec1a43bfd2ab42 Mon Sep 17 00:00:00 2001 From: Tu Nguyen <ladiesman9x@gmail.com> Date: Mon, 24 Feb 2020 01:11:07 +0700 Subject: [PATCH 062/153] Remove unused requirejs alias resources defined --- app/code/Magento/Theme/view/frontend/requirejs-config.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Theme/view/frontend/requirejs-config.js b/app/code/Magento/Theme/view/frontend/requirejs-config.js index b5ffd358c893b..e14c93d329a07 100644 --- a/app/code/Magento/Theme/view/frontend/requirejs-config.js +++ b/app/code/Magento/Theme/view/frontend/requirejs-config.js @@ -27,9 +27,7 @@ var config = { 'menu': 'mage/menu', 'popupWindow': 'mage/popup-window', 'validation': 'mage/validation/validation', - 'welcome': 'Magento_Theme/js/view/welcome', 'breadcrumbs': 'Magento_Theme/js/view/breadcrumbs', - 'criticalCssLoader': 'Magento_Theme/js/view/critical-css-loader', 'jquery/ui': 'jquery/compat', 'cookieStatus': 'Magento_Theme/js/cookie-status' } From bf514b0b435a75f5688f56f8e9465af9bb3284c1 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Tue, 18 Feb 2020 13:20:32 +0200 Subject: [PATCH 063/153] Refactoring test and add rollback for fixture --- ...SubCategoryWithoutRedirectActionGroup.xml} | 2 +- ...oductRewriteUrlSubCategoryActionGroup.xml} | 2 +- .../AdminRewriteProductWithTwoStoreTest.xml | 15 ++++--- .../Product/AnchorUrlRewriteGeneratorTest.php | 41 ++++++++++++------- .../_files/categories_with_stores.php | 26 ++++++------ .../categories_with_stores_rollback.php | 23 +++++++++++ .../_files/product_with_stores.php | 3 +- .../_files/product_with_stores_rollback.php | 29 +++++++++++++ 8 files changed, 101 insertions(+), 40 deletions(-) rename app/code/Magento/Catalog/Test/Mftf/ActionGroup/{ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml => AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml} (85%) rename app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/{StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml => AssertStorefrontProductRewriteUrlSubCategoryActionGroup.xml} (93%) create mode 100644 dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores_rollback.php create mode 100644 dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores_rollback.php diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml similarity index 85% rename from app/code/Magento/Catalog/Test/Mftf/ActionGroup/ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml index 4f0b87937baa9..fc010cec4cb65 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup.xml @@ -8,7 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" extends="ChangeSeoUrlKeyForSubCategoryActionGroup"> + <actionGroup name="AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" extends="ChangeSeoUrlKeyForSubCategoryActionGroup"> <annotations> <description>Requires navigation to subcategory creation/edit. Updates the Search Engine Optimization with uncheck Redirect Checkbox .</description> </annotations> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/AssertStorefrontProductRewriteUrlSubCategoryActionGroup.xml similarity index 93% rename from app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml rename to app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/AssertStorefrontProductRewriteUrlSubCategoryActionGroup.xml index 4e72c7f704866..4675d3b2669a4 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/StorefrontAssertProductRewriteUrlSubCategoryActionGroup.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/ActionGroup/AssertStorefrontProductRewriteUrlSubCategoryActionGroup.xml @@ -6,7 +6,7 @@ */ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="StorefrontAssertProductRewriteUrlSubCategoryActionGroup"> + <actionGroup name="AssertStorefrontProductRewriteUrlSubCategoryActionGroup"> <annotations> <description>Validates that the provided Product Title is present on the Rewrite URL with a subcategory page.</description> </annotations> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml index ac9b3f573deba..db4811273a5cc 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml @@ -43,13 +43,13 @@ <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchDefaultStoreViewForDefaultCategory"> <argument name="storeView" value="_defaultStore.name"/> </actionGroup> - <actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForDefaultCategoryDefaultStore"> + <actionGroup ref="AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForDefaultCategoryDefaultStore"> <argument name="value" value="{{_defaultCategoryDifferentUrlStore.url_key_default_store}}"/> </actionGroup> <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchCustomStoreViewForDefaultCategory"> <argument name="storeView" value="customStore.name"/> </actionGroup> - <actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForDefaultCategoryCustomStore"> + <actionGroup ref="AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForDefaultCategoryCustomStore"> <argument name="value" value="{{_defaultCategoryDifferentUrlStore.url_key_custom_store}}"/> </actionGroup> @@ -59,17 +59,17 @@ <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchDefaultStoreViewForSubCategory"> <argument name="storeView" value="_defaultStore.name"/> </actionGroup> - <actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForSubCategoryDefaultStore"> + <actionGroup ref="AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForSubCategoryDefaultStore"> <argument name="value" value="{{SimpleSubCategoryDifferentUrlStore.url_key_default_store}}"/> </actionGroup> <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchCustomStoreViewForSubCategory"> <argument name="storeView" value="customStore.name"/> </actionGroup> - <actionGroup ref="ChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForSubCategoryCustomStore"> + + <actionGroup ref="AdminChangeSeoUrlKeyForSubCategoryWithoutRedirectActionGroup" stepKey="changeSeoUrlKeyForSubCategoryCustomStore"> <argument name="value" value="{{SimpleSubCategoryDifferentUrlStore.url_key_custom_store}}"/> </actionGroup> - - <actionGroup ref="StorefrontAssertProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrlDefaultStore"> + <actionGroup ref="AssertStorefrontProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrlDefaultStore"> <argument name="category" value="{{_defaultCategoryDifferentUrlStore.url_key_default_store}}"/> <argument name="product" value="SimpleProduct" /> </actionGroup> @@ -77,8 +77,7 @@ <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStore"> <argument name="storeView" value="customStore" /> </actionGroup> - - <actionGroup ref="StorefrontAssertProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrlCustomStore"> + <actionGroup ref="AssertStorefrontProductRewriteUrlSubCategoryActionGroup" stepKey="validatesRewriteUrlCustomStore"> <argument name="category" value="{{_defaultCategoryDifferentUrlStore.url_key_custom_store}}"/> <argument name="product" value="SimpleProduct" /> </actionGroup> diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php index 32eee8dd78250..446b423e17187 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGeneratorTest.php @@ -8,7 +8,6 @@ namespace Magento\CatalogUrlRewrite\Model\Product; use Magento\Catalog\Api\ProductRepositoryInterface; -use Magento\Catalog\Model\Category; use Magento\CatalogUrlRewrite\Model\ObjectRegistryFactory; use Magento\Framework\ObjectManagerInterface; use Magento\Store\Model\Store; @@ -31,11 +30,6 @@ class AnchorUrlRewriteGeneratorTest extends TestCase */ private $productRepository; - /** - * @var Category - */ - private $collectionCategory; - /** * @var ObjectRegistryFactory */ @@ -50,32 +44,49 @@ public function setUp() $this->objectManager = Bootstrap::getObjectManager(); $this->productRepository = $this->objectManager->create(ProductRepositoryInterface::class); - $this->collectionCategory = $this->objectManager->create(Category::class); $this->objectRegistryFactory = $this->objectManager->create(ObjectRegistryFactory::class); } /** * Verify correct generate of the relative "StoreId" * + * @param string $expect + * @return void + * @throws \Magento\Framework\Exception\LocalizedException + * @throws \Magento\Framework\Exception\NoSuchEntityException * @magentoDataFixture Magento/CatalogUrlRewrite/_files/product_with_stores.php * @magentoDbIsolation disabled - * - * @return void + * @dataProvider getConfigGenerate */ - public function testGenerate(): void + public function testGenerate(string $expect): void { $product = $this->productRepository->get('simple'); $categories = $product->getCategoryCollection(); $productCategories = $this->objectRegistryFactory->create(['entities' => $categories]); - /** @var Store $store */ + /** @var AnchorUrlRewriteGenerator $generator */ + $generator = $this->objectManager->get(AnchorUrlRewriteGenerator::class); + + /** @var $store Store */ $store = Bootstrap::getObjectManager()->get(Store::class); $store->load('fixture_second_store', 'code'); - /** @var AnchorUrlRewriteGenerator $generator */ - $generator = $this->objectManager->get(AnchorUrlRewriteGenerator::class); + $urls = $generator->generate($store->getId(), $product, $productCategories); + + $this->assertEquals($expect, $urls[0]->getRequestPath()); + } - $this->assertEquals([], $generator->generate(1, $product, $productCategories)); - $this->assertNotEquals([], $generator->generate($store->getId(), $product, $productCategories)); + /** + * Data provider for testGenerate + * + * @return array + */ + public function getConfigGenerate(): array + { + return [ + [ + 'expect' => 'category-1-custom/simple-product.html' + ] + ]; } } diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php index 6794316b4bb93..5fc9d75598da6 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores.php @@ -13,14 +13,6 @@ require __DIR__ . '/../../../Magento/Store/_files/second_store.php'; Bootstrap::getInstance()->loadArea(FrontNameResolver::AREA_CODE); -/** - * After installation system has categories: - * - * root one with ID:1 and Default category with ID:3 both with StoreId:1, - * - * root one with ID:1 and Default category with ID:2 both with StoreId:2 - */ - $store = Bootstrap::getObjectManager()->get(Store::class); $store->load('fixture_second_store', 'code'); @@ -29,11 +21,13 @@ $category->isObjectNew(true); $category->setId(3) ->setName('Category 1') - ->setParentId(1) - ->setPath('1/2') - ->setLevel(1) + ->setParentId(2) + ->setPath('1/2/3') + ->setLevel(2) ->setAvailableSortBy('name') ->setDefaultSortBy('name') + ->setUrlPath('category-1-default') + ->setUrlKey('category-1-default') ->setIsActive(true) ->setPosition(1) ->save(); @@ -43,10 +37,12 @@ $category->setId(4) ->setName('Category 1.1') ->setParentId(3) - ->setPath('1/2/3') - ->setLevel(2) + ->setPath('1/2/3/4') + ->setLevel(3) ->setAvailableSortBy('name') ->setDefaultSortBy('name') + ->setUrlPath('category-1-1-default') + ->setUrlKey('category-1-1-default') ->setIsActive(true) ->setPosition(1) ->save(); @@ -61,6 +57,8 @@ ->setAvailableSortBy('name') ->setDefaultSortBy('name') ->setStoreId($store->getId()) + ->setUrlPath('category-1-custom') + ->setUrlKey('category-1-custom') ->setIsActive(true) ->setPosition(1) ->save(); @@ -75,6 +73,8 @@ ->setAvailableSortBy('name') ->setDefaultSortBy('name') ->setStoreId($store->getId()) + ->setUrlPath('category-1-1-custom') + ->setUrlKey('category-1-1-custom') ->setIsActive(true) ->setPosition(1) ->save(); diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores_rollback.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores_rollback.php new file mode 100644 index 0000000000000..a89c80a61ccbc --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores_rollback.php @@ -0,0 +1,23 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +/** @var \Magento\Framework\Registry $registry */ +$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); +$registry = $objectManager->get(\Magento\Framework\Registry::class); + +$registry->unregister('isSecureArea'); +$registry->register('isSecureArea', true); + +/** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */ +$collection = $objectManager->create(\Magento\Catalog\Model\ResourceModel\Category\Collection::class); +$collection + ->addAttributeToFilter('level', 2) + ->load() + ->delete(); + +$registry->unregister('isSecureArea'); +$registry->register('isSecureArea', false); diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores.php index bcc7c9ed313d3..84fa9b3044af9 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores.php +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores.php @@ -9,6 +9,7 @@ $installer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( \Magento\Catalog\Setup\CategorySetup::class ); + require __DIR__ . '/categories_with_stores.php'; $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -33,8 +34,6 @@ $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Catalog\Model\Product::class); $product->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE) ->setAttributeSetId($installer->getAttributeSetId('catalog_product', 'Default')) - ->setStoreId(1) - ->setWebsiteIds([1]) ->setName('Simple Product') ->setSku('simple') ->setPrice(10) diff --git a/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores_rollback.php b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores_rollback.php new file mode 100644 index 0000000000000..86f0ce34af00c --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores_rollback.php @@ -0,0 +1,29 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Framework\Exception\NoSuchEntityException; + +\Magento\TestFramework\Helper\Bootstrap::getInstance()->getInstance()->reinitialize(); + +/** @var \Magento\Framework\Registry $registry */ +$registry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(\Magento\Framework\Registry::class); + +$registry->unregister('isSecureArea'); +$registry->register('isSecureArea', true); + +/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */ +$productRepository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get(\Magento\Catalog\Api\ProductRepositoryInterface::class); +try { + $product = $productRepository->get('simple', true); + if ($product->getId()) { + $productRepository->delete($product); + } +} catch (NoSuchEntityException $e) { +} +$registry->unregister('isSecureArea'); +$registry->register('isSecureArea', false); From 37731349799b541f05e6799bb8f66da23de0d2f7 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Mon, 24 Feb 2020 15:34:18 +0200 Subject: [PATCH 064/153] Mftf test, changed properties visibility --- .../Grid/Column/Renderer/ScheduleStatus.php | 31 +++++---- .../Data/AdminIndexManagementGridData.xml | 13 ++++ .../Section/AdminIndexManagementSection.xml | 2 + ...inSystemIndexManagementGridChangesTest.xml | 63 +++++++++++++++++++ 4 files changed, 96 insertions(+), 13 deletions(-) create mode 100644 app/code/Magento/Indexer/Test/Mftf/Data/AdminIndexManagementGridData.xml create mode 100644 app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php index 7737077609b51..4d90d9c178c12 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php @@ -3,11 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Indexer\Block\Backend\Grid\Column\Renderer; +use Magento\Backend\Block\Context; use Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer; +use Magento\Framework\DataObject; use Magento\Framework\Escaper; use Magento\Framework\Mview\View; +use Magento\Framework\Mview\ViewInterface; use Magento\Framework\Phrase; /** @@ -16,23 +21,23 @@ class ScheduleStatus extends AbstractRenderer { /** - * @var \Magento\Framework\Escaper + * @var Escaper */ - protected $escaper; + private $escaper; /** - * @var \Magento\Framework\Mview\ViewInterface + * @var ViewInterface */ - protected $viewModel; + private $viewModel; - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Framework\Escaper $escaper - * @param \Magento\Framework\Mview\ViewInterface $viewModel - * @param array $data - */ + /** + * @param Context $context + * @param Escaper $escaper + * @param ViewInterface $viewModel + * @param array $data + */ public function __construct( - \Magento\Backend\Block\Context $context, + Context $context, Escaper $escaper, View $viewModel, array $data = [] @@ -45,10 +50,10 @@ public function __construct( /** * Render indexer status * - * @param \Magento\Framework\DataObject $row + * @param DataObject $row * @return string */ - public function render(\Magento\Framework\DataObject $row) + public function render(DataObject $row) { try { if (!$row->getIsScheduled()) { diff --git a/app/code/Magento/Indexer/Test/Mftf/Data/AdminIndexManagementGridData.xml b/app/code/Magento/Indexer/Test/Mftf/Data/AdminIndexManagementGridData.xml new file mode 100644 index 0000000000000..74494ee6b469c --- /dev/null +++ b/app/code/Magento/Indexer/Test/Mftf/Data/AdminIndexManagementGridData.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="AdminIndexManagementGridData"> + <data key="rowProductPrice">Product Price</data> + </entity> +</entities> diff --git a/app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml b/app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml index 020cd9654e36b..825358e74f2af 100644 --- a/app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml +++ b/app/code/Magento/Indexer/Test/Mftf/Section/AdminIndexManagementSection.xml @@ -17,5 +17,7 @@ <element name="indexerStatus" type="text" selector="//tr[descendant::td[contains(., '{{status}}')]]//*[contains(@class, 'col-indexer_status')]/span" parameterized="true"/> <element name="successMessage" type="text" selector="//*[@data-ui-id='messages-message-success']" timeout="120"/> <element name="selectMassAction" type="select" selector="#gridIndexer_massaction-mass-select"/> + <element name="columnScheduleStatus" type="text" selector="//th[contains(@class, 'col-indexer_schedule_status')]"/> + <element name="indexerScheduleStatus" type="text" selector="//tr[contains(.,'{{var1}}')]//td[contains(@class,'col-indexer_schedule_status')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml new file mode 100644 index 0000000000000..75b040a623451 --- /dev/null +++ b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminSystemIndexManagementGridChangesTest"> + <annotations> + <features value="Indexer"/> + <stories value="Menu Navigation"/> + <title value="Admin system index management grid change test"/> + <description value="Verify changes in 'Schedule column' on system index management"/> + </annotations> + <before> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!--Open Index Management Page and Select Index mode "Update by Schedule" --> + <magentoCLI command="indexer:set-mode" arguments="schedule" stepKey="setIndexerModeSchedule"/> + <magentoCLI command="indexer:reindex" stepKey="indexerReindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/></before> + <after> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <magentoCLI command="indexer:set-mode" arguments="realtime" stepKey="setIndexerModeRealTime"/> + <magentoCLI command="indexer:reindex" stepKey="indexerReindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIndexManagementPageFirst"> + <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuSystemToolsIndexManagement.dataUiId}}"/> + </actionGroup> + <grabTextFrom selector="{{AdminIndexManagementSection.indexerScheduleStatus(AdminIndexManagementGridData.rowProductPrice)}}" stepKey="gradScheduleStatusBeforeChange"/> + + <!-- Verify 'Schedule status' column is present --> + <seeElement selector="{{AdminIndexManagementSection.columnScheduleStatus}}" stepKey="seeScheduleStatusColumn"/> + + <!--Adding Special price to product--> + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="openAdminProductEditPage"/> + <actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice"/> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/> + + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIndexManagementPageSecond"> + <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuSystemToolsIndexManagement.dataUiId}}"/> + </actionGroup> + <grabTextFrom selector="{{AdminIndexManagementSection.indexerScheduleStatus(AdminIndexManagementGridData.rowProductPrice)}}" stepKey="gradScheduleStatusAfterChange"/> + + <!-- Verify 'Schedule Status' column changes for 'Product Price' --> + <assertNotEquals stepKey="assertChange"> + <expectedResult type="string">$gradScheduleStatusBeforeChange</expectedResult> + <actualResult type="string">$gradScheduleStatusAfterChange</actualResult> + </assertNotEquals> + </test> +</tests> From 77fee571409509a8f4e6c825a03de4eaf3ce3388 Mon Sep 17 00:00:00 2001 From: AleksLi <aleksliwork@gmail.com> Date: Tue, 25 Feb 2020 22:12:29 +0100 Subject: [PATCH 065/153] MC-26683: Removed get errors of cart allowing to add product to cart --- .../QuoteGraphQl/Model/Cart/AddProductsToCart.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php b/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php index 91c77a1a3ecc5..94fc525209997 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php @@ -54,16 +54,6 @@ public function execute(Quote $cart, array $cartItems): void $this->addProductToCart->execute($cart, $cartItemData); } - if ($cart->getData('has_error')) { - $e = new GraphQlInputException(__('Shopping cart errors')); - $errors = $cart->getErrors(); - foreach ($errors as $error) { - /** @var MessageInterface $error */ - $e->addError(new GraphQlInputException(__($error->getText()))); - } - throw $e; - } - $this->cartRepository->save($cart); } } From 0a79989737fd30ac4f39e0a24d75b5328d635f2c Mon Sep 17 00:00:00 2001 From: AleksLi <aleksliwork@gmail.com> Date: Wed, 26 Feb 2020 21:37:41 +0100 Subject: [PATCH 066/153] MC-26683: Updated description of the class --- app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php b/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php index 94fc525209997..cfe78389fffe4 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php @@ -8,12 +8,11 @@ namespace Magento\QuoteGraphQl\Model\Cart; use Magento\Framework\GraphQl\Exception\GraphQlInputException; -use Magento\Framework\Message\MessageInterface; use Magento\Quote\Api\CartRepositoryInterface; use Magento\Quote\Model\Quote; /** - * Add products to cart + * Adding products to cart using GraphQL */ class AddProductsToCart { From aaac9b3173fcc00c555d6c10f37cdcdd8a9091ea Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko <serg.ivashchenko@gmail.com> Date: Thu, 27 Feb 2020 15:10:37 +0000 Subject: [PATCH 067/153] Fixed directory isExists method handling of relative paths with double-dots --- .../Framework/Filesystem/Directory/ReadTest.php | 14 ++++++++++---- .../Framework/Filesystem/Directory/Read.php | 14 ++++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php index bc77eeb932c9a..e04063eabc36b 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php @@ -73,17 +73,17 @@ public function testGetRelativePathOutside() $exceptions = 0; $dir = $this->getDirectoryInstance('foo'); try { - $dir->getRelativePath(__DIR__ .'/ReadTest.php'); + $dir->getRelativePath(__DIR__ . '/ReadTest.php'); } catch (ValidatorException $exception) { $exceptions++; } try { - $dir->getRelativePath(__DIR__ .'//./..////Directory/ReadTest.php'); + $dir->getRelativePath(__DIR__ . '//./..////Directory/ReadTest.php'); } catch (ValidatorException $exception) { $exceptions++; } try { - $dir->getRelativePath(__DIR__ .'\..\Directory\ReadTest.php'); + $dir->getRelativePath(__DIR__ . '\..\Directory\ReadTest.php'); } catch (ValidatorException $exception) { $exceptions++; } @@ -222,7 +222,13 @@ public function testIsExist($dirPath, $path, $exists) */ public function existsProvider() { - return [['foo', 'bar', true], ['foo', 'bar/baz/', true], ['foo', 'bar/notexists', false]]; + return [ + ['foo', 'bar', true], + ['foo', 'bar/baz/', true], + ['foo', 'bar/notexists', false], + ['foo', 'foo/../bar/', true], + ['foo', 'foo/../notexists/', false] + ]; } public function testIsExistOutside() diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php index a3a4cec59953f..e23eadd57d866 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php @@ -9,6 +9,7 @@ use Magento\Framework\Exception\ValidatorException; /** + * Filesystem directory instance for read operations * @api */ class Read implements ReadInterface @@ -40,8 +41,6 @@ class Read implements ReadInterface private $pathValidator; /** - * Constructor. Set properties. - * * @param \Magento\Framework\Filesystem\File\ReadFactory $fileFactory * @param \Magento\Framework\Filesystem\DriverInterface $driver * @param string $path @@ -60,6 +59,8 @@ public function __construct( } /** + * Validate the path is correct and within the directory + * * @param null|string $path * @param null|string $scheme * @param bool $absolutePath @@ -96,8 +97,7 @@ protected function setPath($path) } /** - * Retrieves absolute path - * E.g.: /var/www/application/file.txt + * Retrieves absolute path i.e. /var/www/application/file.txt * * @param string $path * @param string $scheme @@ -151,7 +151,7 @@ public function read($path = null) /** * Read recursively * - * @param null $path + * @param string|null $path * @throws ValidatorException * @return string[] */ @@ -207,7 +207,9 @@ public function isExist($path = null) { $this->validatePath($path); - return $this->driver->isExists($this->driver->getAbsolutePath($this->path, $path)); + return $this->driver->isExists( + $this->driver->getRealPathSafety($this->driver->getAbsolutePath($this->path, $path)) + ); } /** From 54f93e22ae3d9387d5a8c259d6933efbcd5461e8 Mon Sep 17 00:00:00 2001 From: Vaha <vaha@atwix.com> Date: Fri, 28 Feb 2020 09:03:21 +0200 Subject: [PATCH 068/153] fixed 'wrong image gallery', 'wrong gallery behavior when query url' for swatches, 'product image updating' for dropdown type, added MFTF tests to cover all cases: #26473, #26856, #26858 --- .../AdminAssignImageBaseRoleActionGroup.xml | 25 ++ .../Catalog/Test/Mftf/Data/ProductData.xml | 8 + ...rontConfigurableOptionsThumbImagesTest.xml | 228 ++++++++++++++++++ ...ramsConfigurableOptionsThumbImagesTest.xml | 38 +++ .../view/frontend/web/js/configurable.js | 43 +++- ...minUpdateAttributeInputTypeActionGroup.xml | 20 ++ ...nfigurableSwatchOptionsThumbImagesTest.xml | 48 ++++ ...nfigurableSwatchOptionsThumbImagesTest.xml | 54 +++++ .../view/base/web/js/swatch-renderer.js | 54 +++-- lib/web/mage/gallery/gallery.js | 2 +- 10 files changed, 488 insertions(+), 32 deletions(-) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssignImageBaseRoleActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSelectedByQueryParamsConfigurableOptionsThumbImagesTest.xml create mode 100644 app/code/Magento/Swatches/Test/Mftf/ActionGroup/AdminUpdateAttributeInputTypeActionGroup.xml create mode 100644 app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableSwatchOptionsThumbImagesTest.xml create mode 100644 app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSelectedByQueryParamsConfigurableSwatchOptionsThumbImagesTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssignImageBaseRoleActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssignImageBaseRoleActionGroup.xml new file mode 100644 index 0000000000000..aa5311d389d7a --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssignImageBaseRoleActionGroup.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminAssignImageBaseRoleActionGroup"> + <annotations> + <description>Requires the navigation to the Product Creation page. Checks the Base Role area for image.</description> + </annotations> + <arguments> + <argument name="image"/> + </arguments> + <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageFile(image.fileName)}}" visible="false" stepKey="expandImages"/> + <waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="seeProductImageName"/> + <click selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="clickProductImage"/> + <waitForElementVisible selector="{{AdminProductImagesSection.altText}}" stepKey="seeAltTextSection"/> + <checkOption selector="{{AdminProductImagesSection.roleBase}}" stepKey="checkRoles"/> + <click selector="{{AdminSlideOutDialogSection.closeButton}}" stepKey="clickCloseButton"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml index a44db8010a822..867f0fa9ccde5 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml @@ -876,6 +876,14 @@ <data key="weight">5</data> <requiredEntity type="product_extension_attribute">EavStock100</requiredEntity> </entity> + <entity name="Magento2" type="image"> + <data key="title" unique="suffix">Magento2</data> + <data key="file_type">Upload File</data> + <data key="shareable">Yes</data> + <data key="file">magento2.jpg</data> + <data key="filename">magento2</data> + <data key="file_extension">jpg</data> + </entity> <entity name="Magento3" type="image"> <data key="title" unique="suffix">Magento3</data> <data key="price">1.00</data> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml new file mode 100644 index 0000000000000..134fd89c2c813 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontConfigurableOptionsThumbImagesTest.xml @@ -0,0 +1,228 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontConfigurableOptionsThumbImagesTest"> + <annotations> + <stories value="Configurable Product"/> + <title value="Check thumbnail images and active image for Configurable Product"/> + <description value="Login as admin, create attribute with two options, configurable product with two + associated simple products. Add few images for products, check the fotorama thumbnail images + (visible and active) for each selected option for the configurable product"/> + <group value="catalog"/> + </annotations> + <before> + <!-- Login as Admin --> + <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/> + + <!-- Create Default Category --> + <createData entity="_defaultCategory" stepKey="createCategory"/> + + <!-- Create an attribute with two options to be used in the first child product --> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + + <!-- Add the attribute just created to default attribute set --> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + + <!-- Get the first option of the attribute created --> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + + <!-- Get the second option of the attribute created --> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + + <!-- Create Configurable product --> + <createData entity="BaseConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <!-- Create a simple product and give it the attribute with the first option --> + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + + <!--Create a simple product and give it the attribute with the second option --> + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + + <!-- Create the configurable product --> + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + + <!-- Add the first simple product to the configurable product --> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + + <!-- Add the second simple product to the configurable product --> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + + <!-- ConfigProduct --> + <!-- Go to Product Page (ConfigProduct) --> + <actionGroup ref="GoToProductPageViaIDActionGroup" stepKey="goToConfigProduct"> + <argument name="productId" value="$$createConfigProduct.id$$"/> + </actionGroup> + + <!--Switch to 'Default Store View' scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreViewForConfigProduct"> + <argument name="storeViewName" value="'Default Store View'"/> + </actionGroup> + + <!-- Add images for ConfigProduct --> + <actionGroup ref="AddProductImageActionGroup" stepKey="addConfigProductMagento3"> + <argument name="image" value="Magento3"/> + </actionGroup> + + <actionGroup ref="AddProductImageActionGroup" stepKey="addConfigProductTestImageAdobe"> + <argument name="image" value="TestImageAdobe"/> + </actionGroup> + <actionGroup ref="AdminAssignImageBaseRoleActionGroup" stepKey="assignTestImageAdobeBaseRole"> + <argument name="image" value="TestImageAdobe"/> + </actionGroup> + + <!-- Save changes fot ConfigProduct --> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveConfigProductProduct"/> + + <!-- ChildProduct1 --> + <!-- Go to Product Page (ChildProduct1) --> + <actionGroup ref="GoToProductPageViaIDActionGroup" stepKey="goToChildProduct1"> + <argument name="productId" value="$$createConfigChildProduct1.id$$"/> + </actionGroup> + + <!--Switch to 'Default Store View' scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreViewForChildProduct1"> + <argument name="storeViewName" value="'Default Store View'"/> + </actionGroup> + + <!-- Add images for ChildProduct1 --> + <actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct1ProductImage"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct1Magento2"> + <argument name="image" value="Magento2"/> + </actionGroup> + <actionGroup ref="AdminAssignImageRolesIfUnassignedActionGroup" stepKey="assignMagento2Role"> + <argument name="image" value="Magento2"/> + </actionGroup> + + <!-- Save changes fot ChildProduct1 --> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveChildProduct1Product"/> + + <!-- ChildProduct2 --> + <!-- Go to Product Page (ChildProduct2) --> + <actionGroup ref="GoToProductPageViaIDActionGroup" stepKey="goToChildProduct2"> + <argument name="productId" value="$$createConfigChildProduct2.id$$"/> + </actionGroup> + + <!--Switch to 'Default Store View' scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreViewForChildProduct2"> + <argument name="storeViewName" value="'Default Store View'"/> + </actionGroup> + + <!-- Add image for ChildProduct2 --> + <actionGroup ref="AddProductImageActionGroup" stepKey="addChildProduct2TestImageNew"> + <argument name="image" value="TestImageNew"/> + </actionGroup> + + <!-- Save changes fot ChildProduct2 --> + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveChildProduct2Product"/> + </before> + <after> + <!-- Delete Created Data --> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/> + <actionGroup ref="logout" stepKey="logout"/> + + <!-- Reindex invalidated indices after product attribute has been created/deleted --> + <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> + </after> + + <!-- Open ConfigProduct in Store Front Page --> + <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="openProductInStoreFront"/> + <waitForPageLoad stepKey="waitForProductToLoad"/> + + <!-- Check fotorama thumbnail images (no selected options) --> + <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForNoOption"> + <argument name="fileName" value="{{Magento3.filename}}"/> + </actionGroup> + + <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeActiveTestImageAdobeForNoOption"> + <argument name="fileName" value="{{TestImageAdobe.filename}}"/> + </actionGroup> + + <!-- Select first option --> + <actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectFirstOptionValue"> + <argument name="attributeLabel" value="$$createConfigProductAttribute.default_frontend_label$$"/> + <argument name="optionLabel" value="$$getConfigAttributeOption1.label$$"/> + </actionGroup> + + <!-- Check fotorama thumbnail images (first option selected) --> + <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForFirstOption"> + <argument name="fileName" value="{{Magento3.filename}}"/> + </actionGroup> + + <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeTestImageAdobeForFirstOption"> + <argument name="fileName" value="{{TestImageAdobe.filename}}"/> + </actionGroup> + + <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeProductImageForFirstOption"> + <argument name="fileName" value="{{ProductImage.filename}}"/> + </actionGroup> + + <!-- Check active fotorama thumbnail image (first option selected) --> + <actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveMagento2ForFirstOption"> + <argument name="fileName" value="{{Magento2.filename}}"/> + </actionGroup> + + <!-- Select second option --> + <actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectSecondOptionValue"> + <argument name="attributeLabel" value="$$createConfigProductAttribute.default_frontend_label$$"/> + <argument name="optionLabel" value="$$getConfigAttributeOption2.label$$"/> + </actionGroup> + + <!-- Check fotorama thumbnail images (second option selected) --> + <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeMagento3ForSecondOption"> + <argument name="fileName" value="{{Magento3.filename}}"/> + </actionGroup> + + <actionGroup ref="StorefrontAssertFotoramaImageAvailabilityActionGroup" stepKey="seeTestImageAdobeForSecondOption"> + <argument name="fileName" value="{{TestImageAdobe.filename}}"/> + </actionGroup> + + <!-- Check active fotorama thumbnail image (second option selected) --> + <actionGroup ref="StorefrontAssertActiveProductImageActionGroup" stepKey="seeActiveTestImageNewForSecondOption"> + <argument name="fileName" value="{{TestImageNew.filename}}"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSelectedByQueryParamsConfigurableOptionsThumbImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSelectedByQueryParamsConfigurableOptionsThumbImagesTest.xml new file mode 100644 index 0000000000000..941ae6fb84c56 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSelectedByQueryParamsConfigurableOptionsThumbImagesTest.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontSelectedByQueryParamsConfigurableOptionsThumbImagesTest" + extends="StorefrontConfigurableOptionsThumbImagesTest"> + <annotations> + <stories value="Configurable Product"/> + <title value="Check thumbnail images and active image for Configurable Product with predefined + by query params options"/> + <description value="Login as admin, create attribute with two options, configurable product with two + associated simple products. Add few images for products, check the fotorama thumbnail images + (visible and active) for each option for the configurable product using product URL with params + to selected needed option."/> + <group value="catalog"/> + </annotations> + + <!-- Select first option using product query params URL --> + <amOnPage + url="$$createConfigProduct.sku$$.html#$$createConfigProductAttribute.attribute_id$$=$$getConfigAttributeOption1.value$$" + stepKey="selectFirstOptionValue"/> + <reloadPage stepKey="selectFirstOptionValueRefreshPage" after="selectFirstOptionValue"/> + <waitForPageLoad stepKey="waitForProductWithSelectedFirstOptionToLoad" after="selectFirstOptionValueRefreshPage"/> + + <!-- Select second option using product query params URL --> + <amOnPage + url="$$createConfigProduct.sku$$.html#$$createConfigProductAttribute.attribute_id$$=$$getConfigAttributeOption2.value$$" + stepKey="selectSecondOptionValue"/> + <reloadPage stepKey="selectSecondOptionValueRefreshPage" after="selectSecondOptionValue"/> + <waitForPageLoad stepKey="waitForProductWithSelectedSecondOptionToLoad" after="selectSecondOptionValueRefreshPage"/> + </test> +</tests> diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js index 6f3af43bf5c7a..8fd1d761040d7 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js +++ b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js @@ -13,7 +13,8 @@ define([ 'priceUtils', 'priceBox', 'jquery-ui-modules/widget', - 'jquery/jquery.parsequery' + 'jquery/jquery.parsequery', + 'fotoramaVideoEvents' ], function ($, _, mageTemplate, $t, priceUtils) { 'use strict'; @@ -307,9 +308,13 @@ define([ _changeProductImage: function () { var images, initialImages = this.options.mediaGalleryInitial, - galleryObject = $(this.options.mediaGallerySelector).data('gallery'); + gallery = $(this.options.mediaGallerySelector).data('gallery'); + + if (_.isUndefined(gallery)) { + $(this.options.mediaGallerySelector).on('gallery:loaded', function () { + this._changeProductImage(); + }.bind(this)); - if (!galleryObject) { return; } @@ -325,17 +330,35 @@ define([ images = $.extend(true, [], images); images = this._setImageIndex(images); - galleryObject.updateData(images); - - $(this.options.mediaGallerySelector).AddFotoramaVideoEvents({ - selectedOption: this.simpleProduct, - dataMergeStrategy: this.options.gallerySwitchStrategy - }); + gallery.updateData(images); + this._addFotoramaVideoEvents(false); } else { - galleryObject.updateData(initialImages); + gallery.updateData(initialImages); + this._addFotoramaVideoEvents(true); + } + }, + + /** + * Add video events + * + * @param {Boolean} isInitial + * @private + */ + _addFotoramaVideoEvents: function (isInitial) { + if (_.isUndefined($.mage.AddFotoramaVideoEvents)) { + return; + } + + if (isInitial) { $(this.options.mediaGallerySelector).AddFotoramaVideoEvents(); + + return; } + $(this.options.mediaGallerySelector).AddFotoramaVideoEvents({ + selectedOption: this.simpleProduct, + dataMergeStrategy: this.options.gallerySwitchStrategy + }); }, /** diff --git a/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AdminUpdateAttributeInputTypeActionGroup.xml b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AdminUpdateAttributeInputTypeActionGroup.xml new file mode 100644 index 0000000000000..23264601cad94 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/ActionGroup/AdminUpdateAttributeInputTypeActionGroup.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminUpdateAttributeInputTypeActionGroup"> + <annotations> + <description>Set value for the "Catalog Input Type for Store Owner" attribute option</description> + </annotations> + <arguments> + <argument name="value" type="string" defaultValue="swatch_visual"/> + </arguments> + <selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="{{value}}" stepKey="setInputType"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableSwatchOptionsThumbImagesTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableSwatchOptionsThumbImagesTest.xml new file mode 100644 index 0000000000000..8c90d88f51a10 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableSwatchOptionsThumbImagesTest.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontConfigurableSwatchOptionsThumbImagesTest" + extends="StorefrontConfigurableOptionsThumbImagesTest"> + <annotations> + <features value="Swatches"/> + <stories value="Configurable product with swatch attribute"/> + <title value="Check thumbnail images and active image for Configurable Product with swatch attribute"/> + <description value="Login as admin, create attribute with two options, configurable product with two + associated simple products. Add few images for products, check the fotorama thumbnail images + (visible and active) for each selected option for the configurable product"/> + <group value="swatches"/> + </annotations> + <before> + <!-- Go to created attribute (attribute page) --> + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="navigateToSkuProductAttribute" after="createConfigProductOption"> + <argument name="ProductAttribute" value="$$createConfigProductAttribute.default_frontend_label$$"/> + </actionGroup> + + <!-- Set 'swatch_visual' value for option "Catalog Input Type for Store Owner" --> + <actionGroup ref="AdminUpdateAttributeInputTypeActionGroup" stepKey="selectSwatchVisualInputType" after="navigateToSkuProductAttribute"/> + + <!-- Set 'yes' value for option "Update Product Preview Image" --> + <actionGroup ref="AdminUpdateProductPreviewImageActionGroup" stepKey="setUpdateProductPreviewImage" after="selectSwatchVisualInputType"/> + + <!-- Save Product Attribute --> + <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveAttribute" after="setUpdateProductPreviewImage"/> + </before> + + <!-- Select first option --> + <actionGroup ref="StorefrontSelectSwatchOptionOnProductPageActionGroup" stepKey="selectFirstOptionValue"> + <argument name="optionName" value="$$getConfigAttributeOption1.label$$"/> + </actionGroup> + + <!-- Select second option --> + <actionGroup ref="StorefrontSelectSwatchOptionOnProductPageActionGroup" stepKey="selectSecondOptionValue"> + <argument name="optionName" value="$$getConfigAttributeOption2.label$$"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSelectedByQueryParamsConfigurableSwatchOptionsThumbImagesTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSelectedByQueryParamsConfigurableSwatchOptionsThumbImagesTest.xml new file mode 100644 index 0000000000000..8e4c6c0217b3a --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSelectedByQueryParamsConfigurableSwatchOptionsThumbImagesTest.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontSelectedByQueryParamsConfigurableSwatchOptionsThumbImagesTest" + extends="StorefrontConfigurableOptionsThumbImagesTest"> + <annotations> + <features value="Swatches"/> + <stories value="Configurable product with swatch attribute"/> + <title value="Check thumbnail images and active image for Configurable Product with swatch attribute + with predefined by query params options"/> + <description value="Login as admin, create swatch attribute with two options, configurable product with two + associated simple products. Add few images for products, check the fotorama thumbnail images + (visible and active) for each option for the configurable product using product URL with params + to selected needed option."/> + <group value="swatches"/> + </annotations> + <before> + <!-- Go to created attribute (attribute page) --> + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="navigateToSkuProductAttribute" after="createConfigProductOption"> + <argument name="ProductAttribute" value="$$createConfigProductAttribute.default_frontend_label$$"/> + </actionGroup> + + <!-- Set 'swatch_visual' value for option "Catalog Input Type for Store Owner" --> + <actionGroup ref="AdminUpdateAttributeInputTypeActionGroup" stepKey="selectSwatchVisualInputType" after="navigateToSkuProductAttribute"/> + + <!-- Set 'yes' value for option "Update Product Preview Image" --> + <actionGroup ref="AdminUpdateProductPreviewImageActionGroup" stepKey="setUpdateProductPreviewImage" after="selectSwatchVisualInputType"/> + + <!-- Save Product Attribute --> + <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveAttribute" after="setUpdateProductPreviewImage"/> + </before> + + <!-- Select first option using product query params URL --> + <amOnPage + url="$$createConfigProduct.sku$$.html#$$createConfigProductAttribute.attribute_id$$=$$getConfigAttributeOption1.value$$" + stepKey="selectFirstOptionValue"/> + <reloadPage stepKey="selectFirstOptionValueRefreshPage" after="selectFirstOptionValue"/> + <waitForPageLoad stepKey="waitForProductWithSelectedFirstOptionToLoad" after="selectFirstOptionValueRefreshPage"/> + + <!-- Select second option using product query params URL --> + <amOnPage + url="$$createConfigProduct.sku$$.html#$$createConfigProductAttribute.attribute_id$$=$$getConfigAttributeOption2.value$$" + stepKey="selectSecondOptionValue"/> + <reloadPage stepKey="selectSecondOptionValueRefreshPage" after="selectSecondOptionValue"/> + <waitForPageLoad stepKey="waitForProductWithSelectedSecondOptionToLoad" after="selectSecondOptionValueRefreshPage"/> + </test> +</tests> diff --git a/app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js index 8b5dfcd80deb4..3e100d2c39168 100644 --- a/app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js @@ -1267,6 +1267,14 @@ define([ isInitial; if (isInProductView) { + if (_.isUndefined(gallery)) { + context.find(this.options.mediaGallerySelector).on('gallery:loaded', function () { + this.updateBaseImage(images, context, isInProductView); + }.bind(this)); + + return; + } + imagesToUpdate = images.length ? this._setImageType($.extend(true, [], images)) : []; isInitial = _.isEqual(imagesToUpdate, initialImages); @@ -1276,32 +1284,36 @@ define([ imagesToUpdate = this._setImageIndex(imagesToUpdate); - if (!_.isUndefined(gallery)) { - gallery.updateData(imagesToUpdate); - } else { - context.find(this.options.mediaGallerySelector).on('gallery:loaded', function (loadedGallery) { - loadedGallery = context.find(this.options.mediaGallerySelector).data('gallery'); - loadedGallery.updateData(imagesToUpdate); - }.bind(this)); - } - - if (isInitial) { - $(this.options.mediaGallerySelector).AddFotoramaVideoEvents(); - } else { - $(this.options.mediaGallerySelector).AddFotoramaVideoEvents({ - selectedOption: this.getProduct(), - dataMergeStrategy: this.options.gallerySwitchStrategy - }); - } - - if (gallery) { - gallery.first(); - } + gallery.updateData(imagesToUpdate); + this._addFotoramaVideoEvents(isInitial); } else if (justAnImage && justAnImage.img) { context.find('.product-image-photo').attr('src', justAnImage.img); } }, + /** + * Add video events + * + * @param {Boolean} isInitial + * @private + */ + _addFotoramaVideoEvents: function (isInitial) { + if (_.isUndefined($.mage.AddFotoramaVideoEvents)) { + return; + } + + if (isInitial) { + $(this.options.mediaGallerySelector).AddFotoramaVideoEvents(); + + return; + } + + $(this.options.mediaGallerySelector).AddFotoramaVideoEvents({ + selectedOption: this.getProduct(), + dataMergeStrategy: this.options.gallerySwitchStrategy + }); + }, + /** * Set correct indexes for image set. * diff --git a/lib/web/mage/gallery/gallery.js b/lib/web/mage/gallery/gallery.js index 65a14f77de257..02ba72f64127b 100644 --- a/lib/web/mage/gallery/gallery.js +++ b/lib/web/mage/gallery/gallery.js @@ -480,7 +480,7 @@ define([ settings.fotoramaApi.load(data); mainImageIndex = getMainImageIndex(data); - if (mainImageIndex) { + if (settings.fotoramaApi.activeIndex !== mainImageIndex) { settings.fotoramaApi.show({ index: mainImageIndex, time: 0 From 4e540340bb74de1c40f3ad5c1196ffcc6057aff9 Mon Sep 17 00:00:00 2001 From: "Galla, Daniel" <d.galla@imi.de> Date: Fri, 28 Feb 2020 13:04:13 +0100 Subject: [PATCH 069/153] #26499 Use product urlKey instead of name --- .../Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml | 2 +- .../Test/AdminCreateAndEditConfigurableProductSettingsTest.xml | 2 +- .../Test/AdminCreateAndEditDownloadableProductSettingsTest.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml index a80d5f040f825..7aa1126f38923 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml @@ -126,7 +126,7 @@ <!-- Verify Url Key after changing --> <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> - <argument name="productUrl" value="{{ApiBundleProduct.name}}"/> + <argument name="productUrl" value="{{ApiBundleProduct.urlKey}}"/> </actionGroup> <!-- Assert product design settings "Layout empty" --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml index 6632cbcee30f2..e07e288dc00bf 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml @@ -91,7 +91,7 @@ <!-- Verify Url Key after changing --> <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> - <argument name="productUrl" value="{{ApiConfigurableProduct.name}}"/> + <argument name="productUrl" value="{{ApiConfigurableProduct.urlKey}}"/> </actionGroup> <!-- Assert product design settings "Layout empty" --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml index ebd36dddc0b6c..b52e378ac56b3 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml @@ -97,7 +97,7 @@ <!-- Verify Url Key after changing --> <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> - <argument name="productUrl" value="{{ApiDownloadableProduct.name}}"/> + <argument name="productUrl" value="{{ApiDownloadableProduct.urlKey}}"/> </actionGroup> <!-- Assert product design settings "left bar is present at product page with 2 columns" --> From b6b69a6af9347e2f18930a7edc6388513c17b1e6 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Sun, 1 Mar 2020 21:15:55 +0100 Subject: [PATCH 070/153] #27117 Add `Test` suffix for Test names (Assuming that filename is correct) --- ...ontGoToDetailsPageWhenAddingToCartTest.xml | 2 +- .../Mftf/Test/CaptchaFormsDisplayingTest.xml | 2 +- .../Mftf/Test/AdminVerifyProductOrderTest.xml | 2 +- ...rifyDefaultWYSIWYGToolbarOnProductTest.xml | 2 +- .../Mftf/Test/SearchEntityResultsTest.xml | 32 +++++++++---------- .../Test/CheckCheckoutSuccessPageTest.xml | 4 +-- ...rontCheckCartAndCheckoutItemsCountTest.xml | 4 +-- .../Test/StorefrontCustomerCheckoutTest.xml | 4 +-- .../Mftf/Test/StorefrontGuestCheckoutTest.xml | 2 +- ...ontVerifySecureURLRedirectCheckoutTest.xml | 2 +- .../Test/Mftf/Test/ConfigurationTest.xml | 2 +- ...AdminConfigurableProductOutOfStockTest.xml | 2 +- .../ProductsQtyReturnAfterOrderCancelTest.xml | 2 +- ...rontVerifySecureURLRedirectContactTest.xml | 2 +- .../Mftf/Test/ChangeCustomerGroupTest.xml | 4 +-- ...ontVerifySecureURLRedirectCustomerTest.xml | 2 +- ...erifySecureURLRedirectDownloadableTest.xml | 2 +- .../Test/AdminGroupedProductsListTest.xml | 2 +- ...rifySecureURLRedirectMultishippingTest.xml | 2 +- ...tVerifySecureURLRedirectNewsletterTest.xml | 2 +- ...frontVerifySecureURLRedirectPaypalTest.xml | 2 +- ...frontVerifySecureURLRedirectReviewTest.xml | 2 +- ...efrontVerifySecureURLRedirectSalesTest.xml | 2 +- .../Mftf/Test/StorefrontTaxQuoteCartTest.xml | 8 ++--- .../Test/StorefrontTaxQuoteCheckoutTest.xml | 8 ++--- ...tipleStoreviewsDuringProductImportTest.xml | 2 +- ...writesForProductInAnchorCategoriesTest.xml | 8 ++--- ...efrontVerifySecureURLRedirectVaultTest.xml | 2 +- ...ontVerifySecureURLRedirectWishlistTest.xml | 2 +- 29 files changed, 57 insertions(+), 57 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml index 7ced26bab2c96..f0e16bbdd1b99 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontGoToDetailsPageWhenAddingToCart"> + <test name="StorefrontGoToDetailsPageWhenAddingToCartTest"> <annotations> <features value="Bundle"/> <stories value="Bundle products list on Storefront"/> diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest.xml index 977ee78c0d201..b1c3ed52f163b 100644 --- a/app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest.xml +++ b/app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest.xml @@ -65,7 +65,7 @@ <scrollToTopOfPage stepKey="ScrollToTop"/> <click selector="{{CaptchaFormsDisplayingSection.captcha}}" stepKey="ClickToCloseCaptcha"/> </test> - <test name="CaptchaWithDisabledGuestCheckout"> + <test name="CaptchaWithDisabledGuestCheckoutTest"> <annotations> <features value="Captcha"/> <stories value="MC-5602 - CAPTCHA doesn't appear in login popup after refreshing page."/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml index 09ddcd040bea4..bd1a5aaf9ed42 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminVerifyProductOrder"> + <test name="AdminVerifyProductOrderTest"> <annotations> <features value="Catalog"/> <stories value="Verify Product Order"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml index 8c10f22b7b09e..ae74a000d76e8 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml @@ -47,7 +47,7 @@ <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> - <test name="Verifydefaultcontrolsonproductshortdescription"> + <test name="VerifydefaultcontrolsonproductshortdescriptionTest"> <annotations> <features value="Catalog"/> <stories value="Default toolbar configuration in Magento-MAGETWO-70412"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml index dc715a5d95f2f..890df17f113d5 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="QuickSearchProductBySku"> + <test name="QuickSearchProductBySkuTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find products"/> @@ -41,7 +41,7 @@ <argument name="productUrlKey" value="$createSimpleProduct.custom_attributes[url_key]$"/> </actionGroup> </test> - <test name="QuickSearchProductByName" extends="QuickSearchProductBySku"> + <test name="QuickSearchProductByNameTest" extends="QuickSearchProductBySkuTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find products via Name"/> @@ -56,7 +56,7 @@ <argument name="phrase" value="$createSimpleProduct.name$"/> </actionGroup> </test> - <test name="QuickSearchProductByNameWithSpecialChars" extends="QuickSearchProductBySku"> + <test name="QuickSearchProductByNameWithSpecialCharsTest" extends="QuickSearchProductBySkuTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="Quick Search can find products with names that contain special characters"/> @@ -76,7 +76,7 @@ <argument name="phrase" value="$createSimpleProduct.name$"/> </actionGroup> </test> - <test name="QuickSearchEmptyResults"> + <test name="QuickSearchEmptyResultsTest"> <annotations> <features value="CatalogSearch"/> <stories value="Search Product on Storefront"/> @@ -109,7 +109,7 @@ <actionGroup ref="StorefrontCheckSearchIsEmptyActionGroup" stepKey="checkEmpty"/> </test> - <test name="QuickSearchWithTwoCharsEmptyResults" extends="QuickSearchEmptyResults"> + <test name="QuickSearchWithTwoCharsEmptyResultsTest" extends="QuickSearchEmptyResultsTest"> <annotations> <features value="CatalogSearch"/> <stories value="Search Product on Storefront"/> @@ -143,7 +143,7 @@ </actionGroup> </test> - <test name="QuickSearchProductByNameWithThreeLetters" extends="QuickSearchProductBySku"> + <test name="QuickSearchProductByNameWithThreeLettersTest" extends="QuickSearchProductBySkuTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find products by their first three letters"/> @@ -159,7 +159,7 @@ <argument name="phrase" value="{$getFirstThreeLetters}"/> </actionGroup> </test> - <test name="QuickSearchProductBy128CharQuery" extends="QuickSearchProductBySku"> + <test name="QuickSearchProductBy128CharQueryTest" extends="QuickSearchProductBySkuTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search product with long names, using first 128 letters"/> @@ -180,7 +180,7 @@ </actionGroup> </test> - <test name="QuickSearchTwoProductsWithSameWeight"> + <test name="QuickSearchTwoProductsWithSameWeightTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="Quick Search should sort products with the same weight appropriately"/> @@ -263,7 +263,7 @@ <argument name="index" value="1"/> </actionGroup> </test> - <test name="QuickSearchTwoProductsWithDifferentWeight" extends="QuickSearchTwoProductsWithSameWeight"> + <test name="QuickSearchTwoProductsWithDifferentWeightTest" extends="QuickSearchTwoProductsWithSameWeightTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="Quick Search should sort products with the different weight appropriately"/> @@ -293,7 +293,7 @@ </actionGroup> </test> - <test name="QuickSearchAndAddToCart"> + <test name="QuickSearchAndAddToCartTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find a simple product and add it to cart"/> @@ -325,7 +325,7 @@ <argument name="productName" value="$createSimpleProduct.name$"/> </actionGroup> </test> - <test name="QuickSearchAndAddToCartVirtual"> + <test name="QuickSearchAndAddToCartVirtualTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find a virtual product and add it to cart"/> @@ -357,7 +357,7 @@ <argument name="productName" value="$createVirtualProduct.name$"/> </actionGroup> </test> - <test name="QuickSearchAndAddToCartConfigurable"> + <test name="QuickSearchAndAddToCartConfigurableTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find a configurable product and add it to cart"/> @@ -401,7 +401,7 @@ <argument name="optionName" value="{{colorProductAttribute1.name}}"/> </actionGroup> </test> - <test name="QuickSearchAndAddToCartDownloadable"> + <test name="QuickSearchAndAddToCartDownloadableTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find a downloadable product and add it to cart"/> @@ -438,7 +438,7 @@ <argument name="productName" value="$createProduct.name$"/> </actionGroup> </test> - <test name="QuickSearchAndAddToCartGrouped"> + <test name="QuickSearchAndAddToCartGroupedTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find a grouped product and add it to cart"/> @@ -475,7 +475,7 @@ <argument name="productName" value="$createProduct.name$"/> </actionGroup> </test> - <test name="QuickSearchAndAddToCartBundleDynamic"> + <test name="QuickSearchAndAddToCartBundleDynamicTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find a Bundle Dynamic product and add it to cart"/> @@ -531,7 +531,7 @@ <argument name="productName" value="$createBundleProduct.name$"/> </actionGroup> </test> - <test name="QuickSearchAndAddToCartBundleFixed"> + <test name="QuickSearchAndAddToCartBundleFixedTest"> <annotations> <stories value="Search Product on Storefront"/> <title value="User should be able to use Quick Search to find a Bundle Fixed product and add it to cart"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml index b939209751fcd..eb49f53921ea4 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="CheckCheckoutSuccessPageAsRegisterCustomer"> + <test name="CheckCheckoutSuccessPageAsRegisterCustomerTest"> <annotations> <features value="Checkout"/> <stories value="Success page elements are presented for placed order as Customer"/> @@ -131,7 +131,7 @@ <seeElement selector="{{StorefrontCustomerOrderViewSection.orderTitle}}" stepKey="seeOrderTitleOnPrint"/> <switchToWindow stepKey="switchToWindow2"/> </test> - <test name="CheckCheckoutSuccessPageAsGuest"> + <test name="CheckCheckoutSuccessPageAsGuestTest"> <annotations> <features value="Checkout"/> <stories value="Success page elements are presented for placed order as Guest"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest.xml index c3f173961f0c5..8db1f8801ae1d 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndCheckoutItemsCountTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontCartItemsCountDisplayItemsQuantities"> + <test name="StorefrontCartItemsCountDisplayItemsQuantitiesTest"> <annotations> <stories value="Checkout order summary has wrong item count"/> <title value="Checkout order summary has wrong item count - display items quantities"/> @@ -57,7 +57,7 @@ <argument name="itemsText" value="3 Items in Cart"/> </actionGroup> </test> - <test name="StorefrontCartItemsCountDisplayUniqueItems" extends="StorefrontCartItemsCountDisplayItemsQuantities"> + <test name="StorefrontCartItemsCountDisplayUniqueItemsTest" extends="StorefrontCartItemsCountDisplayItemsQuantitiesTest"> <annotations> <stories value="Checkout order summary has wrong item count"/> <title value="Checkout order summary has wrong item count - display unique items"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml index 580b4e32b0b28..3a686c8efdd5f 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml @@ -82,7 +82,7 @@ <waitForElementVisible selector="{{AdminEditCustomerOrdersSection.orderGrid}}" stepKey="waitForOrdersGridVisible"/> <see selector="{{AdminEditCustomerOrdersSection.orderGrid}}" userInput="$$createCustomer.firstname$$ $$createCustomer.lastname$$" stepKey="verifyOrder"/> </test> - <test name="StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRates"> + <test name="StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest"> <annotations> <features value="Checkout"/> <stories value="Customer checkout"/> @@ -198,7 +198,7 @@ <waitForPageLoad stepKey="waitForOrderSuccessPage2"/> <see selector="{{CheckoutSuccessMainSection.success}}" userInput="Your order number is:" stepKey="seeSuccessMessage2"/> </test> - <test name="StorefrontCustomerCheckoutTestWithRestrictedCountriesForPayment"> + <test name="StorefrontCustomerCheckoutTestWithRestrictedCountriesForPaymentTest"> <annotations> <features value="Checkout"/> <stories value="Checkout flow if payment solutions are not available"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml index cce4d9f0345d7..53d7904ffdc38 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml @@ -93,7 +93,7 @@ <remove keyForRemoval="guestGoToCheckoutFromMinicart" /> <actionGroup ref="GoToCheckoutFromCartActionGroup" stepKey="guestGoToCheckoutFromCart" after="seeCartQuantity" /> </test> - <test name="StorefrontGuestCheckoutTestWithRestrictedCountriesForPayment"> + <test name="StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest"> <annotations> <features value="Checkout"/> <stories value="Checkout flow if payment solutions are not available"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCheckoutTest.xml index cbf0072d44aed..778967c187f65 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCheckoutTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectCheckout"> + <test name="StorefrontVerifySecureURLRedirectCheckoutTest"> <annotations> <features value="Checkout"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml b/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml index 916a5a09a09c0..9700d8024ce8f 100644 --- a/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml +++ b/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="VerifyAllowDynamicMediaURLsSettingIsRemoved"> + <test name="VerifyAllowDynamicMediaURLsSettingIsRemovedTest"> <annotations> <features value="Backend"/> <stories value="Dynamic Media URL"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml index 2ab3a9e6e60c9..cfb85bd391f9f 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml @@ -134,7 +134,7 @@ <see stepKey="checkForOutOfStock3" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="OUT OF STOCK"/> </test> - <test name="AdminConfigurableProductOutOfStockTestDeleteChildren"> + <test name="AdminConfigurableProductOutOfStockTestDeleteChildrenTest"> <annotations> <features value="ConfigurableProduct"/> <stories value="Product visibility when in stock/out of stock"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml index 24c60006a3504..0d74775f1e3ae 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="ProductsQtyReturnAfterOrderCancel"> + <test name="ProductsQtyReturnAfterOrderCancelTest"> <annotations> <features value="ConfigurableProduct"/> diff --git a/app/code/Magento/Contact/Test/Mftf/Test/StorefrontVerifySecureURLRedirectContactTest.xml b/app/code/Magento/Contact/Test/Mftf/Test/StorefrontVerifySecureURLRedirectContactTest.xml index 3ef941fa2e0ce..0c46ed4729d66 100644 --- a/app/code/Magento/Contact/Test/Mftf/Test/StorefrontVerifySecureURLRedirectContactTest.xml +++ b/app/code/Magento/Contact/Test/Mftf/Test/StorefrontVerifySecureURLRedirectContactTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectContact"> + <test name="StorefrontVerifySecureURLRedirectContactTest"> <annotations> <features value="Contact"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest.xml index eb46a9d2b1ace..0eca9811f17f1 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="ChangingSingleCustomerGroupViaGrid"> + <test name="ChangingSingleCustomerGroupViaGridTest"> <annotations> <title value="DEPRECATED Change a single customer group via grid"/> <description value="From the selection of All Customers select a single customer to change their group"/> @@ -61,7 +61,7 @@ </actionGroup> </test> - <test name="ChangingAllCustomerGroupViaGrid" extends="ChangingSingleCustomerGroupViaGrid"> + <test name="ChangingAllCustomerGroupViaGridTest" extends="ChangingSingleCustomerGroupViaGridTest"> <annotations> <title value="DEPRECATED Change all customers' group via grid"/> <description value="Select All customers to change their group"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCustomerTest.xml index da9dddf0539d3..f504af2334e10 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCustomerTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectCustomer"> + <test name="StorefrontVerifySecureURLRedirectCustomerTest"> <annotations> <features value="Customer"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontVerifySecureURLRedirectDownloadableTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontVerifySecureURLRedirectDownloadableTest.xml index 6e039ca413a08..d7e0ce3b2ca22 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontVerifySecureURLRedirectDownloadableTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontVerifySecureURLRedirectDownloadableTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectDownloadable"> + <test name="StorefrontVerifySecureURLRedirectDownloadableTest"> <annotations> <features value="Downloadable"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml index 151a987ea89cc..7657c9a86a62b 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminGroupedProductsAreListedWhenOutOfStock"> + <test name="AdminGroupedProductsAreListedWhenOutOfStockTest"> <annotations> <features value="GroupedProduct"/> <stories value="MAGETWO-93181: Grouped product doesn't take care about his Linked Products when SalableQuantity < ProductLink.ExtensionAttributes.Qty after Source Deduction"/> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontVerifySecureURLRedirectMultishippingTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontVerifySecureURLRedirectMultishippingTest.xml index 085a710f2671c..e65747f4d63d0 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontVerifySecureURLRedirectMultishippingTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontVerifySecureURLRedirectMultishippingTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectMultishipping"> + <test name="StorefrontVerifySecureURLRedirectMultishippingTest"> <!--todo MC-5858: some urls don't redirect to https--> <annotations> <features value="Multishipping"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/StorefrontVerifySecureURLRedirectNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/StorefrontVerifySecureURLRedirectNewsletterTest.xml index 01b5e706fcefb..c38725f263525 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/StorefrontVerifySecureURLRedirectNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/StorefrontVerifySecureURLRedirectNewsletterTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectNewsletter"> + <test name="StorefrontVerifySecureURLRedirectNewsletterTest"> <annotations> <features value="Newsletter"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifySecureURLRedirectPaypalTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifySecureURLRedirectPaypalTest.xml index b2fcfa43181dc..cf0e4b3d0b370 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifySecureURLRedirectPaypalTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifySecureURLRedirectPaypalTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectPaypal"> + <test name="StorefrontVerifySecureURLRedirectPaypalTest"> <annotations> <features value="Paypal"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifySecureURLRedirectReviewTest.xml b/app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifySecureURLRedirectReviewTest.xml index b10af7a303cc7..8a2f441e5c4e8 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifySecureURLRedirectReviewTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifySecureURLRedirectReviewTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectReview"> + <test name="StorefrontVerifySecureURLRedirectReviewTest"> <annotations> <features value="Review"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontVerifySecureURLRedirectSalesTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontVerifySecureURLRedirectSalesTest.xml index 505493e4e5682..d49ea4cfcbec7 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontVerifySecureURLRedirectSalesTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontVerifySecureURLRedirectSalesTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectSales"> + <test name="StorefrontVerifySecureURLRedirectSalesTest"> <annotations> <features value="Sales"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml index 3d584f988780e..70211a1080951 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontTaxQuoteCartLoggedInSimple"> + <test name="StorefrontTaxQuoteCartLoggedInSimpleTest"> <annotations> <features value="Tax"/> <stories value="Tax Calculation in Shopping Cart"/> @@ -127,7 +127,7 @@ </test> - <test name="StorefrontTaxQuoteCartLoggedInVirtual"> + <test name="StorefrontTaxQuoteCartLoggedInVirtualTest"> <annotations> <features value="Tax"/> <stories value="Tax Calculation in Shopping Cart"/> @@ -243,7 +243,7 @@ <see stepKey="seeTotalExcl3" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> </test> - <test name="StorefrontTaxQuoteCartGuestSimple"> + <test name="StorefrontTaxQuoteCartGuestSimpleTest"> <annotations> <features value="Tax"/> <stories value="Tax Calculation in Shopping Cart"/> @@ -355,7 +355,7 @@ <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> </test> - <test name="StorefrontTaxQuoteCartGuestVirtual"> + <test name="StorefrontTaxQuoteCartGuestVirtualTest"> <annotations> <features value="Tax"/> <stories value="Tax Calculation in Shopping Cart"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml index 050ab3889984b..4c3ab91cf909c 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontTaxQuoteCheckoutGuestVirtual"> + <test name="StorefrontTaxQuoteCheckoutGuestVirtualTest"> <annotations> <features value="Tax"/> <stories value="Tax Calculation in One Page Checkout"/> @@ -114,7 +114,7 @@ <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$$virtualProduct1.price$$"/> </test> - <test name="StorefrontTaxQuoteCheckoutLoggedInSimple"> + <test name="StorefrontTaxQuoteCheckoutLoggedInSimpleTest"> <annotations> <features value="Tax"/> <stories value="Tax Calculation in One Page Checkout"/> @@ -236,7 +236,7 @@ <see stepKey="seeTotalExcl2" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> </test> - <test name="StorefrontTaxQuoteCheckoutGuestSimple"> + <test name="StorefrontTaxQuoteCheckoutGuestSimpleTest"> <annotations> <features value="Tax"/> <stories value="Tax Calculation in One Page Checkout"/> @@ -353,7 +353,7 @@ <see stepKey="seeTotalExcl" selector="{{CheckoutPaymentSection.orderSummaryTotalExcluding}}" userInput="$128.00"/> </test> - <test name="StorefrontTaxQuoteCheckoutLoggedInVirtual"> + <test name="StorefrontTaxQuoteCheckoutLoggedInVirtualTest"> <annotations> <features value="Tax"/> <stories value="Tax Calculation in One Page Checkout"/> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml index f635df7edb6f7..31b6ed78aa57d 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml @@ -133,7 +133,7 @@ <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', 'category-dutch/productformagetwo68980-dutch.html')}}" stepKey="seeUrlInRequestPathColumn5"/> <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Target Path', catalog/product/view/id/$grabProductIdFromUrl/category/$$createCategory.id$$)}}" stepKey="seeUrlInTargetPathColumn5"/> </test> - <test name="AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTestWithConfigurationTurnedOff"> + <test name="AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTestWithConfigurationTurnedOffTest"> <annotations> <features value="Url Rewrite"/> <stories value="Url Rewrites for Multiple Storeviews"/> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest.xml index 497ab653a0594..98c85114631aa 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest.xml @@ -83,7 +83,7 @@ <seeElement selector="{{AdminUrlRewriteIndexSection.gridCellByColumnValue('Request Path', $simpleSubCategory1.custom_attributes[url_key]$-new/$simpleSubCategory2.custom_attributes[url_key]$/$simpleSubCategory3.custom_attributes[url_key]$/$createSimpleProduct.custom_attributes[url_key]$.html)}}" stepKey="seeInListValue7"/> </test> - <test name="AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOff"> + <test name="AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest"> <annotations> <features value="Url Rewrite"/> <stories value="Url-rewrites for product in anchor categories"/> @@ -187,7 +187,7 @@ <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="$$createSimpleProduct.name$$" stepKey="seeProductName7"/> </test> - <test name="AdminUrlRewritesForProductInAnchorCategoriesTestAllStoreView" extends="AdminUrlRewritesForProductInAnchorCategoriesTest"> + <test name="AdminUrlRewritesForProductInAnchorCategoriesTestAllStoreViewTest" extends="AdminUrlRewritesForProductInAnchorCategoriesTest"> <annotations> <features value="Url Rewrite"/> <stories value="Url-rewrites for product in anchor categories for all store views"/> @@ -214,7 +214,7 @@ <remove keyForRemoval="uncheckRedirect2"/> </test> - <test name="AdminUrlRewritesForProductInAnchorCategoriesTestAllStoreViewWithConfigurationTurnedOff" extends="AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOff"> + <test name="AdminUrlRewritesForProductInAnchorCategoriesTestAllStoreViewWithConfigurationTurnedOffTest" extends="AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest"> <annotations> <features value="Url Rewrite"/> <stories value="Url-rewrites for product in anchor categories for all store views"/> @@ -241,7 +241,7 @@ <remove keyForRemoval="uncheckRedirect2"/> </test> - <test name="AdminUrlRewritesForProductsWithConfigurationTurnedOff"> + <test name="AdminUrlRewritesForProductsWithConfigurationTurnedOffTest"> <annotations> <features value="Url Rewrite"/> <stories value="No Url-rewrites for product if configuration to generate url rewrite for Generate 'category/product' URL Rewrites is enabled "/> diff --git a/app/code/Magento/Vault/Test/Mftf/Test/StorefrontVerifySecureURLRedirectVaultTest.xml b/app/code/Magento/Vault/Test/Mftf/Test/StorefrontVerifySecureURLRedirectVaultTest.xml index c9d4cb3391cfd..f496e500a4d9b 100644 --- a/app/code/Magento/Vault/Test/Mftf/Test/StorefrontVerifySecureURLRedirectVaultTest.xml +++ b/app/code/Magento/Vault/Test/Mftf/Test/StorefrontVerifySecureURLRedirectVaultTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectVault"> + <test name="StorefrontVerifySecureURLRedirectVaultTest"> <annotations> <features value="Vault"/> <stories value="Storefront Secure URLs"/> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifySecureURLRedirectWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifySecureURLRedirectWishlistTest.xml index 21fa334a43196..72f5bab1e6af5 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifySecureURLRedirectWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifySecureURLRedirectWishlistTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontVerifySecureURLRedirectWishlist"> + <test name="StorefrontVerifySecureURLRedirectWishlistTest"> <annotations> <features value="Wishlist"/> <stories value="Storefront Secure URLs"/> From da8dfc2697639ad170fced8fea2fe40ad2165edc Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Sun, 1 Mar 2020 21:32:10 +0100 Subject: [PATCH 071/153] #27117 Fix invalid file names for Functional Tests --- ... CreateAnAdminOrderUsingBraintreePaymentTest.xml} | 2 +- ...WithOnlinePaymentIncludingTaxAndDiscountTest.xml} | 2 +- ...Product.xml => AdminDeleteABundleProductTest.xml} | 2 +- ...=> AdminFilterProductListByBundleProductTest.xml} | 2 +- ...tBundleProductShownInCategoryListAndGridTest.xml} | 2 +- ...efrontCheckBundleProductOptionTierPricesTest.xml} | 2 +- ...et.xml => AdminChangeProductAttributeSetTest.xml} | 4 ++-- ...dminCreateCategoryWithProductsGridFilterTest.xml} | 2 +- ... => AdminCreateProductCustomAttributeSetTest.xml} | 2 +- ...henAssignedToCategoryWithoutCustomURLKeyTest.xml} | 2 +- ... => StorefrontProductNameWithDoubleQuoteTest.xml} | 4 ++-- ...ductWithCustomOptionsWithLongValuesTitleTest.xml} | 2 +- ...on.xml => StoreFrontMobileViewValidationTest.xml} | 2 +- ...irectNavigateFromCustomerViewCartProductTest.xml} | 2 +- ...inCreateDownloadableProductWithTierPriceTest.xml} | 2 +- ...ttonInMobile.xml => ShopByButtonInMobileTest.xml} | 2 +- ...onfigPaymentsConflictResolutionForPayPalTest.xml} | 12 ++++++------ ...e.xml => AdminConfigPaymentsSectionStateTest.xml} | 2 +- ...ml => AdminChangeCustomerGroupInNewOrderTest.xml} | 2 +- ....xml => StorefrontRedirectToOrderHistoryTest.xml} | 2 +- ...ry.xml => StorefrontCartPriceRuleCountryTest.xml} | 2 +- ...e.xml => StorefrontCartPriceRulePostcodeTest.xml} | 2 +- ...y.xml => StorefrontCartPriceRuleQuantityTest.xml} | 8 ++++---- ...tate.xml => StorefrontCartPriceRuleStateTest.xml} | 2 +- ...l.xml => StorefrontCartPriceRuleSubtotalTest.xml} | 4 ++-- ...inCreateTaxRateInvalidPostcodeTestLengthTest.xml} | 2 +- 26 files changed, 37 insertions(+), 37 deletions(-) rename app/code/Magento/Braintree/Test/Mftf/Test/{CreateAnAdminOrderUsingBraintreePaymentTest1.xml => CreateAnAdminOrderUsingBraintreePaymentTest.xml} (98%) rename app/code/Magento/Braintree/Test/Mftf/Test/{CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml => CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml} (99%) rename app/code/Magento/Bundle/Test/Mftf/Test/{AdminDeleteABundleProduct.xml => AdminDeleteABundleProductTest.xml} (99%) rename app/code/Magento/Bundle/Test/Mftf/Test/{AdminFilterProductListByBundleProduct.xml => AdminFilterProductListByBundleProductTest.xml} (98%) rename app/code/Magento/Bundle/Test/Mftf/Test/{StorefrontBundleProductShownInCategoryListAndGrid.xml => StorefrontBundleProductShownInCategoryListAndGridTest.xml} (99%) rename app/code/Magento/Bundle/Test/Mftf/Test/{StorefrontCheckBundleProductOptionTierPrices.xml => StorefrontCheckBundleProductOptionTierPricesTest.xml} (99%) rename app/code/Magento/Catalog/Test/Mftf/Test/{AdminChangeProductAttributeSet.xml => AdminChangeProductAttributeSetTest.xml} (95%) rename app/code/Magento/Catalog/Test/Mftf/Test/{AdminCreateCategoryWithProductsGridFilter.xml => AdminCreateCategoryWithProductsGridFilterTest.xml} (99%) rename app/code/Magento/Catalog/Test/Mftf/Test/{AdminCreateProductCustomAttributeSet.xml => AdminCreateProductCustomAttributeSetTest.xml} (98%) rename app/code/Magento/Catalog/Test/Mftf/Test/{AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey.xml => AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml} (99%) rename app/code/Magento/Catalog/Test/Mftf/Test/{StorefrontProductNameWithDoubleQuote.xml => StorefrontProductNameWithDoubleQuoteTest.xml} (98%) rename app/code/Magento/Catalog/Test/Mftf/Test/{StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle.xml => StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml} (99%) rename app/code/Magento/Cms/Test/Mftf/Test/{StoreFrontMobileViewValidation.xml => StoreFrontMobileViewValidationTest.xml} (98%) rename app/code/Magento/Customer/Test/Mftf/Test/{AdminProductBackRedirectNavigateFromCustomerViewCartProduct.xml => AdminProductBackRedirectNavigateFromCustomerViewCartProductTest.xml} (99%) rename app/code/Magento/Downloadable/Test/Mftf/Test/{AdminCreateDownloadableProductWithTierPriceText.xml => AdminCreateDownloadableProductWithTierPriceTest.xml} (91%) rename app/code/Magento/LayeredNavigation/Test/Mftf/Test/{ShopByButtonInMobile.xml => ShopByButtonInMobileTest.xml} (99%) rename app/code/Magento/Paypal/Test/Mftf/Test/{AdminConfigPaymentsConflictResolutionForPayPal.xml => AdminConfigPaymentsConflictResolutionForPayPalTest.xml} (97%) rename app/code/Magento/Paypal/Test/Mftf/Test/{AdminConfigPaymentsSectionState.xml => AdminConfigPaymentsSectionStateTest.xml} (95%) rename app/code/Magento/Sales/Test/Mftf/Test/{AdminChangeCustomerGroupInNewOrder.xml => AdminChangeCustomerGroupInNewOrderTest.xml} (96%) rename app/code/Magento/Sales/Test/Mftf/Test/{StorefrontRedirectToOrderHistory.xml => StorefrontRedirectToOrderHistoryTest.xml} (98%) rename app/code/Magento/SalesRule/Test/Mftf/Test/{StorefrontCartPriceRuleCountry.xml => StorefrontCartPriceRuleCountryTest.xml} (99%) rename app/code/Magento/SalesRule/Test/Mftf/Test/{StorefrontCartPriceRulePostcode.xml => StorefrontCartPriceRulePostcodeTest.xml} (99%) rename app/code/Magento/SalesRule/Test/Mftf/Test/{StorefrontCartPriceRuleQuantity.xml => StorefrontCartPriceRuleQuantityTest.xml} (95%) rename app/code/Magento/SalesRule/Test/Mftf/Test/{StorefrontCartPriceRuleState.xml => StorefrontCartPriceRuleStateTest.xml} (99%) rename app/code/Magento/SalesRule/Test/Mftf/Test/{StorefrontCartPriceRuleSubtotal.xml => StorefrontCartPriceRuleSubtotalTest.xml} (97%) rename app/code/Magento/Tax/Test/Mftf/Test/{AdminCreateTaxRateInvalidPostcodeTestLength.xml => AdminCreateTaxRateInvalidPostcodeTestLengthTest.xml} (97%) diff --git a/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml b/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest.xml similarity index 98% rename from app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml rename to app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest.xml index c45a8aece5ffc..77dc83eec1176 100644 --- a/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml +++ b/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="CreateAnAdminOrderUsingBraintreePaymentTest1"> + <test name="CreateAnAdminOrderUsingBraintreePaymentTest1Test"> <annotations> <features value="Backend"/> <stories value="Creation an admin order using Braintree payment"/> diff --git a/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml b/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml similarity index 99% rename from app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml rename to app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml index d2b0479f2bba6..5efa5fd0db6b6 100644 --- a/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml +++ b/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscountTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscount"> + <test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscountTest"> <annotations> <features value="Braintree"/> <stories value="Get access to a New Credit Memo Page from Invoice for Order payed with online payment via Admin"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProduct.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml similarity index 99% rename from app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProduct.xml rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml index f272f3f98a8c9..a98d544aad3b6 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProduct.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminDeleteABundleProduct"> + <test name="AdminDeleteABundleProductTest"> <annotations> <features value="Bundle"/> <stories value="Admin list bundle products"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProduct.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml similarity index 98% rename from app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProduct.xml rename to app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml index 5aa72fb651985..dea39fcb45908 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProduct.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminFilterProductListByBundleProduct"> + <test name="AdminFilterProductListByBundleProductTest"> <annotations> <features value="Bundle"/> <stories value="Admin list bundle products"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGrid.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml similarity index 99% rename from app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGrid.xml rename to app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml index 364d4fa68e590..62a66b7d092ef 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGrid.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontBundleProductShownInCategoryListAndGrid"> + <test name="StorefrontBundleProductShownInCategoryListAndGridTest"> <annotations> <features value="Bundle"/> <stories value="Bundle products list on Storefront"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml similarity index 99% rename from app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml rename to app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml index 4bb54436e8729..0c9be915a7a8b 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPricesTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontCheckBundleProductOptionTierPrices"> + <test name="StorefrontCheckBundleProductOptionTierPricesTest"> <annotations> <features value="Bundle"/> <stories value="View bundle products"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSet.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSetTest.xml similarity index 95% rename from app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSet.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSetTest.xml index cdb9a0a8b75d0..2e55d9fbfa4bc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSet.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSetTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminChangeProductAttributeSet"> + <test name="AdminChangeProductAttributeSetTest"> <annotations> <features value="Checkout"/> <stories value="The required product attribute is not displayed when change attribute set"/> @@ -49,7 +49,7 @@ <actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> - <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> + <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/> </after> <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilter.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilterTest.xml similarity index 99% rename from app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilter.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilterTest.xml index 2a4718223ef0c..9a580df52259b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilter.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilterTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminCreateCategoryWithProductsGridFilter"> + <test name="AdminCreateCategoryWithProductsGridFilterTest"> <annotations> <stories value="Create categories"/> <title value="Apply category products grid filter"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSet.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml similarity index 98% rename from app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSet.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml index 7f6feaff3ed5d..2fbd1ac2cf321 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSet.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminCreateProductCustomAttributeSet"> + <test name="AdminCreateProductCustomAttributeSetTest"> <annotations> <features value="Catalog"/> <stories value="Add/Update attribute set"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml similarity index 99% rename from app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml index 400cc891b3c91..9babd94ef2641 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey"> + <test name="AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest"> <annotations> <stories value="Product"/> <features value="Catalog"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest.xml similarity index 98% rename from app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest.xml index 07c2e8a972596..1615f75395fed 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontProductNameWithDoubleQuote"> + <test name="StorefrontProductNameWithDoubleQuoteTest"> <annotations> <features value="Catalog"/> <stories value="Create products"/> @@ -66,7 +66,7 @@ </actionGroup> </test> - <test name="StorefrontProductNameWithHTMLEntities"> + <test name="StorefrontProductNameWithHTMLEntitiesTest"> <annotations> <features value="Catalog"/> <stories value="Create product"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml similarity index 99% rename from app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml index 36a803b03199b..b8aed7f0ac2ad 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle"> + <test name="StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest"> <annotations> <features value="Catalog"/> <stories value="Custom options"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/StoreFrontMobileViewValidation.xml b/app/code/Magento/Cms/Test/Mftf/Test/StoreFrontMobileViewValidationTest.xml similarity index 98% rename from app/code/Magento/Cms/Test/Mftf/Test/StoreFrontMobileViewValidation.xml rename to app/code/Magento/Cms/Test/Mftf/Test/StoreFrontMobileViewValidationTest.xml index 6165def067ef4..38005682287e8 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/StoreFrontMobileViewValidation.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/StoreFrontMobileViewValidationTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StoreFrontMobileViewValidation"> + <test name="StoreFrontMobileViewValidationTest"> <annotations> <features value="Cms"/> <stories value="Mobile view page footer should stick to the bottom of page on Store front"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProduct.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProductTest.xml similarity index 99% rename from app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProduct.xml rename to app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProductTest.xml index 18106836ce137..3e65c688e3474 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProduct.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminProductBackRedirectNavigateFromCustomerViewCartProductTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminProductBackRedirectNavigateFromCustomerViewCartProduct"> + <test name="AdminProductBackRedirectNavigateFromCustomerViewCartProductTest"> <annotations> <features value="Customer"/> <stories value="Product Back Button"/> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceText.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceTest.xml similarity index 91% rename from app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceText.xml rename to app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceTest.xml index ca4e560506ad0..768f766098aa6 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceText.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminCreateDownloadableProductWithTierPriceText" extends="AdminCreateDownloadableProductWithGroupPriceTest"> + <test name="AdminCreateDownloadableProductWithTierPriceTextTest" extends="AdminCreateDownloadableProductWithGroupPriceTest"> <annotations> <features value="Catalog"/> <stories value="Create Downloadable Product"/> diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml similarity index 99% rename from app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml rename to app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml index 76a9cc8f920a1..0e0eb352c8d33 100644 --- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="ShopByButtonInMobile"> + <test name="ShopByButtonInMobileTest"> <annotations> <features value="Layered Navigation"/> <stories value="Storefront Shop By collapsible button in mobile themes"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPal.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPalTest.xml similarity index 97% rename from app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPal.xml rename to app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPalTest.xml index 3e1a825861b5e..db5fb3848dcf1 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPal.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPalTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdom"> + <test name="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest"> <annotations> <features value="PayPal"/> <stories value="Payment methods"/> @@ -73,7 +73,7 @@ <argument name="countryCode" value="gb"/> </actionGroup> </test> - <test name="AdminConfigPaymentsConflictResolutionForPayPalInJapan" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdom"> + <test name="AdminConfigPaymentsConflictResolutionForPayPalInJapanTest" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest"> <annotations> <features value="PayPal"/> <stories value="Payment methods"/> @@ -113,7 +113,7 @@ <argument name="countryCode" value="jp"/> </actionGroup> </test> - <test name="AdminConfigPaymentsConflictResolutionForPayPalInFrance" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdom"> + <test name="AdminConfigPaymentsConflictResolutionForPayPalInFranceTest" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest"> <annotations> <features value="PayPal"/> <stories value="Payment methods"/> @@ -153,7 +153,7 @@ <argument name="countryCode" value="fr"/> </actionGroup> </test> - <test name="AdminConfigPaymentsConflictResolutionForPayPalInHongKong" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdom"> + <test name="AdminConfigPaymentsConflictResolutionForPayPalInHongKongTest" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest"> <annotations> <features value="PayPal"/> <stories value="Payment methods"/> @@ -193,7 +193,7 @@ <argument name="countryCode" value="hk"/> </actionGroup> </test> - <test name="AdminConfigPaymentsConflictResolutionForPayPalInItaly" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdom"> + <test name="AdminConfigPaymentsConflictResolutionForPayPalInItalyTest" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest"> <annotations> <features value="PayPal"/> <stories value="Payment methods"/> @@ -233,7 +233,7 @@ <argument name="countryCode" value="it"/> </actionGroup> </test> - <test name="AdminConfigPaymentsConflictResolutionForPayPalInSpain" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdom"> + <test name="AdminConfigPaymentsConflictResolutionForPayPalInSpainTest" extends="AdminConfigPaymentsConflictResolutionForPayPalInUnitedKingdomTest"> <annotations> <features value="PayPal"/> <stories value="Payment methods"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionStateTest.xml similarity index 95% rename from app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml rename to app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionStateTest.xml index ba5e701ceea66..62d77d8aae6f8 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionStateTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminConfigPaymentsSectionState"> + <test name="AdminConfigPaymentsSectionStateTest"> <annotations> <features value="PayPal"/> <stories value="Payment methods"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrder.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrderTest.xml similarity index 96% rename from app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrder.xml rename to app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrderTest.xml index cabb6edec2f52..c8b2b66a758eb 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrder.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrderTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminChangeCustomerGroupInNewOrder"> + <test name="AdminChangeCustomerGroupInNewOrderTest"> <annotations> <title value="Customer account group cannot be selected while creating a new customer in order"/> <stories value="MC-15290: Customer account group cannot be selected while creating a new customer in order"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontRedirectToOrderHistory.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontRedirectToOrderHistoryTest.xml similarity index 98% rename from app/code/Magento/Sales/Test/Mftf/Test/StorefrontRedirectToOrderHistory.xml rename to app/code/Magento/Sales/Test/Mftf/Test/StorefrontRedirectToOrderHistoryTest.xml index ad3a411d92414..ceb8c5f9b1aa2 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontRedirectToOrderHistory.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontRedirectToOrderHistoryTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontRedirectToOrderHistory"> + <test name="StorefrontRedirectToOrderHistoryTest"> <annotations> <features value="Redirection Rules"/> <stories value="Create Invoice"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountry.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountryTest.xml similarity index 99% rename from app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountry.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountryTest.xml index 832b9ef8bd4b4..1406d4dfbde67 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountry.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleCountryTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontCartPriceRuleCountry"> + <test name="StorefrontCartPriceRuleCountryTest"> <annotations> <features value="SalesRule"/> <stories value="Create cart price rule"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcode.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcodeTest.xml similarity index 99% rename from app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcode.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcodeTest.xml index 9882b04bdc956..aade41b30284c 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcode.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRulePostcodeTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontCartPriceRulePostcode"> + <test name="StorefrontCartPriceRulePostcodeTest"> <annotations> <features value="SalesRule"/> <stories value="Create cart price rule"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantity.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantityTest.xml similarity index 95% rename from app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantity.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantityTest.xml index 08a7bd72cd18d..283d22351b1f1 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantity.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleQuantityTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontCartPriceRuleQuantity"> + <test name="StorefrontCartPriceRuleQuantityTest"> <annotations> <features value="SalesRule"/> <stories value="Create cart price rule"/> @@ -24,7 +24,7 @@ <createData entity="_defaultProduct" stepKey="createPreReqProduct"> <requiredEntity createDataKey="createPreReqCategory"/> </createData> - <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> + <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> @@ -62,8 +62,8 @@ <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="1.00" stepKey="fillDiscountAmount"/> <click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/> <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> - <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> - + <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/> + <!-- Add 1 product to the cart --> <amOnPage url="$$createPreReqProduct.name$$.html" stepKey="goToProductPage"/> <waitForPageLoad stepKey="waitForProductPageLoad"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleState.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleStateTest.xml similarity index 99% rename from app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleState.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleStateTest.xml index 19ffb7c36f992..fafede4120573 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleState.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleStateTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontCartPriceRuleState"> + <test name="StorefrontCartPriceRuleStateTest"> <annotations> <features value="SalesRule"/> <stories value="Create cart price rule"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotal.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotalTest.xml similarity index 97% rename from app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotal.xml rename to app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotalTest.xml index 94e53cfc88047..a32d42e26d15f 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotal.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartPriceRuleSubtotalTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontCartPriceRuleSubtotal"> + <test name="StorefrontCartPriceRuleSubtotalTest"> <annotations> <features value="SalesRule"/> <stories value="Create cart price rule"/> @@ -24,7 +24,7 @@ <createData entity="_defaultProduct" stepKey="createPreReqProduct"> <requiredEntity createDataKey="createPreReqCategory"/> </createData> - <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> + <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLength.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLengthTest.xml similarity index 97% rename from app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLength.xml rename to app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLengthTest.xml index a98de31b42f81..3befada509afa 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLength.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateInvalidPostcodeTestLengthTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminCreateTaxRateInvalidPostcodeTestLength"> + <test name="AdminCreateTaxRateInvalidPostcodeTestLengthTest"> <annotations> <stories value="Create tax rate"/> <title value="Create tax rate, invalid post code length"/> From beaaf5bacfa51c99611943c79e0ffba5bfc1ba21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Szubert?= <bartlomiejszubert@gmail.com> Date: Tue, 3 Mar 2020 21:38:08 +0100 Subject: [PATCH 072/153] Cleanup ObjectManager usage - Magento_WebapiAsync --- app/code/Magento/WebapiAsync/Model/Config.php | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/WebapiAsync/Model/Config.php b/app/code/Magento/WebapiAsync/Model/Config.php index 7980be479dfa5..7329862ca528c 100644 --- a/app/code/Magento/WebapiAsync/Model/Config.php +++ b/app/code/Magento/WebapiAsync/Model/Config.php @@ -3,35 +3,34 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - declare(strict_types=1); namespace Magento\WebapiAsync\Model; +use Magento\AsynchronousOperations\Model\ConfigInterface; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Serialize\SerializerInterface; use Magento\Webapi\Model\Cache\Type\Webapi as WebapiCache; use Magento\Webapi\Model\Config as WebapiConfig; -use Magento\Framework\App\ObjectManager; -use Magento\Framework\Serialize\SerializerInterface; -use Magento\Framework\Exception\LocalizedException; use Magento\Webapi\Model\Config\Converter; /** * Class for accessing to Webapi_Async configuration. */ -class Config implements \Magento\AsynchronousOperations\Model\ConfigInterface +class Config implements ConfigInterface { /** - * @var \Magento\Webapi\Model\Cache\Type\Webapi + * @var WebapiCache */ private $cache; /** - * @var \Magento\Webapi\Model\Config + * @var WebapiConfig */ private $webApiConfig; /** - * @var \Magento\Framework\Serialize\SerializerInterface + * @var SerializerInterface */ private $serializer; @@ -43,18 +42,18 @@ class Config implements \Magento\AsynchronousOperations\Model\ConfigInterface /** * Initialize dependencies. * - * @param \Magento\Webapi\Model\Cache\Type\Webapi $cache - * @param \Magento\Webapi\Model\Config $webApiConfig - * @param \Magento\Framework\Serialize\SerializerInterface|null $serializer + * @param WebapiCache $cache + * @param WebapiConfig $webApiConfig + * @param SerializerInterface $serializer */ public function __construct( WebapiCache $cache, WebapiConfig $webApiConfig, - SerializerInterface $serializer = null + SerializerInterface $serializer ) { $this->cache = $cache; $this->webApiConfig = $webApiConfig; - $this->serializer = $serializer ? : ObjectManager::getInstance()->get(SerializerInterface::class); + $this->serializer = $serializer; } /** From 1045eb8a0cad9fef1502bfdf2de818e77df1fbe4 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Tue, 3 Mar 2020 23:14:11 +0100 Subject: [PATCH 073/153] #27117 Fix invalid test name --- .../Test/AdminCreateDownloadableProductWithTierPriceTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceTest.xml index 768f766098aa6..131193e7743e2 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithTierPriceTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminCreateDownloadableProductWithTierPriceTextTest" extends="AdminCreateDownloadableProductWithGroupPriceTest"> + <test name="AdminCreateDownloadableProductWithTierPriceTest" extends="AdminCreateDownloadableProductWithGroupPriceTest"> <annotations> <features value="Catalog"/> <stories value="Create Downloadable Product"/> From 55c226636e4f45f63cf9bdcd3b12b438bbd2f634 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Wed, 4 Mar 2020 17:47:39 +0200 Subject: [PATCH 074/153] Fix static test --- .../Model/ProductUrlPathGenerator.php | 5 +- .../Model/ProductUrlPathGeneratorTest.php | 62 ++++++++++++++----- 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlPathGenerator.php b/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlPathGenerator.php index a5553535b390a..da2dd8a505869 100644 --- a/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlPathGenerator.php +++ b/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlPathGenerator.php @@ -3,20 +3,19 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\CatalogUrlRewrite\Model; -use Magento\Store\Model\Store; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Category; use Magento\Catalog\Model\Product; -use Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Store\Model\ScopeInterface; use Magento\Store\Model\StoreManagerInterface; /** - * Class ProductUrlPathGenerator + * Model product url path generator */ class ProductUrlPathGenerator { diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlPathGeneratorTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlPathGeneratorTest.php index 233d0703448ca..95ef16c5ace4c 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlPathGeneratorTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlPathGeneratorTest.php @@ -7,34 +7,42 @@ namespace Magento\CatalogUrlRewrite\Test\Unit\Model; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Category; +use Magento\Catalog\Model\Product; +use Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator; use Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; +use PHPUnit\Framework\TestCase; +use PHPUnit_Framework_MockObject_MockObject as MockObject; /** - * Class ProductUrlPathGeneratorTest + * Verify ProductUrlPathGenerator class */ -class ProductUrlPathGeneratorTest extends \PHPUnit\Framework\TestCase +class ProductUrlPathGeneratorTest extends TestCase { - /** @var \Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator */ + /** @var ProductUrlPathGenerator */ protected $productUrlPathGenerator; - /** @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var StoreManagerInterface|MockObject */ protected $storeManager; - /** @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ScopeConfigInterface|MockObject */ protected $scopeConfig; - /** @var \Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var CategoryUrlPathGenerator|MockObject */ protected $categoryUrlPathGenerator; - /** @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Product|MockObject */ protected $product; - /** @var \Magento\Catalog\Api\ProductRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ProductRepositoryInterface|MockObject */ protected $productRepository; - /** @var \Magento\Catalog\Model\Category|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Category|MockObject */ protected $category; /** @@ -42,7 +50,7 @@ class ProductUrlPathGeneratorTest extends \PHPUnit\Framework\TestCase */ protected function setUp(): void { - $this->category = $this->createMock(\Magento\Catalog\Model\Category::class); + $this->category = $this->createMock(Category::class); $productMethods = [ '__wakeup', 'getData', @@ -54,17 +62,17 @@ protected function setUp(): void 'setStoreId', ]; - $this->product = $this->createPartialMock(\Magento\Catalog\Model\Product::class, $productMethods); - $this->storeManager = $this->createMock(\Magento\Store\Model\StoreManagerInterface::class); - $this->scopeConfig = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class); + $this->product = $this->createPartialMock(Product::class, $productMethods); + $this->storeManager = $this->createMock(StoreManagerInterface::class); + $this->scopeConfig = $this->createMock(ScopeConfigInterface::class); $this->categoryUrlPathGenerator = $this->createMock( - \Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator::class + CategoryUrlPathGenerator::class ); - $this->productRepository = $this->createMock(\Magento\Catalog\Api\ProductRepositoryInterface::class); + $this->productRepository = $this->createMock(ProductRepositoryInterface::class); $this->productRepository->expects($this->any())->method('getById')->willReturn($this->product); $this->productUrlPathGenerator = (new ObjectManager($this))->getObject( - \Magento\CatalogUrlRewrite\Model\ProductUrlPathGenerator::class, + ProductUrlPathGenerator::class, [ 'storeManager' => $this->storeManager, 'scopeConfig' => $this->scopeConfig, @@ -75,6 +83,8 @@ protected function setUp(): void } /** + * Data provider for testGetUrlPath. + * * @return array */ public function getUrlPathDataProvider(): array @@ -89,6 +99,8 @@ public function getUrlPathDataProvider(): array } /** + * Verify get url path. + * * @dataProvider getUrlPathDataProvider * @param string|null|bool $urlKey * @param string|null|bool $productName @@ -109,6 +121,8 @@ public function testGetUrlPath($urlKey, $productName, $formatterCalled, $result) } /** + * Verify get url key. + * * @param string|bool $productUrlKey * @param string|bool $expectedUrlKey * @return void @@ -122,6 +136,8 @@ public function testGetUrlKey($productUrlKey, $expectedUrlKey): void } /** + * Data provider for testGetUrlKey. + * * @return array */ public function getUrlKeyDataProvider(): array @@ -133,6 +149,8 @@ public function getUrlKeyDataProvider(): array } /** + * Verify get url path with default utl key. + * * @param string|null|bool $storedUrlKey * @param string|null|bool $productName * @param string $expectedUrlKey @@ -150,6 +168,8 @@ public function testGetUrlPathDefaultUrlKey($storedUrlKey, $productName, $expect } /** + * Data provider for testGetUrlPathDefaultUrlKey. + * * @return array */ public function getUrlPathDefaultUrlKeyDataProvider(): array @@ -161,6 +181,8 @@ public function getUrlPathDefaultUrlKeyDataProvider(): array } /** + * Verify get url path with category. + * * @return void */ public function testGetUrlPathWithCategory(): void @@ -177,6 +199,8 @@ public function testGetUrlPathWithCategory(): void } /** + * Verify get url path with suffix. + * * @return void */ public function testGetUrlPathWithSuffix(): void @@ -198,6 +222,8 @@ public function testGetUrlPathWithSuffix(): void } /** + * Verify get url path with suffix and category and store. + * * @return void */ public function testGetUrlPathWithSuffixAndCategoryAndStore(): void @@ -219,6 +245,8 @@ public function testGetUrlPathWithSuffixAndCategoryAndStore(): void } /** + * Verify get canonical url path. + * * @return void */ public function testGetCanonicalUrlPath(): void @@ -232,6 +260,8 @@ public function testGetCanonicalUrlPath(): void } /** + * Verify get canonical path with category. + * * @return void */ public function testGetCanonicalUrlPathWithCategory(): void From 9c0211605537143b9cde9516a1be4a3173edb0b0 Mon Sep 17 00:00:00 2001 From: Vasilii Burlacu <v.burlacu@atwix.com> Date: Wed, 4 Mar 2020 17:58:06 +0200 Subject: [PATCH 075/153] Display category filter item in layered navigation based on the system configuration from admin area --- .../Model/Config/LayerCategoryConfig.php | 82 +++++++++++++++++ .../Catalog/Model/Layer/FilterList.php | 22 ++++- .../Test/Unit/Model/Layer/FilterListTest.php | 88 ++++++++++++++++++- .../Magento/Catalog/etc/adminhtml/system.xml | 6 ++ app/code/Magento/Catalog/etc/config.xml | 3 + 5 files changed, 196 insertions(+), 5 deletions(-) create mode 100644 app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php diff --git a/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php b/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php new file mode 100644 index 0000000000000..3ee9bd888f568 --- /dev/null +++ b/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php @@ -0,0 +1,82 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Model\Config; + +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; + +/** + * Config for category in the layered navigation + */ +class LayerCategoryConfig +{ + private const XML_PATH_CATALOG_LAYERED_NAVIGATION_DISPLAY_CATEGORY = 'catalog/layered_navigation/display_category'; + + /** + * @var ScopeConfigInterface + */ + private $scopeConfig; + + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * LayerCategoryConfig constructor + * + * @param ScopeConfigInterface $scopeConfig + * @param StoreManagerInterface $storeManager + */ + public function __construct( + ScopeConfigInterface $scopeConfig, + StoreManagerInterface $storeManager + ) { + $this->scopeConfig = $scopeConfig; + $this->storeManager = $storeManager; + } + + /** + * Check if category filter item should be added in the layered navigation + * + * @param string $scopeType + * @param null|int|string $scopeCode + * + * @return bool + */ + public function isCategoryFilterVisibleInLayerNavigation( + $scopeType = ScopeInterface::SCOPE_STORES, + $scopeCode = null + ): bool { + if (!$scopeCode) { + $scopeCode = $this->getStoreId(); + } + + return $this->scopeConfig->isSetFlag( + static::XML_PATH_CATALOG_LAYERED_NAVIGATION_DISPLAY_CATEGORY, + $scopeType, + $scopeCode + ); + } + + /** + * Get the current store ID + * + * @return int|null + */ + protected function getStoreId(): ?int + { + try { + return (int) $this->storeManager->getStore()->getId(); + } catch (NoSuchEntityException $e) { + return null; + } + } +} diff --git a/app/code/Magento/Catalog/Model/Layer/FilterList.php b/app/code/Magento/Catalog/Model/Layer/FilterList.php index b8e9b8ad4aaa5..2f32971c80bed 100644 --- a/app/code/Magento/Catalog/Model/Layer/FilterList.php +++ b/app/code/Magento/Catalog/Model/Layer/FilterList.php @@ -7,6 +7,9 @@ namespace Magento\Catalog\Model\Layer; +use Magento\Catalog\Model\Config\LayerCategoryConfig; +use Magento\Framework\App\ObjectManager; + /** * Layer navigation filters */ @@ -44,18 +47,27 @@ class FilterList */ protected $filters = []; + /** + * @var LayerCategoryConfig|null + */ + private $layerCategoryConfig; + /** * @param \Magento\Framework\ObjectManagerInterface $objectManager * @param FilterableAttributeListInterface $filterableAttributes * @param array $filters + * @param LayerCategoryConfig|null $layerCategoryConfig */ public function __construct( \Magento\Framework\ObjectManagerInterface $objectManager, FilterableAttributeListInterface $filterableAttributes, - array $filters = [] + array $filters = [], + LayerCategoryConfig $layerCategoryConfig = null ) { $this->objectManager = $objectManager; $this->filterableAttributes = $filterableAttributes; + $this->layerCategoryConfig = $layerCategoryConfig ?: + ObjectManager::getInstance()->get(LayerCategoryConfig::class); /** Override default filter type models */ $this->filterTypes = array_merge($this->filterTypes, $filters); @@ -70,9 +82,11 @@ public function __construct( public function getFilters(\Magento\Catalog\Model\Layer $layer) { if (!count($this->filters)) { - $this->filters = [ - $this->objectManager->create($this->filterTypes[self::CATEGORY_FILTER], ['layer' => $layer]), - ]; + if ($this->layerCategoryConfig->isCategoryFilterVisibleInLayerNavigation()) { + $this->filters = [ + $this->objectManager->create($this->filterTypes[self::CATEGORY_FILTER], ['layer' => $layer]), + ]; + } foreach ($this->filterableAttributes->getList() as $attribute) { $this->filters[] = $this->createAttributeFilter($attribute, $layer); } diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php index 731c5efd99746..92734bae2e444 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php @@ -7,8 +7,13 @@ namespace Magento\Catalog\Test\Unit\Model\Layer; +use Magento\Catalog\Model\Config\LayerCategoryConfig; use \Magento\Catalog\Model\Layer\FilterList; +use PHPUnit\Framework\MockObject\MockObject; +/** + * Filter List Test + */ class FilterListTest extends \PHPUnit\Framework\TestCase { /** @@ -36,6 +41,14 @@ class FilterListTest extends \PHPUnit\Framework\TestCase */ protected $model; + /** + * @var LayerCategoryConfig|MockObject + */ + private $layerCategoryConfigMock; + + /** + * Set Up + */ protected function setUp() { $this->objectManagerMock = $this->createMock(\Magento\Framework\ObjectManagerInterface::class); @@ -51,8 +64,14 @@ protected function setUp() ]; $this->layerMock = $this->createMock(\Magento\Catalog\Model\Layer::class); + $this->layerCategoryConfigMock = $this->createMock(LayerCategoryConfig::class); - $this->model = new FilterList($this->objectManagerMock, $this->attributeListMock, $filters); + $this->model = new FilterList( + $this->objectManagerMock, + $this->attributeListMock, + $filters, + $this->layerCategoryConfigMock + ); } /** @@ -90,9 +109,57 @@ public function testGetFilters($method, $value, $expectedClass) ->method('getList') ->will($this->returnValue([$this->attributeMock])); + $this->layerCategoryConfigMock->expects($this->once()) + ->method('isCategoryVisibleInLayer') + ->willReturn(true); + $this->assertEquals(['filter', 'filter'], $this->model->getFilters($this->layerMock)); } + /** + * Test filters list result when category should not be included + * + * @param string $method + * @param string $value + * @param string $expectedClass + * @param array $expectedResult + * + * @dataProvider getFiltersWithoutCategoryDataProvider + * + * @return void + */ + public function testGetFiltersWithoutCategoryFilter( + string $method, + string $value, + string $expectedClass, + array $expectedResult + ): void { + $this->objectManagerMock->expects($this->at(0)) + ->method('create') + ->with( + $expectedClass, + [ + 'data' => ['attribute_model' => $this->attributeMock], + 'layer' => $this->layerMock + ] + ) + ->will($this->returnValue('filter')); + + $this->attributeMock->expects($this->once()) + ->method($method) + ->will($this->returnValue($value)); + + $this->attributeListMock->expects($this->once()) + ->method('getList') + ->will($this->returnValue([$this->attributeMock])); + + $this->layerCategoryConfigMock->expects($this->once()) + ->method('isCategoryVisibleInLayer') + ->willReturn(false); + + $this->assertEquals($expectedResult, $this->model->getFilters($this->layerMock)); + } + /** * @return array */ @@ -116,4 +183,23 @@ public function getFiltersDataProvider() ] ]; } + + /** + * Provides attribute filters without category item + * + * @return array + */ + public function getFiltersWithoutCategoryDataProvider(): array + { + return [ + 'Filters contains only price attribute' => [ + 'method' => 'getFrontendInput', + 'value' => 'price', + 'expectedClass' => 'PriceFilterClass', + 'expectedResult' => [ + 'filter' + ] + ] + ]; + } } diff --git a/app/code/Magento/Catalog/etc/adminhtml/system.xml b/app/code/Magento/Catalog/etc/adminhtml/system.xml index f59990cdcea96..f548c23b68ce3 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/system.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/system.xml @@ -138,6 +138,12 @@ <hide_in_single_store_mode>1</hide_in_single_store_mode> </field> </group> + <group id="layered_navigation"> + <field id="display_category" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <label>Display Category</label> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + </field> + </group> <group id="navigation" translate="label" type="text" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Category Top Navigation</label> <field id="max_depth" translate="label" type="text" sortOrder="1" showInDefault="1" canRestore="1"> diff --git a/app/code/Magento/Catalog/etc/config.xml b/app/code/Magento/Catalog/etc/config.xml index 68289904db0cf..e7beb3d083226 100644 --- a/app/code/Magento/Catalog/etc/config.xml +++ b/app/code/Magento/Catalog/etc/config.xml @@ -54,6 +54,9 @@ <time_format>12h</time_format> <forbidden_extensions>php,exe</forbidden_extensions> </custom_options> + <layered_navigation> + <display_category>1</display_category> + </layered_navigation> </catalog> <indexer> <catalog_product_price> From 2619c78466015857a37c421110e69dd80156633d Mon Sep 17 00:00:00 2001 From: Burlacu Vasilii <v.burlacu@atwix.com> Date: Thu, 5 Mar 2020 09:21:00 +0200 Subject: [PATCH 076/153] Fixing failed tests --- app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php | 2 +- .../Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php b/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php index 3ee9bd888f568..50cf9f39f26ba 100644 --- a/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php +++ b/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php @@ -71,7 +71,7 @@ public function isCategoryFilterVisibleInLayerNavigation( * * @return int|null */ - protected function getStoreId(): ?int + private function getStoreId(): ?int { try { return (int) $this->storeManager->getStore()->getId(); diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php index 92734bae2e444..2b579ecea6b83 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php @@ -13,6 +13,8 @@ /** * Filter List Test + * + * Check whenever the given filters list matches the expected result */ class FilterListTest extends \PHPUnit\Framework\TestCase { From 4d22c1f983ec344ea713ad491f6613d0bed6d04c Mon Sep 17 00:00:00 2001 From: Serhiy Yelahin <serhiy.yelahin@transoftgroup.com> Date: Thu, 5 Mar 2020 10:36:15 +0200 Subject: [PATCH 077/153] MC-32111: MFTF Test for Recently Viewed products issues in does not work on store view level --- ...refrontRecentlyViewedWidgetActionGroup.xml | 22 +++ .../Data/RecentlyViewedProductStoreData.xml | 23 +++ .../StoreFrontRecentProductSection.xml | 15 ++ ...rontRecentlyViewedAtStoreViewLevelTest.xml | 149 ++++++++++++++++++ .../AdminEditCMSPageContentActionGroup.xml | 24 +++ ...nInsertRecentlyViewedWidgetActionGroup.xml | 40 +++++ .../Cms/Test/Mftf/Data/CmsHomepageData.xml | 16 ++ .../AdminRecentlyViewedWidgetSection.xml | 14 ++ 8 files changed, 303 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Data/RecentlyViewedProductStoreData.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Section/StoreFrontRecentProductSection.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml create mode 100644 app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminEditCMSPageContentActionGroup.xml create mode 100644 app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminInsertRecentlyViewedWidgetActionGroup.xml create mode 100644 app/code/Magento/Cms/Test/Mftf/Data/CmsHomepageData.xml create mode 100644 app/code/Magento/Cms/Test/Mftf/Section/AdminRecentlyViewedWidgetSection.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup.xml new file mode 100644 index 0000000000000..8986db7af9246 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup"> + <annotations> + <description>Goes to the home Page Recently VIewed Product and Grab the Prdouct name and Position from it.</description> + </annotations> + <arguments> + <argument name="productName" type="string"/> + <argument name="productPosition" type="string"/> + </arguments> + <grabTextFrom selector="{{StoreFrontRecentlyViewedProductSection.ProductName(productPosition)}}" stepKey="grabRelatedProductPosition"/> + <assertContains expected="{{productName}}" actual="$grabRelatedProductPosition" stepKey="assertRelatedProductName"/> + </actionGroup> +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/RecentlyViewedProductStoreData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/RecentlyViewedProductStoreData.xml new file mode 100644 index 0000000000000..15eec8495234b --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Data/RecentlyViewedProductStoreData.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="RecentlyViewedProductScopeStore"> + <data key="path">catalog/recently_products/scope</data> + <data key="value">store</data> + </entity> + <entity name="RecentlyViewedProductScopeWebsite"> + <data key="path">catalog/recently_products/scope</data> + <data key="value">website</data> + </entity> + <entity name="RecentlyViewedProductScopeStoreGroup"> + <data key="path">catalog/recently_products/scope</data> + <data key="value">group</data> + </entity> +</entities> \ No newline at end of file diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StoreFrontRecentProductSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StoreFrontRecentProductSection.xml new file mode 100644 index 0000000000000..387e252ae93d4 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Section/StoreFrontRecentProductSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + --> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + + <section name="StoreFrontRecentlyViewedProductSection"> + <element name="ProductName" type="text" selector="//div[@class='products-grid']/ol/li[position()={{position}}]/div/div[@class='product-item-details']/strong/a" parameterized="true"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml new file mode 100644 index 0000000000000..afcf42fb0431a --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StoreFrontRecentlyViewedAtStoreViewLevelTest"> + <annotations> + <stories value="Recently Viewed Product"/> + <title value="Recently Viewed Product at store view level"/> + <description value="Recently Viewed Product should not be displayed on second store view, if configured as, Per Store View "/> + <testCaseId value="MC-30453"/> + <severity value="CRITICAL"/> + <group value="catalog"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <!--Create Simple Product and Category --> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="SimpleProduct" stepKey="createSimpleProduct2"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="SimpleProduct" stepKey="createSimpleProduct3"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="SimpleProduct" stepKey="createSimpleProduct4"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <!--Create storeView 1--> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewOne"> + <argument name="customStore" value="customStoreEN"/> + </actionGroup> + <!-- Set Stores > Configurations > Catalog > Recently Viewed/Compared Products > Show for Current = store view--> + <magentoCLI command="config:set {{RecentlyViewedProductScopeStore.path}} {{RecentlyViewedProductScopeStore.value}}" stepKey="RecentlyViewedProductScopeStore"/> + </before> + + <after> + <!-- Delete Product and Category --> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> + <deleteData createDataKey="createSimpleProduct3" stepKey="deleteSimpleProduct3"/> + <deleteData createDataKey="createSimpleProduct4" stepKey="deleteSimpleProduct4"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + + <waitForPageLoad time="30" stepKey="waitForPageLoadWebSite"/> + <magentoCLI command="config:set {{RecentlyViewedProductScopeWebsite.path}} {{RecentlyViewedProductScopeWebsite.value}}" stepKey="RecentlyViewedProductScopeWebsite"/> + <!--Delete store views--> + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteFirstStoreView"> + <argument name="customStore" value="customStoreEN"/> + </actionGroup> + + <!-- Clear Widget--> + <actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="clearRecentlyViewedWidgetsFromCMSContent"> + <argument name="content" value="{{CmsHomePageContent.content}}"/> + <argument name="pageId" value="{{CmsHomePageContent.page_id}}"/> + </actionGroup> + + <!-- Logout Admin --> + <actionGroup ref="logout" stepKey="logout"/> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCacheAfterDeletion"/> + + </after> + + <!--Create widget for recently viewed products--> + <actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="clearRecentlyViewedWidgetsFromCMSContentBefore"> + <argument name="content" value="{{CmsHomePageContent.content}}"/> + <argument name="pageId" value="{{CmsHomePageContent.page_id}}"/> + </actionGroup> + + <amOnPage url="{{AdminCmsPageEditPage.url(CmsHomePageContent.page_id)}}" stepKey="navigateToEditHomePagePage"/> + <waitForPageLoad time="50" stepKey="waitForContentPageToLoad"/> + + <actionGroup ref="AdminInsertRecentlyViewedWidgetActionGroup" stepKey="insertRecentlyViewedWidget"> + <argument name="attributeSelector1" value="show_attributes"/> + <argument name="attributeSelector2" value="show_buttons"/> + <argument name="productAttributeSection1" value="1"/> + <argument name="productAttributeSection2" value="4"/> + <argument name="buttonToShowSection1" value="1"/> + <argument name="buttonToShowSection2" value="3"/> + </actionGroup> + + <!-- Warm up cache --> + <magentoCLI command="cache:flush" stepKey="flushCacheAfterWidgetCreated"/> + + <!-- Navigate to product 3 on store front --> + <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStore1ProductPage2"/> + <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct3.name$)}}" stepKey="goToStore1ProductPage3"/> + <!-- Go to Home Page --> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/> + <waitForPageLoad time="30" stepKey="homeWaitForPageLoad"/> + + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertStore1RecentlyViewedProduct2"> + <argument name="productName" value="$$createSimpleProduct2.name$$"/> + <argument name="productPosition" value="2"/> + </actionGroup> + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertStore1RecentlyViewedProduct3"> + <argument name="productName" value="$$createSimpleProduct3.name$$"/> + <argument name="productPosition" value="1"/> + </actionGroup> + + <!-- Switch store view --> + <waitForPageLoad time="40" stepKey="waitForStorefrontPageLoad"/> + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStoreViewActionGroup"> + <argument name="storeView" value="customStoreEN"/> + </actionGroup> + + <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct1.name$)}}" stepKey="goToStore2ProductPage1"/> + <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStore2ProductPage2"/> + + <!-- Go to Home Page --> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStoreViewHomePage"/> + <waitForPageLoad time="30" stepKey="homePageWaitForStoreView"/> + + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertNextStore1RecentlyViewedProduct1"> + <argument name="productName" value="$$createSimpleProduct1.name$$"/> + <argument name="productPosition" value="2"/> + </actionGroup> + + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertNextStore1RecentlyViewedProduct2"> + <argument name="productName" value="$$createSimpleProduct2.name$$"/> + <argument name="productPosition" value="1"/> + </actionGroup> + + <grabTextFrom selector="{{StoreFrontRecentlyViewedProductSection.ProductName('2')}}" stepKey="grabDontSeeHomeProduct3"/> + <assertNotContains expected="$$createSimpleProduct3.name$$" actual="$grabDontSeeHomeProduct3" stepKey="assertNotSeeProduct3"/> + + <actionGroup ref="StorefrontSwitchDefaultStoreViewActionGroup" stepKey="switchToDefualtStoreView"/> + + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertSwitchStore1RecentlyViewedProduct2"> + <argument name="productName" value="$$createSimpleProduct2.name$$"/> + <argument name="productPosition" value="2"/> + </actionGroup> + + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertSwitchStore1RecentlyViewedProduct3"> + <argument name="productName" value="$$createSimpleProduct3.name$$"/> + <argument name="productPosition" value="1"/> + </actionGroup> + + <grabTextFrom selector="{{StoreFrontRecentlyViewedProductSection.ProductName('2')}}" stepKey="grabDontSeeHomeProduct1"/> + <assertNotContains expected="$$createSimpleProduct1.name$$" actual="$grabDontSeeHomeProduct1" stepKey="assertNotSeeProduct1"/> + </test> +</tests> diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminEditCMSPageContentActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminEditCMSPageContentActionGroup.xml new file mode 100644 index 0000000000000..b745e9705ed30 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminEditCMSPageContentActionGroup.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminEditCMSPageContentActionGroup"> + <arguments> + <argument name="content" type="string" /> + <argument name="pageId" type="string" /> + </arguments> + <amOnPage url="{{AdminCmsPageEditPage.url(pageId)}}" stepKey="navigateToEditCMSPage"/> + <waitForPageLoad stepKey="waitForCmsPageEditPage"/> + <conditionalClick selector="{{CmsNewPagePageActionsSection.contentSectionName}}" dependentSelector="{{CatalogWidgetSection.insertWidgetButton}}" visible="false" stepKey="clickShowHideEditorIfVisible"/> + <waitForElementVisible selector="{{CmsNewPagePageContentSection.content}}" stepKey="waitForContentField"/> + <fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="{{content}}" stepKey="resetCMSPageToDefaultContent"/> + <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSave"/> + <waitForPageLoad stepKey="waitForSettingsApply"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminInsertRecentlyViewedWidgetActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminInsertRecentlyViewedWidgetActionGroup.xml new file mode 100644 index 0000000000000..e8c66c68348fc --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminInsertRecentlyViewedWidgetActionGroup.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminInsertRecentlyViewedWidgetActionGroup"> + <arguments> + <argument name="attributeSelector1" type="string" defaultValue="show_attributes"/> + <argument name="attributeSelector2" type="string" defaultValue="show_buttons"/> + <argument name="productAttributeSection1" type="string" defaultValue="1"/> + <argument name="productAttributeSection2" type="string" defaultValue="4" /> + <argument name="buttonToShowSection1" type="string" defaultValue="1"/> + <argument name="buttonToShowSection2" type="string" defaultValue="3" /> + </arguments> + <click selector="{{CmsNewPagePageActionsSection.contentSectionName}}" stepKey="expandContent"/> + <waitForPageLoad time="50" stepKey="waitForPageLoadContentSection"/> + <conditionalClick selector="{{CmsNewPagePageActionsSection.showHideEditor}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="true" stepKey="clickNextShowHideEditorIfVisible"/> + <waitForElementVisible selector="{{CatalogWidgetSection.insertWidgetButton}}" stepKey="waitForInsertWidgetElement"/> + <click selector="{{CatalogWidgetSection.insertWidgetButton}}" stepKey="clickInsertWidget"/> + <waitForElementVisible selector="{{InsertWidgetSection.widgetTypeDropDown}}" time="30" stepKey="waitForWidgetTypeDropDownVisible"/> + <!--Select "Widget Type"--> + <selectOption selector="{{WidgetSection.WidgetType}}" userInput="Recently Viewed Products" stepKey="selectRecentlyViewedProducts"/> + <waitForPageLoad time="30" stepKey="waitForPageLoadWidgetType"/> + <!--Select all product attributes--> + <dragAndDrop selector1="{{AdminRecentlyViewedWidgetSection.attributeSelector(attributeSelector1,productAttributeSection1)}}" selector2="{{AdminRecentlyViewedWidgetSection.attributeSelector(attributeSelector1,productAttributeSection2)}}" stepKey="selectProductSpecifiedOptions"/> + <!--Select all buttons to show--> + <dragAndDrop selector1="{{AdminRecentlyViewedWidgetSection.attributeSelector(attributeSelector2,buttonToShowSection2)}}" selector2="{{AdminRecentlyViewedWidgetSection.attributeSelector(attributeSelector2,buttonToShowSection2)}}" stepKey="selectButtonSpecifiedOptions"/> + <click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidgetToSave"/> + <waitForPageLoad time="30" stepKey="waitForWidgetInsertPageLoad"/> + <!-- Check that widget is inserted --> + <waitForElementVisible selector="#cms_page_form_content" stepKey="checkCMSContent" time="30"/> + <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickNextSave"/> + <waitForPageLoad stepKey="waitForPageActionSave" time="30"/> + <waitForElementVisible selector="*[data-ui-id='messages-message-success']" time="60" stepKey="waitForSaveSuccess"/> + </actionGroup> +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Cms/Test/Mftf/Data/CmsHomepageData.xml b/app/code/Magento/Cms/Test/Mftf/Data/CmsHomepageData.xml new file mode 100644 index 0000000000000..ce2ce747716a2 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Data/CmsHomepageData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="CmsHomePageContent"> + <data key="content">CMS homepage content goes here</data> + <data key="page_id">2</data> + </entity> + +</entities> \ No newline at end of file diff --git a/app/code/Magento/Cms/Test/Mftf/Section/AdminRecentlyViewedWidgetSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/AdminRecentlyViewedWidgetSection.xml new file mode 100644 index 0000000000000..37d1491945491 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/Section/AdminRecentlyViewedWidgetSection.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminRecentlyViewedWidgetSection"> + <element name="attributeSelector" type="multiselect" selector="select[name='parameters[{{attributeName}}][]'] option:nth-of-type({{attributePosition}})" parameterized="true"/> + </section> +</sections> From cdfbf14051e5e81db906f405642252703b8dd9b3 Mon Sep 17 00:00:00 2001 From: Serhiy Yelahin <serhiy.yelahin@transoftgroup.com> Date: Thu, 5 Mar 2020 11:42:24 +0200 Subject: [PATCH 078/153] MC-32153: Customer Import - Customer address is not appearing in customer grid after import --- .../Model/Import/Address.php | 16 ++- .../Test/Unit/Model/Import/AddressTest.php | 112 +----------------- .../Model/Import/AddressTest.php | 35 ++++++ 3 files changed, 52 insertions(+), 111 deletions(-) diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Address.php b/app/code/Magento/CustomerImportExport/Model/Import/Address.php index 4eee5a39d55e1..09d76ec3fb71f 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Address.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Address.php @@ -13,6 +13,7 @@ use Magento\Store\Model\Store; use Magento\CustomerImportExport\Model\ResourceModel\Import\Address\Storage as AddressStorage; use Magento\ImportExport\Model\Import\AbstractSource; +use Magento\Customer\Model\Indexer\Processor; /** * Customer address import @@ -254,6 +255,11 @@ class Address extends AbstractCustomer */ private $addressStorage; + /** + * @var Processor + */ + private $indexerProcessor; + /** * @param \Magento\Framework\Stdlib\StringUtils $string * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig @@ -274,6 +280,7 @@ class Address extends AbstractCustomer * @param array $data * @param CountryWithWebsitesSource|null $countryWithWebsites * @param AddressStorage|null $addressStorage + * @param Processor $indexerProcessor * * @SuppressWarnings(PHPMD.NPathComplexity) * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -296,8 +303,9 @@ public function __construct( \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Customer\Model\Address\Validator\Postcode $postcodeValidator, array $data = [], - CountryWithWebsitesSource $countryWithWebsites = null, - AddressStorage $addressStorage = null + ?CountryWithWebsitesSource $countryWithWebsites = null, + ?AddressStorage $addressStorage = null, + ?Processor $indexerProcessor = null ) { $this->_customerFactory = $customerFactory; $this->_addressFactory = $addressFactory; @@ -348,6 +356,9 @@ public function __construct( $this->addressStorage = $addressStorage ?: ObjectManager::getInstance()->get(AddressStorage::class); + $this->indexerProcessor = $indexerProcessor + ?: ObjectManager::getInstance()->get(Processor::class); + $this->_initAttributes(); $this->_initCountryRegions(); } @@ -562,6 +573,7 @@ protected function _importData() $this->_deleteAddressEntities($deleteRowIds); } + $this->indexerProcessor->markIndexerAsInvalid(); return true; } diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php index 126a9e1791779..3df8b1ae5ef72 100644 --- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php +++ b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/AddressTest.php @@ -298,9 +298,6 @@ protected function _createCustomerEntityMock() public function getWebsites($withDefault = false) { $websites = []; - if (!$withDefault) { - unset($websites[0]); - } foreach ($this->_websites as $id => $code) { if (!$withDefault && $id == \Magento\Store\Model\Store::DEFAULT_STORE_ID) { continue; @@ -330,97 +327,6 @@ public function iterate(\Magento\Framework\Data\Collection $collection, $pageSiz } } - /** - * Create mock for custom behavior test - * - * @return Address|\PHPUnit_Framework_MockObject_MockObject - */ - protected function _getModelMockForTestImportDataWithCustomBehaviour() - { - // input data - $customBehaviorRows = [ - [ - AbstractEntity::COLUMN_ACTION => 'update', - Address::COLUMN_ADDRESS_ID => $this->_customBehaviour['update_id'], - ], - [ - AbstractEntity::COLUMN_ACTION => AbstractEntity::COLUMN_ACTION_VALUE_DELETE, - Address::COLUMN_ADDRESS_ID => $this->_customBehaviour['delete_id'] - ], - ]; - $updateResult = [ - 'entity_row_new' => [], - 'entity_row_update' => $this->_customBehaviour['update_id'], - 'attributes' => [], - 'defaults' => [], - ]; - // entity adapter mock - $modelMock = $this->createPartialMock( - \Magento\CustomerImportExport\Model\Import\Address::class, - [ - 'validateRow', - '_prepareDataForUpdate', - '_saveAddressEntities', - '_saveAddressAttributes', - '_saveCustomerDefaults', - '_deleteAddressEntities', - '_mergeEntityAttributes', - 'getErrorAggregator', - 'getCustomerStorage', - 'prepareCustomerData', - ] - ); - //Adding behaviours - $availableBehaviors = new \ReflectionProperty($modelMock, '_availableBehaviors'); - $availableBehaviors->setAccessible(true); - $availableBehaviors->setValue($modelMock, $this->_availableBehaviors); - // mock to imitate data source model - $dataSourceMock = $this->createPartialMock( - \Magento\ImportExport\Model\ResourceModel\Import\Data::class, - ['getNextBunch', '__wakeup', 'getIterator'] - ); - $dataSourceMock->expects($this->at(0))->method('getNextBunch')->will($this->returnValue($customBehaviorRows)); - $dataSourceMock->expects($this->at(1))->method('getNextBunch')->will($this->returnValue(null)); - $dataSourceMock->expects($this->any()) - ->method('getIterator') - ->willReturn($this->getMockForAbstractClass(\Iterator::class)); - - $dataSourceModel = new \ReflectionProperty( - \Magento\CustomerImportExport\Model\Import\Address::class, - '_dataSourceModel' - ); - $dataSourceModel->setAccessible(true); - $dataSourceModel->setValue($modelMock, $dataSourceMock); - // mock expects for entity adapter - $modelMock->expects($this->any())->method('validateRow')->will($this->returnValue(true)); - $modelMock->expects($this->any()) - ->method('getErrorAggregator') - ->will($this->returnValue($this->errorAggregator)); - $modelMock->expects($this->any())->method('_prepareDataForUpdate')->will($this->returnValue($updateResult)); - $modelMock->expects( - $this->any() - )->method( - '_saveAddressEntities' - )->will( - $this->returnCallback([$this, 'validateSaveAddressEntities']) - ); - $modelMock->expects($this->any())->method('_saveAddressAttributes')->will($this->returnValue($modelMock)); - $modelMock->expects($this->any())->method('_saveCustomerDefaults')->will($this->returnValue($modelMock)); - $modelMock->expects( - $this->any() - )->method( - '_deleteAddressEntities' - )->will( - $this->returnCallback([$this, 'validateDeleteAddressEntities']) - ); - $modelMock->expects($this->any())->method('_mergeEntityAttributes')->will($this->returnValue([])); - $modelMock->expects($this->any()) - ->method('getCustomerStorage') - ->willReturn($this->_createCustomerStorageMock()); - - return $modelMock; - } - /** * Create mock for customer address model class * @@ -449,7 +355,9 @@ protected function _getModelMock() new \Magento\Framework\Stdlib\DateTime(), $this->createMock(\Magento\Customer\Model\Address\Validator\Postcode::class), $this->_getModelDependencies(), - $this->countryWithWebsites + $this->countryWithWebsites, + $this->createMock(\Magento\CustomerImportExport\Model\ResourceModel\Import\Address\Storage::class), + $this->createMock(\Magento\Customer\Model\Indexer\Processor::class) ); $property = new \ReflectionProperty($modelMock, '_availableBehaviors'); @@ -606,20 +514,6 @@ public function testGetDefaultAddressAttributeMapping() ); } - /** - * Test if correct methods are invoked according to different custom behaviours - * - * @covers \Magento\CustomerImportExport\Model\Import\Address::_importData - */ - public function testImportDataWithCustomBehaviour() - { - $this->_model = $this->_getModelMockForTestImportDataWithCustomBehaviour(); - $this->_model->setParameters(['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM]); - - // validation in validateSaveAddressEntities and validateDeleteAddressEntities - $this->_model->importData(); - } - /** * Validation method for _saveAddressEntities (callback for _saveAddressEntities) * diff --git a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php index 96b7f8ce8ed67..e83b144e395b2 100644 --- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php @@ -14,6 +14,7 @@ use Magento\ImportExport\Model\Import as ImportModel; use Magento\ImportExport\Model\Import\Adapter as ImportAdapter; use Magento\TestFramework\Helper\Bootstrap; +use Magento\Framework\Indexer\StateInterface; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -84,6 +85,11 @@ class AddressTest extends \PHPUnit\Framework\TestCase /** @var \Magento\Customer\Model\ResourceModel\Customer */ protected $customerResource; + /** + * @var \Magento\Customer\Model\Indexer\Processor + */ + private $indexerProcessor; + /** * Init new instance of address entity adapter */ @@ -96,6 +102,9 @@ protected function setUp() $this->_entityAdapter = Bootstrap::getObjectManager()->create( $this->_testClassName ); + $this->indexerProcessor = Bootstrap::getObjectManager()->create( + \Magento\Customer\Model\Indexer\Processor::class + ); } /** @@ -353,6 +362,7 @@ public function testImportDataAddUpdate() $requiredAttributes[] = $keyAttribute; foreach (['update', 'remove'] as $action) { foreach ($this->_updateData[$action] as $attributes) { + // phpcs:ignore Magento2.Performance.ForeachArrayMerge $requiredAttributes = array_merge($requiredAttributes, array_keys($attributes)); } } @@ -494,4 +504,29 @@ public function testDifferentOptions(): void $imported = $this->_entityAdapter->importData(); $this->assertTrue($imported, 'Must be successfully imported'); } + + /** + * Test customer indexer gets invalidated after import when Update on Schedule mode is set + * + * @magentoDbIsolation enabled + */ + public function testCustomerIndexer(): void + { + $file = __DIR__ . '/_files/address_import_update.csv'; + $filesystem = Bootstrap::getObjectManager()->create(Filesystem::class); + $directoryWrite = $filesystem->getDirectoryWrite(DirectoryList::ROOT); + $source = new \Magento\ImportExport\Model\Import\Source\Csv($file, $directoryWrite); + $this->_entityAdapter + ->setParameters(['behavior' => ImportModel::BEHAVIOR_ADD_UPDATE]) + ->setSource($source) + ->validateData() + ->hasToBeTerminated(); + $this->indexerProcessor->getIndexer()->reindexAll(); + $statusBeforeImport = $this->indexerProcessor->getIndexer()->getStatus(); + $this->indexerProcessor->getIndexer()->setScheduled(true); + $this->_entityAdapter->importData(); + $statusAfterImport = $this->indexerProcessor->getIndexer()->getStatus(); + $this->assertEquals(StateInterface::STATUS_VALID, $statusBeforeImport); + $this->assertEquals(StateInterface::STATUS_INVALID, $statusAfterImport); + } } From 2b2858e71d4b676d82bdda9f826dbe2177517a24 Mon Sep 17 00:00:00 2001 From: Burlacu Vasilii <v.burlacu@atwix.com> Date: Thu, 5 Mar 2020 13:43:29 +0200 Subject: [PATCH 079/153] Added adjustments as per review --- .../Catalog/Model/Config/LayerCategoryConfig.php | 12 +++++------- app/code/Magento/Catalog/Model/Layer/FilterList.php | 11 +++++------ app/code/Magento/Catalog/etc/adminhtml/system.xml | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php b/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php index 50cf9f39f26ba..0e8565e3b25d1 100644 --- a/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php +++ b/app/code/Magento/Catalog/Model/Config/LayerCategoryConfig.php @@ -69,14 +69,12 @@ public function isCategoryFilterVisibleInLayerNavigation( /** * Get the current store ID * - * @return int|null + * @return int + * + * @throws NoSuchEntityException */ - private function getStoreId(): ?int + private function getStoreId(): int { - try { - return (int) $this->storeManager->getStore()->getId(); - } catch (NoSuchEntityException $e) { - return null; - } + return (int) $this->storeManager->getStore()->getId(); } } diff --git a/app/code/Magento/Catalog/Model/Layer/FilterList.php b/app/code/Magento/Catalog/Model/Layer/FilterList.php index 2f32971c80bed..a7eba474c58d8 100644 --- a/app/code/Magento/Catalog/Model/Layer/FilterList.php +++ b/app/code/Magento/Catalog/Model/Layer/FilterList.php @@ -48,26 +48,25 @@ class FilterList protected $filters = []; /** - * @var LayerCategoryConfig|null + * @var LayerCategoryConfig */ private $layerCategoryConfig; /** * @param \Magento\Framework\ObjectManagerInterface $objectManager * @param FilterableAttributeListInterface $filterableAttributes + * @param LayerCategoryConfig $layerCategoryConfig * @param array $filters - * @param LayerCategoryConfig|null $layerCategoryConfig */ public function __construct( \Magento\Framework\ObjectManagerInterface $objectManager, FilterableAttributeListInterface $filterableAttributes, - array $filters = [], - LayerCategoryConfig $layerCategoryConfig = null + LayerCategoryConfig $layerCategoryConfig, + array $filters = [] ) { $this->objectManager = $objectManager; $this->filterableAttributes = $filterableAttributes; - $this->layerCategoryConfig = $layerCategoryConfig ?: - ObjectManager::getInstance()->get(LayerCategoryConfig::class); + $this->layerCategoryConfig = $layerCategoryConfig; /** Override default filter type models */ $this->filterTypes = array_merge($this->filterTypes, $filters); diff --git a/app/code/Magento/Catalog/etc/adminhtml/system.xml b/app/code/Magento/Catalog/etc/adminhtml/system.xml index f548c23b68ce3..30a8ec8a81ec5 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/system.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/system.xml @@ -140,7 +140,7 @@ </group> <group id="layered_navigation"> <field id="display_category" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> - <label>Display Category</label> + <label>Display Category Filter</label> <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> </field> </group> From 471ff6ab5269fc70fa0ad0641ed28d13d3f6ac29 Mon Sep 17 00:00:00 2001 From: Franciszek Wawrzak <f.wawrzak@macopedia.com> Date: Thu, 5 Mar 2020 13:24:19 +0100 Subject: [PATCH 080/153] improve image uploader error handler --- app/code/Magento/Catalog/Model/ImageUploader.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ImageUploader.php b/app/code/Magento/Catalog/Model/ImageUploader.php index 0c3e008fa8bb5..b0c8d56057431 100644 --- a/app/code/Magento/Catalog/Model/ImageUploader.php +++ b/app/code/Magento/Catalog/Model/ImageUploader.php @@ -221,8 +221,10 @@ public function moveFileFromTmp($imageName, $returnRelativePath = false) $baseImagePath ); } catch (\Exception $e) { + $this->logger->critical($e); throw new \Magento\Framework\Exception\LocalizedException( - __('Something went wrong while saving the file(s).') + __('Something went wrong while saving the file(s).'), + $e ); } @@ -276,7 +278,8 @@ public function saveFileToTmpDir($fileId) } catch (\Exception $e) { $this->logger->critical($e); throw new \Magento\Framework\Exception\LocalizedException( - __('Something went wrong while saving the file(s).') + __('Something went wrong while saving the file(s).'), + $e ); } } From abdb45844fd3862a8a2f852fb34d35cc0e958829 Mon Sep 17 00:00:00 2001 From: Serhii Balko <serhii.balko@transoftgroup.com> Date: Thu, 5 Mar 2020 14:51:14 +0200 Subject: [PATCH 081/153] MC-31573: PayflowPro Checkout Broken with SameSite Cookie Changes from Chrome 80 --- .../Payment/Block/Transparent/Redirect.php | 62 ++++++++++ .../templates/transparent/redirect.phtml | 21 ++++ .../templates/transparent/redirect.phtml | 21 ++++ .../Adminhtml/Transparent/Redirect.php | 13 ++ .../Controller/Transparent/Redirect.php | 98 +++++++++++++++ .../Payflow/Service/Request/SecureToken.php | 6 +- .../Payflow/Service/Response/Transaction.php | 5 +- .../Plugin/TransparentSessionChecker.php | 50 ++++++++ app/code/Magento/Paypal/etc/di.xml | 3 + .../Paypal/etc/frontend/page_types.xml | 1 + .../layout/transparent_payment_redirect.xml | 16 +++ .../layout/transparent_payment_redirect.xml | 16 +++ .../Controller/Transparent/RedirectTest.php | 112 ++++++++++++++++++ .../controller_acl_test_whitelist_ce.txt | 1 + 14 files changed, 420 insertions(+), 5 deletions(-) create mode 100644 app/code/Magento/Payment/Block/Transparent/Redirect.php create mode 100644 app/code/Magento/Payment/view/adminhtml/templates/transparent/redirect.phtml create mode 100644 app/code/Magento/Payment/view/frontend/templates/transparent/redirect.phtml create mode 100644 app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php create mode 100644 app/code/Magento/Paypal/Controller/Transparent/Redirect.php create mode 100644 app/code/Magento/Paypal/Plugin/TransparentSessionChecker.php create mode 100644 app/code/Magento/Paypal/view/adminhtml/layout/transparent_payment_redirect.xml create mode 100644 app/code/Magento/Paypal/view/frontend/layout/transparent_payment_redirect.xml create mode 100644 dev/tests/integration/testsuite/Magento/Paypal/Controller/Transparent/RedirectTest.php diff --git a/app/code/Magento/Payment/Block/Transparent/Redirect.php b/app/code/Magento/Payment/Block/Transparent/Redirect.php new file mode 100644 index 0000000000000..1be6dec4cc1d8 --- /dev/null +++ b/app/code/Magento/Payment/Block/Transparent/Redirect.php @@ -0,0 +1,62 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Payment\Block\Transparent; + +use Magento\Framework\UrlInterface; +use Magento\Framework\View\Element\Template; +use Magento\Framework\View\Element\Template\Context; + +/** + * Redirect block for register specific params in layout + * + * @api + */ +class Redirect extends Template +{ + /** + * Route path key to make redirect url. + */ + private const ROUTE_PATH = 'route_path'; + + /** + * @var UrlInterface + */ + private $url; + + /** + * @param Context $context + * @param UrlInterface $url + * @param array $data + */ + public function __construct( + Context $context, + UrlInterface $url, + array $data = [] + ) { + $this->url = $url; + parent::__construct($context, $data); + } + + /** + * Returns url for redirect. + * + * @return string + */ + public function getRedirectUrl(): string + { + return $this->url->getUrl($this->getData(self::ROUTE_PATH)); + } + + /** + * Returns params to be redirected. + * + * @return array + */ + public function getPostParams(): array + { + return (array)$this->_request->getPostValue(); + } +} diff --git a/app/code/Magento/Payment/view/adminhtml/templates/transparent/redirect.phtml b/app/code/Magento/Payment/view/adminhtml/templates/transparent/redirect.phtml new file mode 100644 index 0000000000000..17fbdf780a40a --- /dev/null +++ b/app/code/Magento/Payment/view/adminhtml/templates/transparent/redirect.phtml @@ -0,0 +1,21 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/** @var \Magento\Payment\Block\Transparent\Redirect $block */ +$params = $block->getPostParams(); +$redirectUrl = $block->getRedirectUrl(); +?> +<html> +<head></head> +<body onload="document.forms['proxy_form'].submit()"> +<form id="proxy_form" action="<?= $block->escapeUrl($redirectUrl) ?>" + method="POST" hidden enctype="application/x-www-form-urlencoded" class="no-display"> + <?php foreach ($params as $name => $value):?> + <input value="<?= $block->escapeHtmlAttr($value) ?>" name="<?= $block->escapeHtmlAttr($name) ?>" type="hidden"/> + <?php endforeach?> +</form> +</body> +</html> diff --git a/app/code/Magento/Payment/view/frontend/templates/transparent/redirect.phtml b/app/code/Magento/Payment/view/frontend/templates/transparent/redirect.phtml new file mode 100644 index 0000000000000..17fbdf780a40a --- /dev/null +++ b/app/code/Magento/Payment/view/frontend/templates/transparent/redirect.phtml @@ -0,0 +1,21 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/** @var \Magento\Payment\Block\Transparent\Redirect $block */ +$params = $block->getPostParams(); +$redirectUrl = $block->getRedirectUrl(); +?> +<html> +<head></head> +<body onload="document.forms['proxy_form'].submit()"> +<form id="proxy_form" action="<?= $block->escapeUrl($redirectUrl) ?>" + method="POST" hidden enctype="application/x-www-form-urlencoded" class="no-display"> + <?php foreach ($params as $name => $value):?> + <input value="<?= $block->escapeHtmlAttr($value) ?>" name="<?= $block->escapeHtmlAttr($name) ?>" type="hidden"/> + <?php endforeach?> +</form> +</body> +</html> diff --git a/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php b/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php new file mode 100644 index 0000000000000..8201761cc3a29 --- /dev/null +++ b/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php @@ -0,0 +1,13 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Paypal\Controller\Adminhtml\Transparent; + +/** + * Class for redirecting the Paypal response result to Magento controller. + */ +class Redirect extends \Magento\Paypal\Controller\Transparent\Redirect +{ +} diff --git a/app/code/Magento/Paypal/Controller/Transparent/Redirect.php b/app/code/Magento/Paypal/Controller/Transparent/Redirect.php new file mode 100644 index 0000000000000..c6cee15d23c7a --- /dev/null +++ b/app/code/Magento/Paypal/Controller/Transparent/Redirect.php @@ -0,0 +1,98 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Paypal\Controller\Transparent; + +use Magento\Framework\App\Action\Context; +use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Framework\App\CsrfAwareActionInterface; +use Magento\Framework\App\Request\InvalidRequestException; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\Controller\ResultInterface; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\View\Result\LayoutFactory; +use Magento\Payment\Model\Method\Logger; +use Magento\Paypal\Model\Payflow\Transparent; + +/** + * Class for redirecting the Paypal response result to Magento controller. + */ +class Redirect extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpPostActionInterface +{ + /** + * @var LayoutFactory + */ + private $resultLayoutFactory; + + /** + * @var Transparent + */ + private $transparent; + + /** + * @var Logger + */ + private $logger; + + /** + * Constructor + * + * @param Context $context + * @param LayoutFactory $resultLayoutFactory + * @param Transparent $transparent + * @param Logger $logger + */ + public function __construct( + Context $context, + LayoutFactory $resultLayoutFactory, + Transparent $transparent, + Logger $logger + ) { + $this->resultLayoutFactory = $resultLayoutFactory; + $this->transparent = $transparent; + $this->logger = $logger; + + parent::__construct($context); + } + + /** + * @inheritDoc + */ + public function createCsrfValidationException( + RequestInterface $request + ): ?InvalidRequestException { + return null; + } + + /** + * @inheritDoc + */ + public function validateForCsrf(RequestInterface $request): ?bool + { + return true; + } + + /** + * Saves the payment in quote + * + * @return ResultInterface + * @throws LocalizedException + */ + public function execute() + { + $gatewayResponse = (array)$this->getRequest()->getPostValue(); + $this->logger->debug( + ['PayPal PayflowPro redirect:' => $gatewayResponse], + $this->transparent->getDebugReplacePrivateDataKeys(), + $this->transparent->getDebugFlag() + ); + + $resultLayout = $this->resultLayoutFactory->create(); + $resultLayout->addDefaultHandle(); + $resultLayout->getLayout()->getUpdate()->load(['transparent_payment_redirect']); + + return $resultLayout; + } +} diff --git a/app/code/Magento/Paypal/Model/Payflow/Service/Request/SecureToken.php b/app/code/Magento/Paypal/Model/Payflow/Service/Request/SecureToken.php index 2a4ec764c4172..6e9990f65c450 100644 --- a/app/code/Magento/Paypal/Model/Payflow/Service/Request/SecureToken.php +++ b/app/code/Magento/Paypal/Model/Payflow/Service/Request/SecureToken.php @@ -70,9 +70,9 @@ public function requestToken(Quote $quote, array $urls = []) $request->setCurrency($quote->getBaseCurrencyCode()); $request->setCreatesecuretoken('Y'); $request->setSecuretokenid($this->mathRandom->getUniqueHash()); - $request->setReturnurl($urls['return_url'] ?? $this->url->getUrl('paypal/transparent/response')); - $request->setErrorurl($urls['error_url'] ?? $this->url->getUrl('paypal/transparent/response')); - $request->setCancelurl($urls['cancel_url'] ?? $this->url->getUrl('paypal/transparent/response')); + $request->setReturnurl($urls['return_url'] ?? $this->url->getUrl('paypal/transparent/redirect')); + $request->setErrorurl($urls['error_url'] ?? $this->url->getUrl('paypal/transparent/redirect')); + $request->setCancelurl($urls['cancel_url'] ?? $this->url->getUrl('paypal/transparent/redirect')); $request->setDisablereceipt('TRUE'); $request->setSilenttran('TRUE'); diff --git a/app/code/Magento/Paypal/Model/Payflow/Service/Response/Transaction.php b/app/code/Magento/Paypal/Model/Payflow/Service/Response/Transaction.php index 5db78e6fac520..1e97ac8b8c766 100644 --- a/app/code/Magento/Paypal/Model/Payflow/Service/Response/Transaction.php +++ b/app/code/Magento/Paypal/Model/Payflow/Service/Response/Transaction.php @@ -19,7 +19,8 @@ use Magento\Sales\Api\Data\OrderPaymentInterface; /** - * Class Transaction + * Process PayPal transaction response. + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Transaction @@ -90,7 +91,7 @@ public function getResponseObject($gatewayTransactionResponse) $response = $this->transparent->mapGatewayResponse((array) $gatewayTransactionResponse, $response); $this->logger->debug( - (array) $gatewayTransactionResponse, + ['PayPal PayflowPro response:' => (array)$gatewayTransactionResponse], (array) $this->transparent->getDebugReplacePrivateDataKeys(), (bool) $this->transparent->getDebugFlag() ); diff --git a/app/code/Magento/Paypal/Plugin/TransparentSessionChecker.php b/app/code/Magento/Paypal/Plugin/TransparentSessionChecker.php new file mode 100644 index 0000000000000..5157ba3208fb7 --- /dev/null +++ b/app/code/Magento/Paypal/Plugin/TransparentSessionChecker.php @@ -0,0 +1,50 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Paypal\Plugin; + +use Magento\Framework\App\Request\Http; +use Magento\Framework\Session\SessionStartChecker; + +/** + * Intended to preserve session cookie after submitting POST form from PayPal to Magento controller. + */ +class TransparentSessionChecker +{ + private const TRANSPARENT_REDIRECT_PATH = 'paypal/transparent/redirect'; + + /** + * @var Http + */ + private $request; + + /** + * @param Http $request + */ + public function __construct( + Http $request + ) { + $this->request = $request; + } + + /** + * Prevents session starting while instantiating PayPal transparent redirect controller. + * + * @param SessionStartChecker $subject + * @param bool $result + * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function afterCheck(SessionStartChecker $subject, bool $result): bool + { + if ($result === false) { + return false; + } + + return strpos((string)$this->request->getPathInfo(), self::TRANSPARENT_REDIRECT_PATH) === false; + } +} diff --git a/app/code/Magento/Paypal/etc/di.xml b/app/code/Magento/Paypal/etc/di.xml index c0141bbb3215e..973ed0f91924c 100644 --- a/app/code/Magento/Paypal/etc/di.xml +++ b/app/code/Magento/Paypal/etc/di.xml @@ -252,4 +252,7 @@ </argument> </arguments> </type> + <type name="Magento\Framework\Session\SessionStartChecker"> + <plugin name="transparent_session_checker" type="Magento\Paypal\Plugin\TransparentSessionChecker"/> + </type> </config> diff --git a/app/code/Magento/Paypal/etc/frontend/page_types.xml b/app/code/Magento/Paypal/etc/frontend/page_types.xml index 133ab1ca76162..1da5d54fb385d 100644 --- a/app/code/Magento/Paypal/etc/frontend/page_types.xml +++ b/app/code/Magento/Paypal/etc/frontend/page_types.xml @@ -14,6 +14,7 @@ <type id="paypal_payflow_form" label="Paypal Payflow Form"/> <type id="transparent" label="Paypal Payflow TR Form"/> <type id="transparent_payment_response" label="Paypal Payflow TR Response"/> + <type id="transparent_payment_redirect" label="Paypal Payflow TR Redirect"/> <type id="paypal_payflow_returnurl" label="Paypal Payflow Return URL"/> <type id="paypal_payflowadvanced_cancelpayment" label="Paypal Payflow Advanced Cancel Payment"/> <type id="paypal_payflowadvanced_form" label="Paypal Payflow Advanced Form"/> diff --git a/app/code/Magento/Paypal/view/adminhtml/layout/transparent_payment_redirect.xml b/app/code/Magento/Paypal/view/adminhtml/layout/transparent_payment_redirect.xml new file mode 100644 index 0000000000000..01acf03c0d077 --- /dev/null +++ b/app/code/Magento/Paypal/view/adminhtml/layout/transparent_payment_redirect.xml @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd"> + <container name="root" label="Root"> + <block class="Magento\Payment\Block\Transparent\Redirect" name="transparent_redirect" template="Magento_Payment::transparent/redirect.phtml"> + <arguments> + <argument name="route_path" xsi:type="string">paypal/transparent/response</argument> + </arguments> + </block> + </container> +</layout> diff --git a/app/code/Magento/Paypal/view/frontend/layout/transparent_payment_redirect.xml b/app/code/Magento/Paypal/view/frontend/layout/transparent_payment_redirect.xml new file mode 100644 index 0000000000000..01acf03c0d077 --- /dev/null +++ b/app/code/Magento/Paypal/view/frontend/layout/transparent_payment_redirect.xml @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd"> + <container name="root" label="Root"> + <block class="Magento\Payment\Block\Transparent\Redirect" name="transparent_redirect" template="Magento_Payment::transparent/redirect.phtml"> + <arguments> + <argument name="route_path" xsi:type="string">paypal/transparent/response</argument> + </arguments> + </block> + </container> +</layout> diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Controller/Transparent/RedirectTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Controller/Transparent/RedirectTest.php new file mode 100644 index 0000000000000..4a30231012acf --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Paypal/Controller/Transparent/RedirectTest.php @@ -0,0 +1,112 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Paypal\Controller\Transparent; + +use Magento\TestFramework\TestCase\AbstractController; +use Zend\Stdlib\Parameters; + +/** + * Tests PayPal transparent redirect controller. + */ +class RedirectTest extends AbstractController +{ + /** + * Tests transparent redirect for PayPal PayflowPro payment flow. + * + * @SuppressWarnings(PHPMD.Superglobals) + */ + public function testRequestRedirect() + { + $redirectUri = 'paypal/transparent/redirect'; + $postData = [ + 'BILLTOCITY' => 'culver city', + 'AMT' => '0.00', + 'BILLTOEMAIL' => 'user_1@example.com', + 'BILLTOSTREET' => '123 Freedom Blvd. #123 app.111', + 'VISACARDLEVEL' => '12', + 'SHIPTOCITY' => 'culver city' + ]; + + $this->setRequestUri($redirectUri); + $this->getRequest()->setPostValue($postData); + $this->getRequest()->setMethod('POST'); + + $this->dispatch($redirectUri); + + $responseHtml = $this->getResponse()->getBody(); + try { + $responseNvp = $this->convertToNvp($responseHtml); + $this->assertEquals( + $postData, + $responseNvp, + 'POST form should contain all params from POST request' + ); + } catch (\InvalidArgumentException $exception) { + $this->fail($exception->getMessage()); + } + + $this->assertEmpty( + $_SESSION, + 'Session start has to be skipped for current controller' + ); + } + + /** + * Sets REQUEST_URI into request object. + * + * @param string $requestUri + * @return void + */ + private function setRequestUri(string $requestUri) + { + $request = $this->getRequest(); + $reflection = new \ReflectionClass($request); + $property = $reflection->getProperty('requestUri'); + $property->setAccessible(true); + $property->setValue($request, null); + + $request->setServer(new Parameters(['REQUEST_URI' => $requestUri])); + } + + /** + * Converts HTML response to NVP structure + * + * @param string $response + * @return array + */ + private function convertToNvp(string $response): array + { + $document = new \DOMDocument(); + + libxml_use_internal_errors(true); + if (!$document->loadHTML($response)) { + throw new \InvalidArgumentException( + __('The response format was incorrect. Should be valid HTML') + ); + } + libxml_use_internal_errors(false); + + $document->getElementsByTagName('input'); + + $convertedResponse = []; + /** @var \DOMNode $inputNode */ + foreach ($document->getElementsByTagName('input') as $inputNode) { + if (!$inputNode->attributes->getNamedItem('value') + || !$inputNode->attributes->getNamedItem('name') + ) { + continue; + } + $convertedResponse[$inputNode->attributes->getNamedItem('name')->nodeValue] + = $inputNode->attributes->getNamedItem('value')->nodeValue; + } + + unset($convertedResponse['form_key']); + + return $convertedResponse; + } +} diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/_files/controller_acl_test_whitelist_ce.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/_files/controller_acl_test_whitelist_ce.txt index 1119824f217bb..8561818022112 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/_files/controller_acl_test_whitelist_ce.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/_files/controller_acl_test_whitelist_ce.txt @@ -21,6 +21,7 @@ Magento\ConfigurableProduct\Controller\Adminhtml\Product\Initialization\Helper\P Magento\Downloadable\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Downloadable Magento\Paypal\Controller\Adminhtml\Transparent\RequestSecureToken Magento\Paypal\Controller\Adminhtml\Transparent\Response +Magento\Paypal\Controller\Adminhtml\Transparent\Redirect Magento\Sales\Controller\Adminhtml\Order\CreditmemoLoader Magento\Search\Controller\Adminhtml\Synonyms\ResultPageBuilder Magento\Shipping\Controller\Adminhtml\Order\ShipmentLoader From 960732ab38a0346feb41661c9989c992219f8a4a Mon Sep 17 00:00:00 2001 From: Vaha <vaha@atwix.com> Date: Thu, 5 Mar 2020 09:07:54 +0200 Subject: [PATCH 082/153] added improvements to galleryManagement 'create' method to set all image roles for first product entity --- .../Product/Gallery/GalleryManagement.php | 4 ++ ...minOpenProductImagesSectionActionGroup.xml | 18 ++++++++ ...inProductImageRolesSelectedActionGroup.xml | 26 ++++++++++++ .../ProductAttributeMediaGalleryEntryData.xml | 7 ++++ ...MediaRolesForFirstAddedImageViaApiTest.xml | 41 +++++++++++++++++++ .../Product/Gallery/GalleryManagementTest.php | 10 +++++ 6 files changed, 106 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenProductImagesSectionActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertAdminProductImageRolesSelectedActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckMediaRolesForFirstAddedImageViaApiTest.xml diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php index a9afb7cec45e2..6a078a915119c 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/GalleryManagement.php @@ -61,6 +61,10 @@ public function create($sku, ProductAttributeMediaGalleryEntryInterface $entry) $existingMediaGalleryEntries = $product->getMediaGalleryEntries(); $existingEntryIds = []; if ($existingMediaGalleryEntries == null) { + // set all media types if not specified + if ($entry->getTypes() == null) { + $entry->setTypes(array_keys($product->getMediaAttributes())); + } $existingMediaGalleryEntries = [$entry]; } else { foreach ($existingMediaGalleryEntries as $existingEntries) { diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenProductImagesSectionActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenProductImagesSectionActionGroup.xml new file mode 100644 index 0000000000000..4d49b13a8bf5a --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminOpenProductImagesSectionActionGroup.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminOpenProductImagesSectionActionGroup"> + <annotations> + <description>Requires the navigation to the Product page. Opens 'Image and Videos' section.</description> + </annotations> + <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesSection"/> + <waitForElementVisible selector="{{AdminProductImagesSection.imageUploadButton}}" stepKey="waitForImageUploadButton"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertAdminProductImageRolesSelectedActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertAdminProductImageRolesSelectedActionGroup.xml new file mode 100644 index 0000000000000..3bb6210d6b824 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertAdminProductImageRolesSelectedActionGroup.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AssertAdminProductImageRolesSelectedActionGroup"> + <annotations> + <description>Requires the navigation to the Product page and opened 'Image and Videos' section. + Checks the Base, Small, Thumbnail and Swatch Roles are selected for provided image.</description> + </annotations> + <arguments> + <argument name="imageFileName" type="string" defaultValue="test_image"/> + </arguments> + <waitForElementVisible selector="{{AdminProductImagesSection.imageFile(imageFileName)}}" stepKey="seeProductImageName"/> + <click selector="{{AdminProductImagesSection.imageFile(imageFileName)}}" stepKey="clickProductImage"/> + <waitForElementVisible selector="{{AdminProductImagesSection.isBaseSelected}}" stepKey="checkRoleBaseSelected"/> + <waitForElementVisible selector="{{AdminProductImagesSection.isSmallSelected}}" stepKey="checkRoleSmallSelected"/> + <waitForElementVisible selector="{{AdminProductImagesSection.isThumbnailSelected}}" stepKey="checkRoleThumbnailSelected"/> + <waitForElementVisible selector="{{AdminProductImagesSection.isSwatchSelected}}" stepKey="checkRoleSwatchSelected"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeMediaGalleryEntryData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeMediaGalleryEntryData.xml index 75b4ef773a934..7016a1c1d0358 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeMediaGalleryEntryData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeMediaGalleryEntryData.xml @@ -35,4 +35,11 @@ <data key="label">Magento Logo</data> <requiredEntity type="ImageContent">MagentoLogoImageContentExportImport</requiredEntity> </entity> + <entity name="ApiProductAttributeMediaGalleryEntryWithoutTypesTestImage" type="ProductAttributeMediaGalleryEntry"> + <data key="media_type">image</data> + <data key="label" unique="suffix">Test Image</data> + <data key="position">0</data> + <data key="disabled">false</data> + <requiredEntity type="ImageContent">TestImageContent</requiredEntity> + </entity> </entities> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckMediaRolesForFirstAddedImageViaApiTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckMediaRolesForFirstAddedImageViaApiTest.xml new file mode 100644 index 0000000000000..c31054e3dc192 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckMediaRolesForFirstAddedImageViaApiTest.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCheckMediaRolesForFirstAddedImageViaApiTest"> + <annotations> + <stories value="Add Simple Product with image via API"/> + <title value="Check that added image for created product has selected image roles."/> + <description value="Login as admin, create simple product, add image to created product (via API).Go to + Admin Product Edit page for created product to check that added image has selected image roles."/> + <group value="catalog"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> + <createData entity="SimpleOutOfStockProduct" stepKey="createSimpleProduct"/> + <createData entity="ApiProductAttributeMediaGalleryEntryWithoutTypesTestImage" stepKey="createSimpleProductImage"> + <requiredEntity createDataKey="createSimpleProduct"/> + </createData> + </before> + <after> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <actionGroup ref="logout" stepKey="logout"/> + <!-- Reindex invalidated indices after product attribute has been created/deleted --> + <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> + </after> + + <actionGroup ref="GoToProductPageViaIDActionGroup" stepKey="goToSimpleProduct"> + <argument name="productId" value="$$createSimpleProduct.id$$"/> + </actionGroup> + <actionGroup ref="AdminOpenProductImagesSectionActionGroup" stepKey="openProductImagesSection"/> + <actionGroup ref="AssertAdminProductImageRolesSelectedActionGroup" stepKey="checkImageRolesSelected"> + <argument name="imageFileName" value="$createSimpleProductImage.entry[content][name]$"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php index 6d4e98b60ad18..30994eda87273 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Gallery/GalleryManagementTest.php @@ -59,6 +59,7 @@ protected function setUp() 'getCustomAttribute', 'getMediaGalleryEntries', 'setMediaGalleryEntries', + 'getMediaAttributes', ] ); $this->mediaGalleryEntryMock = @@ -99,6 +100,9 @@ public function testCreateWithCannotSaveException() $entryContentMock = $this->getMockBuilder(\Magento\Framework\Api\Data\ImageContentInterface::class) ->disableOriginalConstructor() ->getMock(); + $attributeMock = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute\AbstractAttribute::class) + ->disableOriginalConstructor() + ->getMock(); $this->mediaGalleryEntryMock->expects($this->any())->method('getContent')->willReturn($entryContentMock); $this->productRepositoryMock->expects($this->once()) ->method('get') @@ -108,6 +112,10 @@ public function testCreateWithCannotSaveException() $this->contentValidatorMock->expects($this->once())->method('isValid')->with($entryContentMock) ->willReturn(true); + $this->productMock->expects($this->any()) + ->method('getMediaAttributes') + ->willReturn(['small_image' => $attributeMock]); + $this->productRepositoryMock->expects($this->once())->method('save')->with($this->productMock) ->willThrowException(new \Exception()); $this->model->create($productSku, $this->mediaGalleryEntryMock); @@ -133,6 +141,8 @@ public function testCreate() $this->contentValidatorMock->expects($this->once())->method('isValid')->with($entryContentMock) ->willReturn(true); + $this->mediaGalleryEntryMock->expects($this->any())->method('getTypes')->willReturn(['small_image']); + $newEntryMock = $this->createMock(\Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface::class); $newEntryMock->expects($this->exactly(2))->method('getId')->willReturn(42); $this->productMock->expects($this->at(2))->method('getMediaGalleryEntries') From 6724a91cf01a6b31a56ac0967206d6a365c840cd Mon Sep 17 00:00:00 2001 From: Nikita Shcherbatykh <nikita.shcherbatykh@transoftgroup.com> Date: Thu, 5 Mar 2020 15:20:02 +0200 Subject: [PATCH 083/153] MC-23743: [2.3.1] Updating Youtube video via API causes data to be lost. --- .../MediaGalleryProcessor.php | 10 +- .../Api/ProductRepositoryInterfaceTest.php | 91 +++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ProductRepository/MediaGalleryProcessor.php b/app/code/Magento/Catalog/Model/ProductRepository/MediaGalleryProcessor.php index 2aa92b8f0316e..ecb7322ac10d2 100644 --- a/app/code/Magento/Catalog/Model/ProductRepository/MediaGalleryProcessor.php +++ b/app/code/Magento/Catalog/Model/ProductRepository/MediaGalleryProcessor.php @@ -224,7 +224,15 @@ private function processEntries(ProductInterface $product, array $newEntries, ar $this->processNewMediaGalleryEntry($product, $newEntry); $finalGallery = $product->getData('media_gallery'); - $newEntryId = key(array_diff_key($product->getData('media_gallery')['images'], $entriesById)); + + $entryIds = array_keys( + array_diff_key( + $product->getData('media_gallery')['images'], + $entriesById + ) + ); + $newEntryId = array_pop($entryIds); + $newEntry = array_replace_recursive($newEntry, $finalGallery['images'][$newEntryId]); $entriesById[$newEntryId] = $newEntry; $finalGallery['images'][$newEntryId] = $newEntry; diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php index 3123295166a35..8c3ec20b0ede5 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php @@ -381,6 +381,97 @@ public function testCreate($product) $this->deleteProduct($product[ProductInterface::SKU]); } + /** + * Media gallery entries with external videos + * + * @return array + */ + public function externalVideoDataProvider(): array + { + return [ + [ + [ + [ + 'media_type' => 'external-video', + 'disabled' => false, + 'label' => 'Test Video Created', + 'types' => [], + 'position' => 1, + 'content' => [ + 'type' => 'image/png', + 'name' => 'thumbnail.png', + 'base64_encoded_data' => 'iVBORw0KGgoAAAANSUhEUgAAAP8AAADGCAMAAAAqo6adAAAAA1BMVEUAAP79f' + . '+LBAAAASElEQVR4nO3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + . 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAA+BsYAAAF7hZJ0AAAAAElFTkSuQmCC', + ], + 'extension_attributes' => [ + 'video_content' => [ + 'media_type' => 'external-video', + 'video_provider' => 'youtube', + 'video_url' => 'https://www.youtube.com/', + 'video_title' => 'Video title', + 'video_description' => 'Video description', + 'video_metadata' => 'Video meta', + ], + ], + ] + ] + ], + [ + [ + [ + 'media_type' => 'external-video', + 'disabled' => false, + 'label' => 'Test Video Updated', + 'types' => [], + 'position' => 1, + 'content' => [ + 'type' => 'image/png', + 'name' => 'thumbnail.png', + 'base64_encoded_data' => 'iVBORw0KGgoAAAANSUhEUgAAAP8AAADGCAMAAAAqo6adAAAAA1BMVEUAAP79f' + . '+LBAAAASElEQVR4nO3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + . 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAA+BsYAAAF7hZJ0AAAAAElFTkSuQmCC', + ], + 'extension_attributes' => [ + 'video_content' => [ + 'media_type' => 'external-video', + 'video_provider' => 'vimeo', + 'video_url' => 'https://www.vimeo.com/', + 'video_title' => 'Video title', + 'video_description' => 'Video description', + 'video_metadata' => 'Video meta', + ], + ], + ] + ] + ] + ]; + } + + /** + * Test create/ update product with external video media gallery entry + * + * @dataProvider externalVideoDataProvider + * @param array $mediaGalleryData + */ + public function testCreateWithExternalVideo(array $mediaGalleryData) + { + $simpleProductBaseData = $this->getSimpleProductData( + [ + ProductInterface::NAME => 'Product With Ext. Video', + ProductInterface::SKU => 'prod-with-ext-video' + ] + ); + + $simpleProductBaseData['media_gallery_entries'] = $mediaGalleryData; + + $response = $this->saveProduct($simpleProductBaseData); + $this->assertEquals( + $simpleProductBaseData['media_gallery_entries'][0]['extension_attributes'], + $response["media_gallery_entries"][0]["extension_attributes"] + ); + } + /** * @param array $fixtureProduct * From afb752e629e96b35a1380d8c3909f7366eddfac6 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Thu, 5 Mar 2020 15:48:38 +0200 Subject: [PATCH 084/153] 26117: "Current user does not have an active cart" even when he actually has one --- app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php | 4 +--- .../testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php | 2 +- .../Magento/GraphQl/Quote/Customer/MergeCartsTest.php | 2 +- .../testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php b/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php index af70809a1053d..32be4332d30e6 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php @@ -72,9 +72,7 @@ public function execute(string $cartHash, ?int $customerId, int $storeId): Quote } if (false === (bool)$cart->getIsActive()) { - throw new GraphQlNoSuchEntityException( - __('Current user does not have an active cart.') - ); + throw new GraphQlNoSuchEntityException(__('This cart isn\'t active.')); } if ((int)$cart->getStoreId() !== $storeId) { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php index 7ffce2a7f541d..ec7ea0bbf5e2a 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php @@ -162,7 +162,7 @@ public function testGetNonExistentCart() * @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php * * @expectedException Exception - * @expectedExceptionMessage Current user does not have an active cart. + * @expectedExceptionMessage This cart isn't active. */ public function testGetInactiveCart() { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php index 0a8d98eefe9e3..04f9b25c8d7cd 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php @@ -108,7 +108,7 @@ public function testMergeGuestWithCustomerCart() * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @expectedException \Exception - * @expectedExceptionMessage Current user does not have an active cart. + * @expectedExceptionMessage This cart isn't active. */ public function testGuestCartExpiryAfterMerge() { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php index ae9b7b32b2dab..2124af961bd8b 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php @@ -119,7 +119,7 @@ public function testGetNonExistentCart() * @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php * * @expectedException Exception - * @expectedExceptionMessage Current user does not have an active cart. + * @expectedExceptionMessage This cart isn't active. */ public function testGetInactiveCart() { From 8ed20d151301484271b03755006e203e80ef76eb Mon Sep 17 00:00:00 2001 From: Serhii Balko <serhii.balko@transoftgroup.com> Date: Thu, 5 Mar 2020 16:11:16 +0200 Subject: [PATCH 085/153] MC-31573: PayflowPro Checkout Broken with SameSite Cookie Changes from Chrome 80 --- .../Paypal/Controller/Transparent/Redirect.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Paypal/Controller/Transparent/Redirect.php b/app/code/Magento/Paypal/Controller/Transparent/Redirect.php index c6cee15d23c7a..7358d51f5c3d6 100644 --- a/app/code/Magento/Paypal/Controller/Transparent/Redirect.php +++ b/app/code/Magento/Paypal/Controller/Transparent/Redirect.php @@ -5,8 +5,8 @@ */ namespace Magento\Paypal\Controller\Transparent; -use Magento\Framework\App\Action\Context; use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Framework\App\ActionInterface; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -19,8 +19,13 @@ /** * Class for redirecting the Paypal response result to Magento controller. */ -class Redirect extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpPostActionInterface +class Redirect implements ActionInterface, CsrfAwareActionInterface, HttpPostActionInterface { + /** + * @var RequestInterface + */ + private $request; + /** * @var LayoutFactory */ @@ -39,22 +44,21 @@ class Redirect extends \Magento\Framework\App\Action\Action implements CsrfAware /** * Constructor * - * @param Context $context + * @param RequestInterface $request * @param LayoutFactory $resultLayoutFactory * @param Transparent $transparent * @param Logger $logger */ public function __construct( - Context $context, + RequestInterface $request, LayoutFactory $resultLayoutFactory, Transparent $transparent, Logger $logger ) { + $this->request = $request; $this->resultLayoutFactory = $resultLayoutFactory; $this->transparent = $transparent; $this->logger = $logger; - - parent::__construct($context); } /** @@ -82,7 +86,7 @@ public function validateForCsrf(RequestInterface $request): ?bool */ public function execute() { - $gatewayResponse = (array)$this->getRequest()->getPostValue(); + $gatewayResponse = (array)$this->request->getPostValue(); $this->logger->debug( ['PayPal PayflowPro redirect:' => $gatewayResponse], $this->transparent->getDebugReplacePrivateDataKeys(), From e88b1ccfe7acd0875ab9170dfa50fe396994a9d7 Mon Sep 17 00:00:00 2001 From: Serhiy Yelahin <serhiy.yelahin@transoftgroup.com> Date: Thu, 5 Mar 2020 16:48:26 +0200 Subject: [PATCH 086/153] MC-32154: Customer grid not indexing automatically --- .../Model/Import/Customer.php | 14 +- .../Test/Unit/Model/Import/CustomerTest.php | 236 ------------------ .../Model/Import/CustomerTest.php | 25 ++ 3 files changed, 37 insertions(+), 238 deletions(-) delete mode 100644 app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerTest.php diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php index cf3fa6b0b521f..8f5bb951ce737 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php @@ -11,6 +11,8 @@ use Magento\ImportExport\Model\Import; use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface; use Magento\ImportExport\Model\Import\AbstractSource; +use Magento\Customer\Model\Indexer\Processor; +use Magento\Framework\App\ObjectManager; /** * Customer entity import @@ -168,6 +170,11 @@ class Customer extends AbstractCustomer 'lock_expires', ]; + /** + * @var Processor + */ + private $indexerProcessor; + /** * @param \Magento\Framework\Stdlib\StringUtils $string * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig @@ -182,6 +189,7 @@ class Customer extends AbstractCustomer * @param \Magento\Customer\Model\ResourceModel\Attribute\CollectionFactory $attrCollectionFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param array $data + * @param Processor $indexerProcessor * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -197,7 +205,8 @@ public function __construct( \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\StorageFactory $storageFactory, \Magento\Customer\Model\ResourceModel\Attribute\CollectionFactory $attrCollectionFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, - array $data = [] + array $data = [], + ?Processor $indexerProcessor = null ) { $this->_resourceHelper = $resourceHelper; @@ -254,6 +263,7 @@ public function __construct( /** @var $customerResource \Magento\Customer\Model\ResourceModel\Customer */ $customerResource = $this->_customerModel->getResource(); $this->_entityTable = $customerResource->getEntityTable(); + $this->indexerProcessor = $indexerProcessor ?: ObjectManager::getInstance()->get(Processor::class); } /** @@ -554,7 +564,7 @@ protected function _importData() $this->_deleteCustomerEntities($entitiesToDelete); } } - + $this->indexerProcessor->markIndexerAsInvalid(); return true; } diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerTest.php deleted file mode 100644 index 9a7183d5b5f72..0000000000000 --- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerTest.php +++ /dev/null @@ -1,236 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Test class for \Magento\CustomerImportExport\Model\Import\Customer - */ -namespace Magento\CustomerImportExport\Test\Unit\Model\Import; - -use Magento\CustomerImportExport\Model\Import\Customer; -use Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage; - -class CustomerTest extends \PHPUnit\Framework\TestCase -{ - /** - * Customer entity import model - * - * @var Customer|\PHPUnit_Framework_MockObject_MockObject - */ - protected $_model; - - /** - * Available behaviours - * - * @var array - */ - protected $_availableBehaviors = [ - \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, - \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, - \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, - ]; - - /** - * Custom behavior input rows - * - * @var array - */ - protected $_inputRows = [ - 'create' => [ - Customer::COLUMN_ACTION => 'create', - Customer::COLUMN_EMAIL => 'create@email.com', - Customer::COLUMN_WEBSITE => 'website1', - ], - 'update' => [ - Customer::COLUMN_ACTION => 'update', - Customer::COLUMN_EMAIL => 'update@email.com', - Customer::COLUMN_WEBSITE => 'website1', - ], - 'delete' => [ - Customer::COLUMN_ACTION => Customer::COLUMN_ACTION_VALUE_DELETE, - Customer::COLUMN_EMAIL => 'delete@email.com', - Customer::COLUMN_WEBSITE => 'website1', - ], - ]; - - /** - * Customer ids for all custom behavior input rows - * - * @var array - */ - protected $_customerIds = ['create' => 1, 'update' => 2, 'delete' => 3]; - - /** - * Unset entity adapter model - */ - protected function tearDown() - { - unset($this->_model); - - parent::tearDown(); - } - - /** - * Create mock for import with custom behavior test - * - * @return Customer|\PHPUnit_Framework_MockObject_MockObject - */ - protected function _getModelMockForTestImportDataWithCustomBehaviour() - { - // entity adapter mock - $modelMock = $this->getMockBuilder(\Magento\CustomerImportExport\Model\Import\Customer::class) - ->disableOriginalConstructor() - ->setMethods( - [ - 'validateRow', - '_getCustomerId', - '_prepareDataForUpdate', - '_saveCustomerEntities', - '_saveCustomerAttributes', - '_deleteCustomerEntities', - 'getErrorAggregator', - 'getCustomerStorage', - ] - ) - ->getMock(); - - $errorAggregator = $this->createPartialMock( - \Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregator::class, - ['hasToBeTerminated'] - ); - - $availableBehaviors = new \ReflectionProperty($modelMock, '_availableBehaviors'); - $availableBehaviors->setAccessible(true); - $availableBehaviors->setValue($modelMock, $this->_availableBehaviors); - - // mock to imitate data source model - $dataSourceModelMock = $this->getMockBuilder(\Magento\ImportExport\Model\ResourceModel\Import\Data::class) - ->disableOriginalConstructor() - ->setMethods([ - 'getNextBunch', - '__wakeup', - ]) - ->getMock(); - - $dataSourceModelMock->expects($this->at(0)) - ->method('getNextBunch') - ->will($this->returnValue($this->_inputRows)); - $dataSourceModelMock->expects($this->at(1)) - ->method('getNextBunch') - ->will($this->returnValue(null)); - - $property = new \ReflectionProperty( - \Magento\CustomerImportExport\Model\Import\Customer::class, - '_dataSourceModel' - ); - $property->setAccessible(true); - $property->setValue($modelMock, $dataSourceModelMock); - - $modelMock->expects($this->any()) - ->method('validateRow') - ->will($this->returnValue(true)); - - $modelMock->expects($this->any()) - ->method('_getCustomerId') - ->will($this->returnValue($this->_customerIds['delete'])); - - $modelMock->expects($this->any()) - ->method('_prepareDataForUpdate') - ->will($this->returnCallback([$this, 'prepareForUpdateMock'])); - - $modelMock->expects($this->any()) - ->method('_saveCustomerEntities') - ->will($this->returnCallback([$this, 'validateSaveCustomerEntities'])); - - $modelMock->expects($this->any()) - ->method('_saveCustomerAttributes') - ->will($this->returnValue($modelMock)); - - $modelMock->expects($this->any()) - ->method('_deleteCustomerEntities') - ->will($this->returnCallback([$this, 'validateDeleteCustomerEntities'])); - - $modelMock->expects($this->any()) - ->method('getErrorAggregator') - ->will($this->returnValue($errorAggregator)); - /** @var \PHPUnit_Framework_MockObject_MockObject $storageMock */ - $storageMock = $this->createMock(Storage::class); - $storageMock->expects($this->any())->method('prepareCustomers'); - $modelMock->expects($this->any()) - ->method('getCustomerStorage') - ->willReturn($storageMock); - - return $modelMock; - } - - /** - * Test whether correct methods are invoked in case of custom behaviour for each row in action column - */ - public function testImportDataWithCustomBehaviour() - { - $this->_model = $this->_getModelMockForTestImportDataWithCustomBehaviour(); - $this->_model->setParameters(['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM]); - - // validation in validateSaveCustomerEntities and validateDeleteCustomerEntities - $this->_model->importData(); - } - - /** - * Emulate data preparing depending on value in row action column - * - * @param array $rowData - * @return int - */ - public function prepareForUpdateMock(array $rowData) - { - $preparedResult = [ - Customer::ENTITIES_TO_CREATE_KEY => [], - Customer::ENTITIES_TO_UPDATE_KEY => [], - Customer::ATTRIBUTES_TO_SAVE_KEY => ['table' => []], - ]; - - $actionColumnKey = Customer::COLUMN_ACTION; - if ($rowData[$actionColumnKey] == 'create') { - $preparedResult[Customer::ENTITIES_TO_CREATE_KEY] = [ - ['entity_id' => $this->_customerIds['create']], - ]; - } elseif ($rowData[$actionColumnKey] == 'update') { - $preparedResult[Customer::ENTITIES_TO_UPDATE_KEY] = [ - ['entity_id' => $this->_customerIds['update']], - ]; - } - - return $preparedResult; - } - - /** - * Validation method for _saveCustomerEntities - * - * @param array $entitiesToCreate - * @param array $entitiesToUpdate - * @return Customer|\PHPUnit_Framework_MockObject_MockObject - */ - public function validateSaveCustomerEntities(array $entitiesToCreate, array $entitiesToUpdate) - { - $this->assertCount(1, $entitiesToCreate); - $this->assertEquals($this->_customerIds['create'], $entitiesToCreate[0]['entity_id']); - $this->assertCount(1, $entitiesToUpdate); - $this->assertEquals($this->_customerIds['update'], $entitiesToUpdate[0]['entity_id']); - return $this->_model; - } - - /** - * Validation method for _deleteCustomerEntities - * - * @param array $customerIdsToDelete - * @return Customer|\PHPUnit_Framework_MockObject_MockObject - */ - public function validateDeleteCustomerEntities(array $customerIdsToDelete) - { - $this->assertCount(1, $customerIdsToDelete); - $this->assertEquals($this->_customerIds['delete'], $customerIdsToDelete[0]); - return $this->_model; - } -} diff --git a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php index 7b5ddc4b9fa5f..89c84d7c18068 100644 --- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php +++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php @@ -11,6 +11,7 @@ use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Exception\NoSuchEntityException; use Magento\ImportExport\Model\Import; +use Magento\Framework\Indexer\StateInterface; /** * Test for class \Magento\CustomerImportExport\Model\Import\Customer which covers validation logic @@ -39,6 +40,11 @@ class CustomerTest extends \PHPUnit\Framework\TestCase */ protected $directoryWrite; + /** + * @var \Magento\Customer\Model\Indexer\Processor + */ + private $indexerProcessor; + /** * Create all necessary data for tests */ @@ -49,6 +55,8 @@ protected function setUp() $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create(\Magento\CustomerImportExport\Model\Import\Customer::class); $this->_model->setParameters(['behavior' => Import::BEHAVIOR_ADD_UPDATE]); + $this->indexerProcessor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create(\Magento\Customer\Model\Indexer\Processor::class); $propertyAccessor = new \ReflectionProperty($this->_model, 'errorMessageTemplates'); $propertyAccessor->setAccessible(true); @@ -377,6 +385,23 @@ public function testUpdateExistingCustomers(): void $this->assertEquals(1, $customer->getStoreId()); } + /** + * Test customer indexer gets invalidated after import when Update on Schedule mode is set + * + * @magentoDbIsolation enabled + * @return void + */ + public function testCustomerIndexer(): void + { + $this->indexerProcessor->getIndexer()->reindexAll(); + $statusBeforeImport = $this->indexerProcessor->getIndexer()->getStatus(); + $this->indexerProcessor->getIndexer()->setScheduled(true); + $this->doImport(__DIR__ . '/_files/customers_with_gender_to_import.csv', Import::BEHAVIOR_ADD_UPDATE); + $statusAfterImport = $this->indexerProcessor->getIndexer()->getStatus(); + $this->assertEquals(StateInterface::STATUS_VALID, $statusBeforeImport); + $this->assertEquals(StateInterface::STATUS_INVALID, $statusAfterImport); + } + /** * Gets customer entity. * From 34c63d2e213010b2abb686bb07d08cae1577857e Mon Sep 17 00:00:00 2001 From: "rostyslav.hymon" <rostyslav.hymon@transoftgroup.com> Date: Fri, 6 Mar 2020 08:53:49 +0200 Subject: [PATCH 087/153] MC-31292: PayPal Express redirect to Login page --- ...uestPaymentInformationManagementPlugin.php | 4 +- .../PreventExpressCheckoutObserver.php | 89 ---------- ...PaymentInformationManagementPluginTest.php | 10 +- .../PreventExpressCheckoutObserverTest.php | 168 ------------------ .../Persistent/etc/frontend/events.xml | 1 - 5 files changed, 8 insertions(+), 264 deletions(-) delete mode 100644 app/code/Magento/Persistent/Observer/PreventExpressCheckoutObserver.php delete mode 100644 app/code/Magento/Persistent/Test/Unit/Observer/PreventExpressCheckoutObserverTest.php diff --git a/app/code/Magento/Persistent/Model/Checkout/GuestPaymentInformationManagementPlugin.php b/app/code/Magento/Persistent/Model/Checkout/GuestPaymentInformationManagementPlugin.php index 2641102ca4d72..b4df4125a2c60 100644 --- a/app/code/Magento/Persistent/Model/Checkout/GuestPaymentInformationManagementPlugin.php +++ b/app/code/Magento/Persistent/Model/Checkout/GuestPaymentInformationManagementPlugin.php @@ -11,6 +11,8 @@ /** * Plugin to convert shopping cart from persistent cart to guest cart before order save when customer not logged in + * + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ class GuestPaymentInformationManagementPlugin { @@ -93,7 +95,7 @@ public function __construct( * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeSavePaymentInformationAndPlaceOrder( + public function beforeSavePaymentInformation( GuestPaymentInformationManagement $subject, $cartId, $email, diff --git a/app/code/Magento/Persistent/Observer/PreventExpressCheckoutObserver.php b/app/code/Magento/Persistent/Observer/PreventExpressCheckoutObserver.php deleted file mode 100644 index d7a54f2c5fec3..0000000000000 --- a/app/code/Magento/Persistent/Observer/PreventExpressCheckoutObserver.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Persistent\Observer; - -use Magento\Framework\Event\ObserverInterface; - -class PreventExpressCheckoutObserver implements ObserverInterface -{ - /** - * @var \Magento\Framework\Message\ManagerInterface - */ - protected $messageManager; - - /** - * Url model - * - * @var \Magento\Framework\UrlInterface - */ - protected $_url; - - /** - * Persistent session - * - * @var \Magento\Persistent\Helper\Session - */ - protected $_persistentSession = null; - - /** - * @var \Magento\Customer\Model\Session - */ - protected $_customerSession; - - /** - * @var \Magento\Checkout\Helper\ExpressRedirect - */ - protected $_expressRedirectHelper; - - /** - * @param \Magento\Persistent\Helper\Session $persistentSession - * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Framework\UrlInterface $url - * @param \Magento\Framework\Message\ManagerInterface $messageManager - * @param \Magento\Checkout\Helper\ExpressRedirect $expressRedirectHelper - */ - public function __construct( - \Magento\Persistent\Helper\Session $persistentSession, - \Magento\Customer\Model\Session $customerSession, - \Magento\Framework\UrlInterface $url, - \Magento\Framework\Message\ManagerInterface $messageManager, - \Magento\Checkout\Helper\ExpressRedirect $expressRedirectHelper - ) { - $this->_persistentSession = $persistentSession; - $this->_customerSession = $customerSession; - $this->_url = $url; - $this->messageManager = $messageManager; - $this->_expressRedirectHelper = $expressRedirectHelper; - } - - /** - * Prevent express checkout - * - * @param \Magento\Framework\Event\Observer $observer - * @return void - */ - public function execute(\Magento\Framework\Event\Observer $observer) - { - if (!($this->_persistentSession->isPersistent() && !$this->_customerSession->isLoggedIn())) { - return; - } - - /** @var $controllerAction \Magento\Checkout\Controller\Express\RedirectLoginInterface*/ - $controllerAction = $observer->getEvent()->getControllerAction(); - if (!$controllerAction || - !$controllerAction instanceof \Magento\Checkout\Controller\Express\RedirectLoginInterface || - $controllerAction->getRedirectActionName() != $controllerAction->getRequest()->getActionName() - ) { - return; - } - - $this->messageManager->addNotice(__('To check out, please sign in using your email address.')); - $customerBeforeAuthUrl = $this->_url->getUrl('persistent/index/expressCheckout'); - - $this->_expressRedirectHelper->redirectLogin($controllerAction, $customerBeforeAuthUrl); - } -} diff --git a/app/code/Magento/Persistent/Test/Unit/Model/Checkout/GuestPaymentInformationManagementPluginTest.php b/app/code/Magento/Persistent/Test/Unit/Model/Checkout/GuestPaymentInformationManagementPluginTest.php index c7f84b476fa7e..01f8c5403ea22 100644 --- a/app/code/Magento/Persistent/Test/Unit/Model/Checkout/GuestPaymentInformationManagementPluginTest.php +++ b/app/code/Magento/Persistent/Test/Unit/Model/Checkout/GuestPaymentInformationManagementPluginTest.php @@ -111,7 +111,7 @@ public function testBeforeSavePaymentInformationAndPlaceOrderCartConvertsToGuest $collectionMock->expects($this->once())->method('walk')->with($walkMethod, $walkArgs); $this->cartRepositoryMock->expects($this->once())->method('save')->with($quoteMock); - $this->plugin->beforeSavePaymentInformationAndPlaceOrder( + $this->plugin->beforeSavePaymentInformation( $this->subjectMock, $cartId, $email, @@ -134,7 +134,7 @@ public function testBeforeSavePaymentInformationAndPlaceOrderShoppingCartNotPers $this->persistentSessionMock->expects($this->once())->method('isPersistent')->willReturn(true); $this->customerSessionMock->expects($this->once())->method('isLoggedIn')->willReturn(false); - $this->plugin->beforeSavePaymentInformationAndPlaceOrder( + $this->plugin->beforeSavePaymentInformation( $this->subjectMock, $cartId, $email, @@ -155,7 +155,7 @@ public function testBeforeSavePaymentInformationAndPlaceOrderPersistentSessionNo $this->persistentSessionMock->expects($this->once())->method('isPersistent')->willReturn(false); - $this->plugin->beforeSavePaymentInformationAndPlaceOrder( + $this->plugin->beforeSavePaymentInformation( $this->subjectMock, $cartId, $email, @@ -177,7 +177,7 @@ public function testBeforeSavePaymentInformationAndPlaceOrderCustomerSessionInLo $this->persistentSessionMock->expects($this->once())->method('isPersistent')->willReturn(true); $this->customerSessionMock->expects($this->once())->method('isLoggedIn')->willReturn(true); - $this->plugin->beforeSavePaymentInformationAndPlaceOrder( + $this->plugin->beforeSavePaymentInformation( $this->subjectMock, $cartId, $email, @@ -201,7 +201,7 @@ public function testBeforeSavePaymentInformationAndPlaceOrderQuoteManagerNotInPe $this->customerSessionMock->expects($this->once())->method('isLoggedIn')->willReturn(false); $this->quoteManagerMock->expects($this->once())->method('isPersistent')->willReturn(false); - $this->plugin->beforeSavePaymentInformationAndPlaceOrder( + $this->plugin->beforeSavePaymentInformation( $this->subjectMock, $cartId, $email, diff --git a/app/code/Magento/Persistent/Test/Unit/Observer/PreventExpressCheckoutObserverTest.php b/app/code/Magento/Persistent/Test/Unit/Observer/PreventExpressCheckoutObserverTest.php deleted file mode 100644 index 7749377bbfcd0..0000000000000 --- a/app/code/Magento/Persistent/Test/Unit/Observer/PreventExpressCheckoutObserverTest.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Persistent\Test\Unit\Observer; - -/** - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - */ -class PreventExpressCheckoutObserverTest extends \PHPUnit\Framework\TestCase -{ - /** - * @var \Magento\Persistent\Observer\PreventExpressCheckoutObserver - */ - protected $_model; - - /** - * @var \Magento\Framework\Event - */ - protected $_event; - - /** - * @var \Magento\Framework\Event\Observer - */ - protected $_observer; - - /** - * Customer session - * - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_customerSession; - - /** - * Persistent session - * - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_persistentSession; - - /** - * - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_messageManager; - - /** - * Url model - * - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_url; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_expressRedirectHelper; - - protected function setUp() - { - $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); - - $this->_event = new \Magento\Framework\Event(); - $this->_observer = new \Magento\Framework\Event\Observer(); - $this->_observer->setEvent($this->_event); - - $this->_customerSession = $this->getMockBuilder( - \Magento\Customer\Model\Session::class - )->disableOriginalConstructor()->setMethods( - ['isLoggedIn'] - )->getMock(); - - $this->_persistentSession = $this->getMockBuilder( - \Magento\Persistent\Helper\Session::class - )->disableOriginalConstructor()->setMethods( - ['isPersistent'] - )->getMock(); - - $this->_messageManager = $this->getMockBuilder( - \Magento\Framework\Message\ManagerInterface::class - )->disableOriginalConstructor()->setMethods( - [] - )->getMock(); - - $this->_url = $this->getMockBuilder( - \Magento\Framework\UrlInterface::class - )->disableOriginalConstructor()->setMethods( - [] - )->getMock(); - - $this->_expressRedirectHelper = $this->getMockBuilder( - \Magento\Checkout\Helper\ExpressRedirect::class - )->disableOriginalConstructor()->setMethods( - ['redirectLogin'] - )->getMock(); - - $this->_model = $helper->getObject( - \Magento\Persistent\Observer\PreventExpressCheckoutObserver::class, - [ - 'customerSession' => $this->_customerSession, - 'persistentSession' => $this->_persistentSession, - 'messageManager' => $this->_messageManager, - 'url' => $this->_url, - 'expressRedirectHelper' => $this->_expressRedirectHelper - ] - ); - } - - public function testPreventExpressCheckoutOnline() - { - $this->_customerSession->expects($this->once())->method('isLoggedIn')->will($this->returnValue(true)); - $this->_persistentSession->expects($this->once())->method('isPersistent')->will($this->returnValue(true)); - $this->_model->execute($this->_observer); - } - - public function testPreventExpressCheckoutEmpty() - { - $this->_customerSession->expects($this->any())->method('isLoggedIn')->will($this->returnValue(false)); - $this->_persistentSession->expects($this->any())->method('isPersistent')->will($this->returnValue(true)); - - $this->_event->setControllerAction(null); - $this->_model->execute($this->_observer); - - $this->_event->setControllerAction(new \StdClass()); - $this->_model->execute($this->_observer); - - $expectedActionName = 'realAction'; - $unexpectedActionName = 'notAction'; - $request = new \Magento\Framework\DataObject(); - $request->setActionName($unexpectedActionName); - $expressRedirectMock = $this->getMockBuilder( - \Magento\Checkout\Controller\Express\RedirectLoginInterface::class - )->disableOriginalConstructor()->setMethods( - [ - 'getActionFlagList', - 'getResponse', - 'getCustomerBeforeAuthUrl', - 'getLoginUrl', - 'getRedirectActionName', - 'getRequest', - ] - )->getMock(); - $expressRedirectMock->expects($this->any())->method('getRequest')->will($this->returnValue($request)); - $expressRedirectMock->expects( - $this->any() - )->method( - 'getRedirectActionName' - )->will( - $this->returnValue($expectedActionName) - ); - $this->_event->setControllerAction($expressRedirectMock); - $this->_model->execute($this->_observer); - - $expectedAuthUrl = 'expectedAuthUrl'; - $request->setActionName($expectedActionName); - $this->_url->expects($this->once())->method('getUrl')->will($this->returnValue($expectedAuthUrl)); - $this->_expressRedirectHelper->expects( - $this->once() - )->method( - 'redirectLogin' - )->with( - $expressRedirectMock, - $expectedAuthUrl - ); - $this->_model->execute($this->_observer); - } -} diff --git a/app/code/Magento/Persistent/etc/frontend/events.xml b/app/code/Magento/Persistent/etc/frontend/events.xml index 79720695ea6f6..840297b0ff098 100644 --- a/app/code/Magento/Persistent/etc/frontend/events.xml +++ b/app/code/Magento/Persistent/etc/frontend/events.xml @@ -34,7 +34,6 @@ <observer name="persistent_session" instance="Magento\Persistent\Observer\RenewCookieObserver" /> <observer name="persistent_quote" instance="Magento\Persistent\Observer\CheckExpirePersistentQuoteObserver" /> <observer name="persistent_customer" instance="Magento\Persistent\Observer\EmulateCustomerObserver" /> - <observer name="persistent_checkout" instance="Magento\Persistent\Observer\PreventExpressCheckoutObserver" /> </event> <event name="customer_customer_authenticated"> <observer name="persistent" instance="Magento\Persistent\Observer\CustomerAuthenticatedEventObserver" /> From 8211eb79022e2167dad38349c63bb9c36279e34d Mon Sep 17 00:00:00 2001 From: Serhii Balko <serhii.balko@transoftgroup.com> Date: Fri, 6 Mar 2020 10:31:24 +0200 Subject: [PATCH 088/153] MC-31573: PayflowPro Checkout Broken with SameSite Cookie Changes from Chrome 80 --- .../Adminhtml/Transparent/Redirect.php | 60 ++++++++++++++++++- .../Controller/Transparent/Redirect.php | 25 ++++---- 2 files changed, 69 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php b/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php index 8201761cc3a29..6e25574929550 100644 --- a/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php +++ b/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php @@ -5,9 +5,67 @@ */ namespace Magento\Paypal\Controller\Adminhtml\Transparent; +use Magento\Backend\App\AbstractAction; +use Magento\Backend\App\Action\Context; +use Magento\Framework\View\Result\LayoutFactory; +use Magento\Payment\Model\Method\Logger; +use Magento\Paypal\Model\Payflow\Transparent; + /** * Class for redirecting the Paypal response result to Magento controller. */ -class Redirect extends \Magento\Paypal\Controller\Transparent\Redirect +class Redirect extends AbstractAction { + /** + * @var LayoutFactory + */ + private $resultLayoutFactory; + + /** + * @var Transparent + */ + private $transparent; + + /** + * @var Logger + */ + private $logger; + + /** + * @param Context $context + * @param LayoutFactory $resultLayoutFactory + * @param Transparent $transparent + * @param Logger $logger + */ + public function __construct( + Context $context, + LayoutFactory $resultLayoutFactory, + Transparent $transparent, + Logger $logger + ) + { + parent::__construct($context); + $this->transparent = $transparent; + $this->logger = $logger; + $this->resultLayoutFactory = $resultLayoutFactory; + } + + /** + * @inheritdoc + */ + public function execute() + { + $gatewayResponse = (array)$this->getRequest()->getPostValue(); + $this->logger->debug( + ['PayPal PayflowPro redirect:' => $gatewayResponse], + $this->transparent->getDebugReplacePrivateDataKeys(), + $this->transparent->getDebugFlag() + ); + + $resultLayout = $this->resultLayoutFactory->create(); + $resultLayout->addDefaultHandle(); + $resultLayout->getLayout()->getUpdate()->load(['transparent_payment_redirect']); + + return $resultLayout; + } } diff --git a/app/code/Magento/Paypal/Controller/Transparent/Redirect.php b/app/code/Magento/Paypal/Controller/Transparent/Redirect.php index 7358d51f5c3d6..1b14a97990275 100644 --- a/app/code/Magento/Paypal/Controller/Transparent/Redirect.php +++ b/app/code/Magento/Paypal/Controller/Transparent/Redirect.php @@ -5,8 +5,9 @@ */ namespace Magento\Paypal\Controller\Transparent; +use Magento\Framework\App\Action\Action; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\Action\HttpPostActionInterface; -use Magento\Framework\App\ActionInterface; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -19,13 +20,8 @@ /** * Class for redirecting the Paypal response result to Magento controller. */ -class Redirect implements ActionInterface, CsrfAwareActionInterface, HttpPostActionInterface +class Redirect extends Action implements CsrfAwareActionInterface, HttpPostActionInterface { - /** - * @var RequestInterface - */ - private $request; - /** * @var LayoutFactory */ @@ -42,27 +38,26 @@ class Redirect implements ActionInterface, CsrfAwareActionInterface, HttpPostAct private $logger; /** - * Constructor - * - * @param RequestInterface $request + * @param Context $context * @param LayoutFactory $resultLayoutFactory * @param Transparent $transparent * @param Logger $logger */ public function __construct( - RequestInterface $request, + Context $context, LayoutFactory $resultLayoutFactory, Transparent $transparent, Logger $logger ) { - $this->request = $request; $this->resultLayoutFactory = $resultLayoutFactory; $this->transparent = $transparent; $this->logger = $logger; + + parent::__construct($context); } /** - * @inheritDoc + * @inheritdoc */ public function createCsrfValidationException( RequestInterface $request @@ -71,7 +66,7 @@ public function createCsrfValidationException( } /** - * @inheritDoc + * @inheritdoc */ public function validateForCsrf(RequestInterface $request): ?bool { @@ -86,7 +81,7 @@ public function validateForCsrf(RequestInterface $request): ?bool */ public function execute() { - $gatewayResponse = (array)$this->request->getPostValue(); + $gatewayResponse = (array)$this->getRequest()->getPostValue(); $this->logger->debug( ['PayPal PayflowPro redirect:' => $gatewayResponse], $this->transparent->getDebugReplacePrivateDataKeys(), From 6d6af36f4fb31dfe7f585061d34332ed0819fe1a Mon Sep 17 00:00:00 2001 From: Serhii Balko <serhii.balko@transoftgroup.com> Date: Fri, 6 Mar 2020 11:32:26 +0200 Subject: [PATCH 089/153] MC-31573: PayflowPro Checkout Broken with SameSite Cookie Changes from Chrome 80 --- .../Adminhtml/Transparent/Redirect.php | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php b/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php index 6e25574929550..f105843e5abfd 100644 --- a/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php +++ b/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php @@ -7,6 +7,10 @@ use Magento\Backend\App\AbstractAction; use Magento\Backend\App\Action\Context; +use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Framework\App\CsrfAwareActionInterface; +use Magento\Framework\App\Request\InvalidRequestException; +use Magento\Framework\App\RequestInterface; use Magento\Framework\View\Result\LayoutFactory; use Magento\Payment\Model\Method\Logger; use Magento\Paypal\Model\Payflow\Transparent; @@ -14,7 +18,7 @@ /** * Class for redirecting the Paypal response result to Magento controller. */ -class Redirect extends AbstractAction +class Redirect extends AbstractAction implements HttpPostActionInterface, CsrfAwareActionInterface { /** * @var LayoutFactory @@ -42,8 +46,7 @@ public function __construct( LayoutFactory $resultLayoutFactory, Transparent $transparent, Logger $logger - ) - { + ) { parent::__construct($context); $this->transparent = $transparent; $this->logger = $logger; @@ -68,4 +71,21 @@ public function execute() return $resultLayout; } + + /** + * @inheritdoc + */ + public function createCsrfValidationException( + RequestInterface $request + ): ?InvalidRequestException { + return null; + } + + /** + * @inheritdoc + */ + public function validateForCsrf(RequestInterface $request): ?bool + { + return true; + } } From 36722d9a6994e00904727730030488d539544e03 Mon Sep 17 00:00:00 2001 From: Joridos <joridoss@gmail.com> Date: Fri, 7 Feb 2020 04:31:50 +0200 Subject: [PATCH 090/153] #26698 Fix region getId() on NULL collection in Paypal Nvp API --- app/code/Magento/Paypal/Model/Api/Nvp.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Paypal/Model/Api/Nvp.php b/app/code/Magento/Paypal/Model/Api/Nvp.php index 2ec88df492fb9..41be1e4aaad37 100644 --- a/app/code/Magento/Paypal/Model/Api/Nvp.php +++ b/app/code/Magento/Paypal/Model/Api/Nvp.php @@ -1519,10 +1519,13 @@ protected function _applyStreetAndRegionWorkarounds(DataObject $address) )->setPageSize( 1 ); - $regionItems = $regions->getItems(); - $region = array_shift($regionItems); - $address->setRegionId($region->getId()); - $address->setExportedKeys(array_merge($address->getExportedKeys(), ['region_id'])); + + if ($regions->count()) { + $regionItems = $regions->getItems(); + $region = array_shift($regionItems); + $address->setRegionId($region->getId()); + $address->setExportedKeys(array_merge($address->getExportedKeys(), ['region_id'])); + } } } From 8a73e53ee369b24b95e3c94bc379ce48856ee8ca Mon Sep 17 00:00:00 2001 From: Serhii Balko <serhii.balko@transoftgroup.com> Date: Fri, 6 Mar 2020 14:05:06 +0200 Subject: [PATCH 091/153] MC-31196: [2.4.0] Paypal issue with region on 2.3.4 --- app/code/Magento/Paypal/Model/Api/Nvp.php | 20 ++++++------- .../Paypal/Model/Express/CheckoutTest.php | 30 +++++++++++++++---- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/app/code/Magento/Paypal/Model/Api/Nvp.php b/app/code/Magento/Paypal/Model/Api/Nvp.php index 41be1e4aaad37..9e4f7693f4bfb 100644 --- a/app/code/Magento/Paypal/Model/Api/Nvp.php +++ b/app/code/Magento/Paypal/Model/Api/Nvp.php @@ -1512,13 +1512,11 @@ protected function _applyStreetAndRegionWorkarounds(DataObject $address) } // attempt to fetch region_id from directory if ($address->getCountryId() && $address->getRegion()) { - $regions = $this->_countryFactory->create()->loadByCode( - $address->getCountryId() - )->getRegionCollection()->addRegionCodeOrNameFilter( - $address->getRegion() - )->setPageSize( - 1 - ); + $regions = $this->_countryFactory->create() + ->loadByCode($address->getCountryId()) + ->getRegionCollection() + ->addRegionCodeOrNameFilter($address->getRegion()) + ->setPageSize(1); if ($regions->count()) { $regionItems = $regions->getItems(); @@ -1627,7 +1625,7 @@ protected function _filterPeriodUnit($value) case 'year': return 'Year'; default: - break; + return ''; } } @@ -1656,7 +1654,7 @@ protected function _filterBillingAgreementStatus($value) case 'active': return 'Active'; default: - break; + return ''; } } @@ -1697,7 +1695,7 @@ protected function _filterPaymentStatusFromNvpToInfo($value) case 'Voided': return \Magento\Paypal\Model\Info::PAYMENTSTATUS_VOIDED; default: - break; + return null; } } @@ -1715,7 +1713,7 @@ protected function _filterPaymentReviewAction($value) case \Magento\Paypal\Model\Pro::PAYMENT_REVIEW_DENY: return 'Deny'; default: - break; + return null; } } diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php index 8d6e4dbf30ae5..23dc60d347427 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php @@ -6,6 +6,7 @@ namespace Magento\Paypal\Model\Express; use Magento\Checkout\Model\Type\Onepage; +use Magento\Directory\Model\CountryFactory; use Magento\Framework\ObjectManagerInterface; use Magento\Paypal\Model\Api\Nvp; use Magento\Paypal\Model\Api\Type\Factory; @@ -17,8 +18,6 @@ use Magento\TestFramework\Helper\Bootstrap; /** - * Class CheckoutTest - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CheckoutTest extends \PHPUnit\Framework\TestCase @@ -634,10 +633,6 @@ public function testGuestReturnFromPaypal() ->setMethods(['call', 'getExportedShippingAddress', 'getExportedBillingAddress']) ->getMock(); - $api->expects($this->any()) - ->method('call') - ->will($this->returnValue([])); - $apiTypeFactory->expects($this->any()) ->method('create') ->will($this->returnValue($api)); @@ -652,6 +647,14 @@ public function testGuestReturnFromPaypal() ->method('getExportedShippingAddress') ->will($this->returnValue($exportedShippingAddress)); + $this->addCountryFactory($api); + $data = [ + 'COUNTRYCODE' => $quote->getShippingAddress()->getCountryId(), + 'STATE' => 'unknown' + ]; + $api->method('call') + ->willReturn($data); + $paypalInfo->expects($this->once()) ->method('importToPayment') ->with($api, $quote->getPayment()); @@ -710,4 +713,19 @@ private function getFixtureQuote(): Quote return $quoteCollection->getLastItem(); } + + /** + * Adds countryFactory to a mock. + * + * @param \PHPUnit\Framework\MockObject\MockObject $api + * @throws \ReflectionException + * @return void + */ + private function addCountryFactory(\PHPUnit\Framework\MockObject\MockObject $api): void + { + $reflection = new \ReflectionClass($api); + $property = $reflection->getProperty('_countryFactory'); + $property->setAccessible(true); + $property->setValue($api, $this->objectManager->get(CountryFactory::class)); + } } From 27dd58a91fa285ecc846d5ec941fe573666cf6d2 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Fri, 6 Mar 2020 16:00:02 +0200 Subject: [PATCH 092/153] added Patch for update product url_key --- .../Patch/Data/UpdateUrlKeyForProducts.php | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 app/code/Magento/CatalogUrlRewrite/Setup/Patch/Data/UpdateUrlKeyForProducts.php diff --git a/app/code/Magento/CatalogUrlRewrite/Setup/Patch/Data/UpdateUrlKeyForProducts.php b/app/code/Magento/CatalogUrlRewrite/Setup/Patch/Data/UpdateUrlKeyForProducts.php new file mode 100644 index 0000000000000..5e7039912999b --- /dev/null +++ b/app/code/Magento/CatalogUrlRewrite/Setup/Patch/Data/UpdateUrlKeyForProducts.php @@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\CatalogUrlRewrite\Setup\Patch\Data; + +use Magento\Catalog\Model\Product\Url; +use Magento\Eav\Setup\EavSetup; +use Magento\Eav\Setup\EavSetupFactory; +use Magento\Framework\Setup\ModuleDataSetupInterface; +use Magento\Framework\Setup\Patch\DataPatchInterface; +use Magento\Framework\Setup\Patch\PatchVersionInterface; + +/** + * Update url_key all products. + */ +class UpdateUrlKeyForProducts implements DataPatchInterface, PatchVersionInterface +{ + /** + * @var ModuleDataSetupInterface + */ + private $moduleDataSetup; + + /** + * @var EavSetup + */ + private $eavSetup; + + /** + * @var Url + */ + private $urlProduct; + + /** + * @param ModuleDataSetupInterface $moduleDataSetup + * @param EavSetupFactory $eavSetupFactory + * @param Url $urlProduct + */ + public function __construct( + ModuleDataSetupInterface $moduleDataSetup, + EavSetupFactory $eavSetupFactory, + Url $urlProduct + ) { + $this->moduleDataSetup = $moduleDataSetup; + $this->eavSetup = $eavSetupFactory->create(['setup' => $moduleDataSetup]); + $this->urlProduct = $urlProduct; + } + + /** + * @inheritdoc + */ + public function apply() + { + $productTypeId = $this->eavSetup->getEntityTypeId(\Magento\Catalog\Model\Product::ENTITY); + $table = $this->moduleDataSetup->getTable('catalog_product_entity_varchar'); + $select = $this->moduleDataSetup->getConnection()->select()->from( + $table, + ['value_id', 'value'] + )->where( + 'attribute_id = ?', + $this->eavSetup->getAttributeId($productTypeId, 'url_key') + ); + + $result = $this->moduleDataSetup->getConnection()->fetchAll($select); + foreach ($result as $key => $item) { + $result[$key]['value'] = $this->urlProduct->formatUrlKey($item['value']); + } + + foreach (array_chunk($result, 500, true) as $pathResult) { + $this->moduleDataSetup->getConnection()->insertOnDuplicate($table, $pathResult, ['value']); + } + + return $this; + } + + /** + * @inheritDoc + */ + public static function getVersion() + { + return "2.4.0"; + } + + /** + * @inheritdoc + */ + public static function getDependencies() + { + return []; + } + + /** + * @inheritdoc + */ + public function getAliases() + { + return []; + } +} From 45b9e193ddd8a413cb041976de6f1d9da5f53d5f Mon Sep 17 00:00:00 2001 From: Serhii Balko <serhii.balko@transoftgroup.com> Date: Fri, 6 Mar 2020 16:49:50 +0200 Subject: [PATCH 093/153] MC-31573: PayflowPro Checkout Broken with SameSite Cookie Changes from Chrome 80 --- .../Adminhtml/Transparent/Redirect.php | 80 +------------------ 1 file changed, 1 insertion(+), 79 deletions(-) diff --git a/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php b/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php index f105843e5abfd..8201761cc3a29 100644 --- a/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php +++ b/app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php @@ -5,87 +5,9 @@ */ namespace Magento\Paypal\Controller\Adminhtml\Transparent; -use Magento\Backend\App\AbstractAction; -use Magento\Backend\App\Action\Context; -use Magento\Framework\App\Action\HttpPostActionInterface; -use Magento\Framework\App\CsrfAwareActionInterface; -use Magento\Framework\App\Request\InvalidRequestException; -use Magento\Framework\App\RequestInterface; -use Magento\Framework\View\Result\LayoutFactory; -use Magento\Payment\Model\Method\Logger; -use Magento\Paypal\Model\Payflow\Transparent; - /** * Class for redirecting the Paypal response result to Magento controller. */ -class Redirect extends AbstractAction implements HttpPostActionInterface, CsrfAwareActionInterface +class Redirect extends \Magento\Paypal\Controller\Transparent\Redirect { - /** - * @var LayoutFactory - */ - private $resultLayoutFactory; - - /** - * @var Transparent - */ - private $transparent; - - /** - * @var Logger - */ - private $logger; - - /** - * @param Context $context - * @param LayoutFactory $resultLayoutFactory - * @param Transparent $transparent - * @param Logger $logger - */ - public function __construct( - Context $context, - LayoutFactory $resultLayoutFactory, - Transparent $transparent, - Logger $logger - ) { - parent::__construct($context); - $this->transparent = $transparent; - $this->logger = $logger; - $this->resultLayoutFactory = $resultLayoutFactory; - } - - /** - * @inheritdoc - */ - public function execute() - { - $gatewayResponse = (array)$this->getRequest()->getPostValue(); - $this->logger->debug( - ['PayPal PayflowPro redirect:' => $gatewayResponse], - $this->transparent->getDebugReplacePrivateDataKeys(), - $this->transparent->getDebugFlag() - ); - - $resultLayout = $this->resultLayoutFactory->create(); - $resultLayout->addDefaultHandle(); - $resultLayout->getLayout()->getUpdate()->load(['transparent_payment_redirect']); - - return $resultLayout; - } - - /** - * @inheritdoc - */ - public function createCsrfValidationException( - RequestInterface $request - ): ?InvalidRequestException { - return null; - } - - /** - * @inheritdoc - */ - public function validateForCsrf(RequestInterface $request): ?bool - { - return true; - } } From af251eb2311a7d477f5c6516195b7032704c755a Mon Sep 17 00:00:00 2001 From: AleksLi <aleksliwork@gmail.com> Date: Fri, 6 Mar 2020 21:10:28 +0100 Subject: [PATCH 094/153] MC-26683: Some sort of example how I see the solution of this. --- .../Magento/GraphQl/Controller/GraphQl.php | 2 + .../Model/Cart/AddProductsToCart.php | 18 +++- .../Exception/GraphQlCartInputException.php | 97 +++++++++++++++++++ 3 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 lib/internal/Magento/Framework/GraphQl/Exception/GraphQlCartInputException.php diff --git a/app/code/Magento/GraphQl/Controller/GraphQl.php b/app/code/Magento/GraphQl/Controller/GraphQl.php index 2d72fde91b031..a5b8a14ae0793 100644 --- a/app/code/Magento/GraphQl/Controller/GraphQl.php +++ b/app/code/Magento/GraphQl/Controller/GraphQl.php @@ -160,6 +160,8 @@ public function dispatch(RequestInterface $request) : ResponseInterface } catch (\Exception $error) { $result['errors'] = isset($result) && isset($result['errors']) ? $result['errors'] : []; $result['errors'][] = $this->graphQlError->create($error); + // here we should have data from GraphQlCartInputException + $result['data'] = $error->getData(); $statusCode = ExceptionFormatter::HTTP_GRAPH_QL_SCHEMA_ERROR_STATUS; } diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php b/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php index cfe78389fffe4..b9722d276975a 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php @@ -8,11 +8,12 @@ namespace Magento\QuoteGraphQl\Model\Cart; use Magento\Framework\GraphQl\Exception\GraphQlInputException; +use Magento\Framework\Message\MessageInterface; use Magento\Quote\Api\CartRepositoryInterface; use Magento\Quote\Model\Quote; /** - * Adding products to cart using GraphQL + * Add products to cart */ class AddProductsToCart { @@ -43,16 +44,29 @@ public function __construct( * * @param Quote $cart * @param array $cartItems + * @return \Magento\Framework\GraphQl\Exception\GraphQlCartInputException * @throws GraphQlInputException * @throws \Magento\Framework\Exception\LocalizedException * @throws \Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException */ - public function execute(Quote $cart, array $cartItems): void + public function execute(Quote $cart, array $cartItems): \Magento\Framework\GraphQl\Exception\GraphQlCartInputException { foreach ($cartItems as $cartItemData) { $this->addProductToCart->execute($cart, $cartItemData); } + if ($cart->getData('has_error')) { + $e = new \Magento\Framework\GraphQl\Exception\GraphQlCartInputException(__('Shopping cart errors')); + $errors = $cart->getErrors(); + foreach ($errors as $error) { + /** @var MessageInterface $error */ + $e->addError(new GraphQlInputException(__($error->getText()))); + } + $e->addData($cartItems); + + throw $e; + } + $this->cartRepository->save($cart); } } diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlCartInputException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlCartInputException.php new file mode 100644 index 0000000000000..2dbbc1c20476e --- /dev/null +++ b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlCartInputException.php @@ -0,0 +1,97 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\GraphQl\Exception; + +use Magento\Framework\Exception\AggregateExceptionInterface; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Phrase; +use GraphQL\Error\ClientAware; + +class GraphQlCartInputException extends LocalizedException implements AggregateExceptionInterface, ClientAware +{ + const EXCEPTION_CATEGORY = 'graphql-input'; + + /** + * @var boolean + */ + private $isSafe; + + /** + * The array of errors that have been added via the addError() method + * + * @var \Magento\Framework\Exception\LocalizedException[] + */ + private $errors = []; + + /** + * @var array + */ + private $data = []; + + /** + * Initialize object + * + * @param Phrase $phrase + * @param \Exception $cause + * @param int $code + * @param boolean $isSafe + */ + public function __construct(Phrase $phrase, \Exception $cause = null, $code = 0, $isSafe = true) + { + $this->isSafe = $isSafe; + parent::__construct($phrase, $cause, $code); + } + + /** + * @inheritdoc + */ + public function isClientSafe() : bool + { + return $this->isSafe; + } + + /** + * @inheritdoc + */ + public function getCategory() : string + { + return self::EXCEPTION_CATEGORY; + } + + /** + * Add child error if used as aggregate exception + * + * @param LocalizedException $exception + * @return $this + */ + public function addError(LocalizedException $exception): self + { + $this->errors[] = $exception; + return $this; + } + + /** + * Get child errors if used as aggregate exception + * + * @return LocalizedException[] + */ + public function getErrors(): array + { + return $this->errors; + } + + /** + * @param array $data + * @return GraphQlInputException + */ + public function addData(array $data): self + { + $this->data = $data; + return $this; + } +} From b91a20406aa353dd969dae294550ec0ff0f63371 Mon Sep 17 00:00:00 2001 From: Burlacu Vasilii <v.burlacu@atwix.com> Date: Sat, 7 Mar 2020 20:06:57 +0200 Subject: [PATCH 095/153] Added MFTF tests to check presence/absence of the category filter item in the layered navigation --- .../Catalog/Test/Mftf/Data/ConfigData.xml | 19 ++++++ ...rontCategoryPageWithCategoryFilterTest.xml | 64 +++++++++++++++++++ ...tCategoryPageWithoutCategoryFilterTest.xml | 64 +++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/Data/ConfigData.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ConfigData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ConfigData.xml new file mode 100644 index 0000000000000..35c5c8ac3c866 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ConfigData.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="EnableCategoryFilterOnCategoryPageConfigData"> + <data key="path">catalog/layered_navigation/display_category</data> + <data key="value">1</data> + </entity> + <entity name="DisableCategoryFilterOnCategoryPageConfigData"> + <data key="path">catalog/layered_navigation/display_category</data> + <data key="value">0</data> + </entity> +</entities> \ No newline at end of file diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml new file mode 100644 index 0000000000000..35a532b27ea10 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontCategoryPageWithCategoryFilterTest"> + <annotations> + <title value="Category with Layered Navigation - verify presence of category filter"/> + <stories value="Category page: Layered Navigation with category filter"/> + <description value="Verify that the category filter is present in layered navigation on category page"/> + <features value="Catalog"/> + <severity value="MINOR"/> + <group value="Catalog"/> + </annotations> + + <before> + <!-- Create one category --> + <createData entity="_defaultCategory" stepKey="defaultCategory"> + <field key="name">TopCategory</field> + </createData> + <!-- Create second category, having as parent the 1st one --> + <createData entity="SubCategoryWithParent" stepKey="subCategory"> + <field key="name">SubCategory</field> + <field key="parent_id">$$defaultCategory.id$$</field> + <requiredEntity createDataKey="defaultCategory"/> + </createData> + + <!-- Create a product assigned to the 1st category --> + <createData entity="_defaultProduct" stepKey="createSimpleProduct1"> + <requiredEntity createDataKey="defaultCategory"/> + </createData> + + <!-- Create 2nd product assigned to the 2nd category --> + <!-- The "Category filter" item is not shown in layered navigation --> + <!-- if there are not subcategories with products to show --> + <createData entity="_defaultProduct" stepKey="createSimpleProduct2"> + <requiredEntity createDataKey="subCategory"/> + </createData> + + <!-- Set the category filter to be present on the category page layered navigation --> + <magentoCLI command="config:set {{EnableCategoryFilterOnCategoryPageConfigData.path}} {{EnableCategoryFilterOnCategoryPageConfigData.value}}" stepKey="setCategoryFilterVisibleOnStorefront"/> + + <!-- Flush cache --> + <magentoCLI command="cache:flush" stepKey="clearCache1"/> + </before> + + <after> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteProduct1"/> + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteProduct2"/> + <deleteData createDataKey="subCategory" stepKey="deleteSubCategory"/> + <deleteData createDataKey="defaultCategory" stepKey="deleteCategoryMainCategory"/> + </after> + + <amOnPage url="{{StorefrontCategoryPage.url($$defaultCategory.name$$)}}" stepKey="navigateToCategoryPage"/> + <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> + + <!-- Verify category filter item is present --> + <see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml new file mode 100644 index 0000000000000..7604415a2d7ff --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontCategoryPageWithoutCategoryFilterTest"> + <annotations> + <title value="Category with Layered Navigation - verify absence of category filter"/> + <stories value="Category page: Layered Navigation without category filter"/> + <description value="Verify that the category filter is NOT present in layered navigation on category page"/> + <features value="Catalog"/> + <severity value="MINOR"/> + <group value="Catalog"/> + </annotations> + + <before> + <!-- Create one category --> + <createData entity="_defaultCategory" stepKey="defaultCategory"> + <field key="name">TopCategory</field> + </createData> + <!-- Create second category, having as parent the 1st one --> + <createData entity="SubCategoryWithParent" stepKey="subCategory"> + <field key="name">SubCategory</field> + <field key="parent_id">$$defaultCategory.id$$</field> + <requiredEntity createDataKey="defaultCategory"/> + </createData> + + <!-- Create a product assigned to the 1st category --> + <createData entity="_defaultProduct" stepKey="createSimpleProduct1"> + <requiredEntity createDataKey="defaultCategory"/> + </createData> + + <!-- Create 2nd product assigned to the 2nd category --> + <!-- The "Category filter" item is not shown in layered navigation --> + <!-- if there are not subcategories with products to show --> + <createData entity="_defaultProduct" stepKey="createSimpleProduct2"> + <requiredEntity createDataKey="subCategory"/> + </createData> + + <!-- Set the category filter to NOT be present on the category page layered navigation --> + <magentoCLI command="config:set {{DisableCategoryFilterOnCategoryPageConfigData.path}} {{DisableCategoryFilterOnCategoryPageConfigData.value}}" stepKey="hideCategoryFilterOnStorefront"/> + + <!-- Flush cache --> + <magentoCLI command="cache:flush" stepKey="clearCache"/> + </before> + + <after> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteProduct1"/> + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteProduct2"/> + <deleteData createDataKey="subCategory" stepKey="deleteSubCategory"/> + <deleteData createDataKey="defaultCategory" stepKey="deleteCategoryMainCategory"/> + </after> + + <amOnPage url="{{StorefrontCategoryPage.url($$defaultCategory.name$$)}}" stepKey="navigateToCategoryPage"/> + <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> + + <!-- Verify category filter item is NOT present --> + <dontSee selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> + </test> +</tests> From 05e2f32ef611437912360da44c1292da6d742614 Mon Sep 17 00:00:00 2001 From: Burlacu Vasilii <v.burlacu@atwix.com> Date: Sat, 7 Mar 2020 21:49:19 +0200 Subject: [PATCH 096/153] Updated the MFTF tests previously created --- ...sibilityInLayeredNavigationActionGroup.xml | 20 +++++++++++++++++++ ...rontCategoryPageWithCategoryFilterTest.xml | 9 ++++----- ...tCategoryPageWithoutCategoryFilterTest.xml | 9 ++++----- 3 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontChangeCategoryFilterVisibilityInLayeredNavigationActionGroup.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontChangeCategoryFilterVisibilityInLayeredNavigationActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontChangeCategoryFilterVisibilityInLayeredNavigationActionGroup.xml new file mode 100644 index 0000000000000..124e49a01c290 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontChangeCategoryFilterVisibilityInLayeredNavigationActionGroup.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <!-- On a category page with layered navigation, verify if the category filter item is present --> + <actionGroup name="StorefrontCheckCategoryFilterIsVisibleInLayeredNavigationActionGroup"> + <!-- Verify category filter item is present --> + <see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> + </actionGroup> + + <!-- On a category page with layered navigation, verify if the category filter item is NOT present --> + <actionGroup name="StorefrontCheckCategoryFilterIsNotVisibleInLayeredNavigationActionGroup"> + <!-- Verify category filter item is NOT present --> + <dontSee selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml index 35a532b27ea10..4431588d07ded 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml @@ -44,7 +44,6 @@ <!-- Set the category filter to be present on the category page layered navigation --> <magentoCLI command="config:set {{EnableCategoryFilterOnCategoryPageConfigData.path}} {{EnableCategoryFilterOnCategoryPageConfigData.value}}" stepKey="setCategoryFilterVisibleOnStorefront"/> - <!-- Flush cache --> <magentoCLI command="cache:flush" stepKey="clearCache1"/> </before> @@ -55,10 +54,10 @@ <deleteData createDataKey="defaultCategory" stepKey="deleteCategoryMainCategory"/> </after> - <amOnPage url="{{StorefrontCategoryPage.url($$defaultCategory.name$$)}}" stepKey="navigateToCategoryPage"/> - <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage"> + <argument name="category" value="$$defaultCategory$$"/> + </actionGroup> - <!-- Verify category filter item is present --> - <see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> + <actionGroup ref="StorefrontCheckCategoryFilterIsVisibleInLayeredNavigationActionGroup" stepKey="checkCategoryFilterIsPresent" /> </test> </tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml index 7604415a2d7ff..db76552dd4eb8 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml @@ -44,7 +44,6 @@ <!-- Set the category filter to NOT be present on the category page layered navigation --> <magentoCLI command="config:set {{DisableCategoryFilterOnCategoryPageConfigData.path}} {{DisableCategoryFilterOnCategoryPageConfigData.value}}" stepKey="hideCategoryFilterOnStorefront"/> - <!-- Flush cache --> <magentoCLI command="cache:flush" stepKey="clearCache"/> </before> @@ -55,10 +54,10 @@ <deleteData createDataKey="defaultCategory" stepKey="deleteCategoryMainCategory"/> </after> - <amOnPage url="{{StorefrontCategoryPage.url($$defaultCategory.name$$)}}" stepKey="navigateToCategoryPage"/> - <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage"> + <argument name="category" value="$$defaultCategory$$"/> + </actionGroup> - <!-- Verify category filter item is NOT present --> - <dontSee selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> + <actionGroup ref="StorefrontCheckCategoryFilterIsNotVisibleInLayeredNavigationActionGroup" stepKey="checkCategoryFilterIsPresent" /> </test> </tests> From 5b0bd95e28479bc5ff5f257b5056e1c6007f3afc Mon Sep 17 00:00:00 2001 From: Burlacu Vasilii <v.burlacu@atwix.com> Date: Mon, 9 Mar 2020 08:37:45 +0200 Subject: [PATCH 097/153] Adjusted MFTF added tests action groups names --- ...igationCategoryFilterNotVisibleActionGroup.xml} | 8 +------- ...dNavigationCategoryFilterVisibleActionGroup.xml | 14 ++++++++++++++ ...torefrontCategoryPageWithCategoryFilterTest.xml | 2 +- ...efrontCategoryPageWithoutCategoryFilterTest.xml | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) rename app/code/Magento/Catalog/Test/Mftf/ActionGroup/{StorefrontChangeCategoryFilterVisibilityInLayeredNavigationActionGroup.xml => AssertStorefrontLayeredNavigationCategoryFilterNotVisibleActionGroup.xml} (55%) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontLayeredNavigationCategoryFilterVisibleActionGroup.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontChangeCategoryFilterVisibilityInLayeredNavigationActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontLayeredNavigationCategoryFilterNotVisibleActionGroup.xml similarity index 55% rename from app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontChangeCategoryFilterVisibilityInLayeredNavigationActionGroup.xml rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontLayeredNavigationCategoryFilterNotVisibleActionGroup.xml index 124e49a01c290..c892594201f17 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontChangeCategoryFilterVisibilityInLayeredNavigationActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontLayeredNavigationCategoryFilterNotVisibleActionGroup.xml @@ -6,14 +6,8 @@ --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <!-- On a category page with layered navigation, verify if the category filter item is present --> - <actionGroup name="StorefrontCheckCategoryFilterIsVisibleInLayeredNavigationActionGroup"> - <!-- Verify category filter item is present --> - <see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> - </actionGroup> - <!-- On a category page with layered navigation, verify if the category filter item is NOT present --> - <actionGroup name="StorefrontCheckCategoryFilterIsNotVisibleInLayeredNavigationActionGroup"> + <actionGroup name="AssertStorefrontLayeredNavigationCategoryFilterNotVisibleActionGroup"> <!-- Verify category filter item is NOT present --> <dontSee selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontLayeredNavigationCategoryFilterVisibleActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontLayeredNavigationCategoryFilterVisibleActionGroup.xml new file mode 100644 index 0000000000000..8eebafd3cd8ab --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertStorefrontLayeredNavigationCategoryFilterVisibleActionGroup.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <!-- On a category page with layered navigation, verify if the category filter item is present --> + <actionGroup name="AssertStorefrontLayeredNavigationCategoryFilterVisibleActionGroup"> + <!-- Verify category filter item is present --> + <see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml index 4431588d07ded..8955f43e1b335 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml @@ -58,6 +58,6 @@ <argument name="category" value="$$defaultCategory$$"/> </actionGroup> - <actionGroup ref="StorefrontCheckCategoryFilterIsVisibleInLayeredNavigationActionGroup" stepKey="checkCategoryFilterIsPresent" /> + <actionGroup ref="AssertStorefrontLayeredNavigationCategoryFilterVisibleActionGroup" stepKey="checkCategoryFilterIsPresent" /> </test> </tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml index db76552dd4eb8..7900a712e0664 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml @@ -58,6 +58,6 @@ <argument name="category" value="$$defaultCategory$$"/> </actionGroup> - <actionGroup ref="StorefrontCheckCategoryFilterIsNotVisibleInLayeredNavigationActionGroup" stepKey="checkCategoryFilterIsPresent" /> + <actionGroup ref="AssertStorefrontLayeredNavigationCategoryFilterNotVisibleActionGroup" stepKey="checkCategoryFilterIsNotPresent" /> </test> </tests> From e2f2b7930373dfda19e36dcd70031ae7e5e5fb4f Mon Sep 17 00:00:00 2001 From: Burlacu Vasilii <v.burlacu@atwix.com> Date: Mon, 9 Mar 2020 08:45:19 +0200 Subject: [PATCH 098/153] Fixed failed unit test after review adjustments --- .../Catalog/Test/Unit/Model/Layer/FilterListTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php index 2b579ecea6b83..84c433379b156 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Layer/FilterListTest.php @@ -71,8 +71,8 @@ protected function setUp() $this->model = new FilterList( $this->objectManagerMock, $this->attributeListMock, - $filters, - $this->layerCategoryConfigMock + $this->layerCategoryConfigMock, + $filters ); } @@ -112,7 +112,7 @@ public function testGetFilters($method, $value, $expectedClass) ->will($this->returnValue([$this->attributeMock])); $this->layerCategoryConfigMock->expects($this->once()) - ->method('isCategoryVisibleInLayer') + ->method('isCategoryFilterVisibleInLayerNavigation') ->willReturn(true); $this->assertEquals(['filter', 'filter'], $this->model->getFilters($this->layerMock)); @@ -156,7 +156,7 @@ public function testGetFiltersWithoutCategoryFilter( ->will($this->returnValue([$this->attributeMock])); $this->layerCategoryConfigMock->expects($this->once()) - ->method('isCategoryVisibleInLayer') + ->method('isCategoryFilterVisibleInLayerNavigation') ->willReturn(false); $this->assertEquals($expectedResult, $this->model->getFilters($this->layerMock)); From 929902465697b9e0ea48d8126a7ad4f18767bf75 Mon Sep 17 00:00:00 2001 From: Piotr Markiewicz <piotr.markiewicz@vaimo.com> Date: Mon, 9 Mar 2020 08:44:15 +0100 Subject: [PATCH 099/153] Added translations and removed fully qualified global functions --- .../Controller/Adminhtml/Export/File/Delete.php | 6 +++--- .../Controller/Adminhtml/Export/File/Download.php | 6 +++--- app/code/Magento/ImportExport/i18n/en_US.csv | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php index 75d772922c70c..316607bb247fb 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php @@ -63,7 +63,7 @@ public function execute() $resultRedirect->setPath('adminhtml/export/index'); $fileName = $this->getRequest()->getParam('filename'); if (empty($fileName)) { - $this->messageManager->addErrorMessage(\__('Please provide valid export file name')); + $this->messageManager->addErrorMessage(__('Please provide valid export file name')); return $resultRedirect; } @@ -73,9 +73,9 @@ public function execute() if ($directory->isFile($path)) { $this->file->deleteFile($path); - $this->messageManager->addSuccessMessage(\__('File %1 deleted', $fileName)); + $this->messageManager->addSuccessMessage(__('File %1 deleted', $fileName)); } else { - $this->messageManager->addErrorMessage(\__('%1 is not a valid file', $fileName)); + $this->messageManager->addErrorMessage(__('%1 is not a valid file', $fileName)); } } catch (FileSystemException $exception) { $this->messageManager->addErrorMessage($exception->getMessage()); diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Download.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Download.php index 48e8b8f1d9d07..4107e19860328 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Download.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Download.php @@ -61,8 +61,8 @@ public function execute() $resultRedirect = $this->resultRedirectFactory->create(); $resultRedirect->setPath('adminhtml/export/index'); $fileName = $this->getRequest()->getParam('filename'); - if (empty($fileName) || \preg_match('/\.\.(\\\|\/)/', $fileName) !== 0) { - $this->messageManager->addErrorMessage(\__('Please provide valid export file name')); + if (empty($fileName) || preg_match('/\.\.(\\\|\/)/', $fileName) !== 0) { + $this->messageManager->addErrorMessage(__('Please provide valid export file name')); return $resultRedirect; } @@ -76,7 +76,7 @@ public function execute() DirectoryList::VAR_DIR ); } - $this->messageManager->addErrorMessage(\__('%1 is not a valid file', $fileName)); + $this->messageManager->addErrorMessage(__('%1 is not a valid file', $fileName)); } catch (\Exception $exception) { $this->messageManager->addErrorMessage($exception->getMessage()); } diff --git a/app/code/Magento/ImportExport/i18n/en_US.csv b/app/code/Magento/ImportExport/i18n/en_US.csv index fae93c78baa09..a4943fe72826f 100644 --- a/app/code/Magento/ImportExport/i18n/en_US.csv +++ b/app/code/Magento/ImportExport/i18n/en_US.csv @@ -124,3 +124,6 @@ Summary,Summary "Message is added to queue, wait to get your file soon. Make sure your cron job is running to export the file","Message is added to queue, wait to get your file soon. Make sure your cron job is running to export the file" "Invalid data","Invalid data" "Invalid response","Invalid response" +"File %1 deleted","File %1 deleted" +"Please provide valid export file name","Please provide valid export file name" +"%1 is not a valid file","%1 is not a valid file" From 85a5e19531ef53fae2230cae45b3cdfc73734f52 Mon Sep 17 00:00:00 2001 From: Anusha Vattam <avattam@adobe.com> Date: Mon, 9 Mar 2020 13:46:54 -0500 Subject: [PATCH 100/153] MC-32270: Cart.applied_gift_cards resolver exception message thrown when removing an item from cart need to be refactored - Added code fix and test changes for exception message --- .../QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php | 4 ++-- .../Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php | 4 ++-- .../Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php index bf9ccef8ae44a..d202fcfb7a81d 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php @@ -65,9 +65,9 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value try { $this->cartItemRepository->deleteById((int)$cart->getId(), $itemId); } catch (NoSuchEntityException $e) { - throw new GraphQlNoSuchEntityException(__($e->getMessage()), $e); + throw new GraphQlNoSuchEntityException(__('The Cart doesn\'t contain the item.')); } catch (LocalizedException $e) { - throw new GraphQlInputException(__($e->getMessage()), $e); + throw new GraphQlInputException(__($e->getMessage())); } return [ diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php index c93db424834ef..931f01858fcae 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php @@ -84,7 +84,7 @@ public function testRemoveNonExistentItem() $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); $notExistentItemId = 999; - $this->expectExceptionMessage("Cart doesn't contain the {$notExistentItemId} item."); + $this->expectExceptionMessage("Cart doesn't contain the item."); $query = $this->getQuery($maskedQuoteId, $notExistentItemId); $this->graphQlMutation($query, [], '', $this->getHeaderMap()); @@ -106,7 +106,7 @@ public function testRemoveItemIfItemIsNotBelongToCart() 'virtual-product' ); - $this->expectExceptionMessage("Cart doesn't contain the {$secondQuoteItemId} item."); + $this->expectExceptionMessage("Cart doesn't contain the item."); $query = $this->getQuery($firstQuoteMaskedId, $secondQuoteItemId); $this->graphQlMutation($query, [], '', $this->getHeaderMap()); diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php index 6f105259bf65c..fc24ded85ab82 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php @@ -74,7 +74,7 @@ public function testRemoveNonExistentItem() $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); $notExistentItemId = 999; - $this->expectExceptionMessage("Cart doesn't contain the {$notExistentItemId} item."); + $this->expectExceptionMessage("Cart doesn't contain the item."); $query = $this->getQuery($maskedQuoteId, $notExistentItemId); $this->graphQlMutation($query); @@ -95,7 +95,7 @@ public function testRemoveItemIfItemIsNotBelongToCart() 'virtual-product' ); - $this->expectExceptionMessage("Cart doesn't contain the {$secondQuoteItemId} item."); + $this->expectExceptionMessage("Cart doesn't contain the item."); $query = $this->getQuery($firstQuoteMaskedId, $secondQuoteItemId); $this->graphQlMutation($query); From b6839aa26544744ffc16b28d5fb16628100e3cdd Mon Sep 17 00:00:00 2001 From: Anusha Vattam <avattam@adobe.com> Date: Mon, 9 Mar 2020 14:35:08 -0500 Subject: [PATCH 101/153] MC-32270: Cart.applied_gift_cards resolver exception message thrown when removing an item from cart need to be refactored - Added code fix changes --- .../Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php index d202fcfb7a81d..82dc71d6a082c 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php @@ -67,7 +67,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value } catch (NoSuchEntityException $e) { throw new GraphQlNoSuchEntityException(__('The Cart doesn\'t contain the item.')); } catch (LocalizedException $e) { - throw new GraphQlInputException(__($e->getMessage())); + throw new GraphQlInputException(__($e->getMessage()), $e); } return [ From bb52ab904990bc6642490d5b06ef7817018afa96 Mon Sep 17 00:00:00 2001 From: Anusha Vattam <avattam@adobe.com> Date: Mon, 9 Mar 2020 14:56:42 -0500 Subject: [PATCH 102/153] MC-32270: Cart.applied_gift_cards resolver exception message thrown when removing an item from cart need to be refactored - Added new phrase changes in en_US file --- app/code/Magento/Quote/i18n/en_US.csv | 1 + .../Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Quote/i18n/en_US.csv b/app/code/Magento/Quote/i18n/en_US.csv index b24179297493a..c899c432c70d4 100644 --- a/app/code/Magento/Quote/i18n/en_US.csv +++ b/app/code/Magento/Quote/i18n/en_US.csv @@ -31,6 +31,7 @@ Subtotal,Subtotal "Cart %1 does not contain item %2","Cart %1 does not contain item %2" "Could not save quote","Could not save quote" "Cart %1 doesn't contain item %2","Cart %1 doesn't contain item %2" +"The cart doesn't contain the item","The cart doesn't contain the item" "Could not remove item from quote","Could not remove item from quote" "The qty value is required to update quote item.","The qty value is required to update quote item." "Minimum order amount is %1","Minimum order amount is %1" diff --git a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php index 82dc71d6a082c..c2045d4a0e8d5 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php @@ -65,7 +65,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value try { $this->cartItemRepository->deleteById((int)$cart->getId(), $itemId); } catch (NoSuchEntityException $e) { - throw new GraphQlNoSuchEntityException(__('The Cart doesn\'t contain the item.')); + throw new GraphQlNoSuchEntityException(__('The cart doesn\'t contain the item')); } catch (LocalizedException $e) { throw new GraphQlInputException(__($e->getMessage()), $e); } From bf47a0083345933a32a5e273dfbfc9f0f7bcf424 Mon Sep 17 00:00:00 2001 From: Anusha Vattam <avattam@adobe.com> Date: Mon, 9 Mar 2020 15:02:31 -0500 Subject: [PATCH 103/153] MC-32270: Cart.applied_gift_cards resolver exception message thrown when removing an item from cart need to be refactored - Added new changes to test --- .../Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php | 4 ++-- .../Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php index 931f01858fcae..eb34197595853 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/RemoveItemFromCartTest.php @@ -84,7 +84,7 @@ public function testRemoveNonExistentItem() $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); $notExistentItemId = 999; - $this->expectExceptionMessage("Cart doesn't contain the item."); + $this->expectExceptionMessage("The cart doesn't contain the item"); $query = $this->getQuery($maskedQuoteId, $notExistentItemId); $this->graphQlMutation($query, [], '', $this->getHeaderMap()); @@ -106,7 +106,7 @@ public function testRemoveItemIfItemIsNotBelongToCart() 'virtual-product' ); - $this->expectExceptionMessage("Cart doesn't contain the item."); + $this->expectExceptionMessage("The cart doesn't contain the item"); $query = $this->getQuery($firstQuoteMaskedId, $secondQuoteItemId); $this->graphQlMutation($query, [], '', $this->getHeaderMap()); diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php index fc24ded85ab82..4714e2b03182e 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/RemoveItemFromCartTest.php @@ -74,7 +74,7 @@ public function testRemoveNonExistentItem() $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); $notExistentItemId = 999; - $this->expectExceptionMessage("Cart doesn't contain the item."); + $this->expectExceptionMessage("The cart doesn't contain the item"); $query = $this->getQuery($maskedQuoteId, $notExistentItemId); $this->graphQlMutation($query); @@ -95,7 +95,7 @@ public function testRemoveItemIfItemIsNotBelongToCart() 'virtual-product' ); - $this->expectExceptionMessage("Cart doesn't contain the item."); + $this->expectExceptionMessage("The cart doesn't contain the item"); $query = $this->getQuery($firstQuoteMaskedId, $secondQuoteItemId); $this->graphQlMutation($query); From c47a6a26aae710f2fe64e92d25e03e456c90ae79 Mon Sep 17 00:00:00 2001 From: AleksLi <aleksliwork@gmail.com> Date: Mon, 9 Mar 2020 22:17:08 +0100 Subject: [PATCH 104/153] MC-26683: Added errors to the return model --- .../Magento/GraphQl/Controller/GraphQl.php | 2 - .../Model/Cart/AddProductsToCart.php | 17 +--- .../QuoteGraphQl/Model/Resolver/CartItems.php | 7 ++ .../Exception/GraphQlCartInputException.php | 97 ------------------- 4 files changed, 9 insertions(+), 114 deletions(-) delete mode 100644 lib/internal/Magento/Framework/GraphQl/Exception/GraphQlCartInputException.php diff --git a/app/code/Magento/GraphQl/Controller/GraphQl.php b/app/code/Magento/GraphQl/Controller/GraphQl.php index a5b8a14ae0793..2d72fde91b031 100644 --- a/app/code/Magento/GraphQl/Controller/GraphQl.php +++ b/app/code/Magento/GraphQl/Controller/GraphQl.php @@ -160,8 +160,6 @@ public function dispatch(RequestInterface $request) : ResponseInterface } catch (\Exception $error) { $result['errors'] = isset($result) && isset($result['errors']) ? $result['errors'] : []; $result['errors'][] = $this->graphQlError->create($error); - // here we should have data from GraphQlCartInputException - $result['data'] = $error->getData(); $statusCode = ExceptionFormatter::HTTP_GRAPH_QL_SCHEMA_ERROR_STATUS; } diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php b/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php index b9722d276975a..0360d9ccf5476 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php @@ -13,7 +13,7 @@ use Magento\Quote\Model\Quote; /** - * Add products to cart + * Adding products to cart using GraphQL */ class AddProductsToCart { @@ -44,29 +44,16 @@ public function __construct( * * @param Quote $cart * @param array $cartItems - * @return \Magento\Framework\GraphQl\Exception\GraphQlCartInputException * @throws GraphQlInputException * @throws \Magento\Framework\Exception\LocalizedException * @throws \Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException */ - public function execute(Quote $cart, array $cartItems): \Magento\Framework\GraphQl\Exception\GraphQlCartInputException + public function execute(Quote $cart, array $cartItems): void { foreach ($cartItems as $cartItemData) { $this->addProductToCart->execute($cart, $cartItemData); } - if ($cart->getData('has_error')) { - $e = new \Magento\Framework\GraphQl\Exception\GraphQlCartInputException(__('Shopping cart errors')); - $errors = $cart->getErrors(); - foreach ($errors as $error) { - /** @var MessageInterface $error */ - $e->addError(new GraphQlInputException(__($error->getText()))); - } - $e->addData($cartItems); - - throw $e; - } - $this->cartRepository->save($cart); } } diff --git a/app/code/Magento/QuoteGraphQl/Model/Resolver/CartItems.php b/app/code/Magento/QuoteGraphQl/Model/Resolver/CartItems.php index 2674b3728619a..8017a91b5cfd2 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Resolver/CartItems.php +++ b/app/code/Magento/QuoteGraphQl/Model/Resolver/CartItems.php @@ -9,6 +9,7 @@ use Magento\Framework\Exception\LocalizedException; use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\Framework\GraphQl\Exception\GraphQlInputException; use Magento\Framework\GraphQl\Query\ResolverInterface; use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; use Magento\Quote\Model\Quote\Item as QuoteItem; @@ -29,6 +30,12 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value $cart = $value['model']; $itemsData = []; + if ($cart->getData('has_error')) { + $errors = $cart->getErrors(); + foreach ($errors as $error) { + $itemsData[] = new GraphQlInputException(__($error->getText())); + } + } foreach ($cart->getAllVisibleItems() as $cartItem) { /** * @var QuoteItem $cartItem diff --git a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlCartInputException.php b/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlCartInputException.php deleted file mode 100644 index 2dbbc1c20476e..0000000000000 --- a/lib/internal/Magento/Framework/GraphQl/Exception/GraphQlCartInputException.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Framework\GraphQl\Exception; - -use Magento\Framework\Exception\AggregateExceptionInterface; -use Magento\Framework\Exception\LocalizedException; -use Magento\Framework\Phrase; -use GraphQL\Error\ClientAware; - -class GraphQlCartInputException extends LocalizedException implements AggregateExceptionInterface, ClientAware -{ - const EXCEPTION_CATEGORY = 'graphql-input'; - - /** - * @var boolean - */ - private $isSafe; - - /** - * The array of errors that have been added via the addError() method - * - * @var \Magento\Framework\Exception\LocalizedException[] - */ - private $errors = []; - - /** - * @var array - */ - private $data = []; - - /** - * Initialize object - * - * @param Phrase $phrase - * @param \Exception $cause - * @param int $code - * @param boolean $isSafe - */ - public function __construct(Phrase $phrase, \Exception $cause = null, $code = 0, $isSafe = true) - { - $this->isSafe = $isSafe; - parent::__construct($phrase, $cause, $code); - } - - /** - * @inheritdoc - */ - public function isClientSafe() : bool - { - return $this->isSafe; - } - - /** - * @inheritdoc - */ - public function getCategory() : string - { - return self::EXCEPTION_CATEGORY; - } - - /** - * Add child error if used as aggregate exception - * - * @param LocalizedException $exception - * @return $this - */ - public function addError(LocalizedException $exception): self - { - $this->errors[] = $exception; - return $this; - } - - /** - * Get child errors if used as aggregate exception - * - * @return LocalizedException[] - */ - public function getErrors(): array - { - return $this->errors; - } - - /** - * @param array $data - * @return GraphQlInputException - */ - public function addData(array $data): self - { - $this->data = $data; - return $this; - } -} From a8450f4dd847c8e5af63b591579529943e555f29 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Tue, 10 Mar 2020 10:49:12 +0200 Subject: [PATCH 105/153] `The` instead of `This` in error message --- app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php | 2 +- .../testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php | 2 +- .../testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php | 2 +- .../testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php b/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php index 32be4332d30e6..21243a4545fa3 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php @@ -72,7 +72,7 @@ public function execute(string $cartHash, ?int $customerId, int $storeId): Quote } if (false === (bool)$cart->getIsActive()) { - throw new GraphQlNoSuchEntityException(__('This cart isn\'t active.')); + throw new GraphQlNoSuchEntityException(__('The cart isn\'t active.')); } if ((int)$cart->getStoreId() !== $storeId) { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php index ec7ea0bbf5e2a..90ee6caec6797 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php @@ -162,7 +162,7 @@ public function testGetNonExistentCart() * @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php * * @expectedException Exception - * @expectedExceptionMessage This cart isn't active. + * @expectedExceptionMessage The cart isn't active. */ public function testGetInactiveCart() { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php index 04f9b25c8d7cd..695857f781b23 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php @@ -108,7 +108,7 @@ public function testMergeGuestWithCustomerCart() * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @expectedException \Exception - * @expectedExceptionMessage This cart isn't active. + * @expectedExceptionMessage The cart isn't active. */ public function testGuestCartExpiryAfterMerge() { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php index 2124af961bd8b..1b54e2f57017f 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php @@ -119,7 +119,7 @@ public function testGetNonExistentCart() * @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php * * @expectedException Exception - * @expectedExceptionMessage This cart isn't active. + * @expectedExceptionMessage The cart isn't active. */ public function testGetInactiveCart() { From 45eb2d11b7431e904bfd1a36fc28ed5a33b5deda Mon Sep 17 00:00:00 2001 From: Vasya Tsviklinskyi <tsviklinskyi@gmail.com> Date: Tue, 10 Mar 2020 12:00:07 +0200 Subject: [PATCH 106/153] MC-31837: Restricted admin - issue with saving products --- .../ResourceModel/Product/Website/Link.php | 43 +++++--- .../ProductWebsiteAssignmentHandler.php | 56 ++++++++++ .../ProductWebsiteAssignmentHandlerTest.php | 101 ++++++++++++++++++ app/code/Magento/Catalog/etc/di.xml | 5 + 4 files changed, 193 insertions(+), 12 deletions(-) create mode 100644 app/code/Magento/Catalog/Model/ResourceModel/ProductWebsiteAssignmentHandler.php create mode 100644 app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/ProductWebsiteAssignmentHandlerTest.php diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Website/Link.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Website/Link.php index de4ffc5d862f9..d9016d8a852e8 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Website/Link.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Website/Link.php @@ -7,8 +7,10 @@ use Magento\Catalog\Api\Data\ProductInterface; use Magento\Framework\App\ResourceConnection; -use Magento\Framework\EntityManager\MetadataPool; +/** + * Class Link used for assign website to the product + */ class Link { /** @@ -28,6 +30,7 @@ public function __construct( /** * Retrieve associated with product websites ids + * * @param int $productId * @return array */ @@ -48,29 +51,53 @@ public function getWebsiteIdsByProductId($productId) /** * Return true - if websites was changed, and false - if not + * * @param ProductInterface $product * @param array $websiteIds * @return bool */ public function saveWebsiteIds(ProductInterface $product, array $websiteIds) + { + $productId = (int) $product->getId(); + return $this->updateProductWebsite($productId, $websiteIds); + } + + /** + * Get Product website table + * + * @return string + */ + private function getProductWebsiteTable() + { + return $this->resourceConnection->getTableName('catalog_product_website'); + } + + /** + * Update product website table + * + * @param int $productId + * @param array $websiteIds + * @return bool + */ + public function updateProductWebsite(int $productId, array $websiteIds): bool { $connection = $this->resourceConnection->getConnection(); - $oldWebsiteIds = $this->getWebsiteIdsByProductId($product->getId()); + $oldWebsiteIds = $this->getWebsiteIdsByProductId($productId); $insert = array_diff($websiteIds, $oldWebsiteIds); $delete = array_diff($oldWebsiteIds, $websiteIds); if (!empty($insert)) { $data = []; foreach ($insert as $websiteId) { - $data[] = ['product_id' => (int) $product->getId(), 'website_id' => (int) $websiteId]; + $data[] = ['product_id' => $productId, 'website_id' => (int)$websiteId]; } $connection->insertMultiple($this->getProductWebsiteTable(), $data); } if (!empty($delete)) { foreach ($delete as $websiteId) { - $condition = ['product_id = ?' => (int) $product->getId(), 'website_id = ?' => (int) $websiteId]; + $condition = ['product_id = ?' => $productId, 'website_id = ?' => (int)$websiteId]; $connection->delete($this->getProductWebsiteTable(), $condition); } } @@ -81,12 +108,4 @@ public function saveWebsiteIds(ProductInterface $product, array $websiteIds) return false; } - - /** - * @return string - */ - private function getProductWebsiteTable() - { - return $this->resourceConnection->getTableName('catalog_product_website'); - } } diff --git a/app/code/Magento/Catalog/Model/ResourceModel/ProductWebsiteAssignmentHandler.php b/app/code/Magento/Catalog/Model/ResourceModel/ProductWebsiteAssignmentHandler.php new file mode 100644 index 0000000000000..10e0a09593208 --- /dev/null +++ b/app/code/Magento/Catalog/Model/ResourceModel/ProductWebsiteAssignmentHandler.php @@ -0,0 +1,56 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Catalog\Model\ResourceModel; + +use Magento\Catalog\Model\ResourceModel\Product\Website\Link; +use Magento\Framework\EntityManager\Operation\AttributeInterface; + +/** + * Class purpose is to handle product websites assignment + */ +class ProductWebsiteAssignmentHandler implements AttributeInterface +{ + /** + * @var Link + */ + private $productLink; + + /** + * ProductWebsiteAssignmentHandler constructor + * + * @param Link $productLink + */ + public function __construct( + Link $productLink + ) { + $this->productLink = $productLink; + } + + /** + * Assign product website entity to the product repository + * + * @param string $entityType + * @param array $entityData + * @param array $arguments + * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @throws \Exception + */ + public function execute($entityType, $entityData, $arguments = []): array + { + $websiteIds = array_key_exists('website_ids', $entityData) ? + array_filter($entityData['website_ids'], function ($websiteId) { + return $websiteId !== null; + }) : []; + $productId = array_key_exists('entity_id', $entityData) ? (int) $entityData['entity_id'] : null; + + if (!empty($productId) && !empty($websiteIds)) { + $this->productLink->updateProductWebsite($productId, $websiteIds); + } + return $entityData; + } +} diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/ProductWebsiteAssignmentHandlerTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/ProductWebsiteAssignmentHandlerTest.php new file mode 100644 index 0000000000000..664aa311008f2 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/ProductWebsiteAssignmentHandlerTest.php @@ -0,0 +1,101 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); +namespace Magento\Catalog\Test\Unit\Model\ResourceModel; + +use Magento\Catalog\Model\ResourceModel\Product\Website\Link; +use Magento\Catalog\Model\ResourceModel\ProductWebsiteAssignmentHandler; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use PHPUnit\Framework\TestCase; + +class ProductWebsiteAssignmentHandlerTest extends TestCase +{ + /** + * @var ProductWebsiteAssignmentHandler + */ + protected $handler; + + /** + * @var Link|\PHPUnit_Framework_MockObject_MockObject + */ + protected $productLinkMock; + + protected function setUp() + { + $objectManager = new ObjectManager($this); + + $this->productLinkMock = $this->createPartialMock( + Link::class, + ['updateProductWebsite'] + ); + $this->handler = $objectManager->getObject( + ProductWebsiteAssignmentHandler::class, + [ + 'productLink' => $this->productLinkMock + ] + ); + } + + /** + * @param $actualData + * @param $expectedResult + * @dataProvider productWebsitesDataProvider + * @throws \Exception + */ + public function testUpdateProductWebsiteReturnValidResult($actualData, $expectedResult) + { + $this->productLinkMock->expects($this->any())->method('updateProductWebsite')->willReturn($expectedResult); + $this->assertEquals( + $actualData['entityData'], + $this->handler->execute($actualData['entityType'], $actualData['entityData']) + ); + } + + /** + * @return array + */ + public function productWebsitesDataProvider(): array + { + return [ + [ + [ + 'entityType' => 'product', + 'entityData' => [ + 'entity_id' => '12345', + 'website_ids' => ['1', '2', '3'], + 'name' => 'test-1', + 'sku' => 'test-1' + ] + ], + true + ], + [ + [ + 'entityType' => 'product', + 'entityData' => [ + 'entity_id' => null, + 'website_ids' => ['1', '2', '3'], + 'name' => 'test-1', + 'sku' => 'test-1' + ] + ], + false + ], + [ + [ + 'entityType' => 'product', + 'entityData' => [ + 'entity_id' => '12345', + 'website_ids' => [null], + 'name' => 'test-1', + 'sku' => 'test-1' + ] + ], + false + ] + ]; + } +} diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml index 223d690d28327..ff67989d337bb 100644 --- a/app/code/Magento/Catalog/etc/di.xml +++ b/app/code/Magento/Catalog/etc/di.xml @@ -891,6 +891,11 @@ <item name="update" xsi:type="string">Magento\Catalog\Model\ResourceModel\UpdateHandler</item> </item> </item> + <item name="websites" xsi:type="array"> + <item name="Magento\Catalog\Api\Data\ProductInterface" xsi:type="array"> + <item name="create" xsi:type="string">Magento\Catalog\Model\ResourceModel\ProductWebsiteAssignmentHandler</item> + </item> + </item> </argument> </arguments> </type> From f8e5bf06a16319849407f39c2312b30451f5765c Mon Sep 17 00:00:00 2001 From: Nikita Shcherbatykh <nikita.shcherbatykh@transoftgroup.com> Date: Tue, 10 Mar 2020 14:19:06 +0200 Subject: [PATCH 107/153] MC-31878: [Magento Cloud] - Order bulk update using rest api --- .../Model/MassSchedule.php | 21 +-- .../Model/OperationRepositoryInterface.php | 31 ++++ .../Operation/OperationRepository.php | 27 ++- .../Magento/AsynchronousOperations/etc/di.xml | 1 + .../Controller/Rest/InputParamsResolver.php | 18 +- .../Rest/Asynchronous/InputParamsResolver.php | 29 ++- .../WebapiAsync/Model/OperationRepository.php | 102 ++++++++++ app/code/Magento/WebapiAsync/etc/di.xml | 21 +++ .../Model/OrderRepositoryInterfaceTest.php | 174 ++++++++++++++++++ 9 files changed, 393 insertions(+), 31 deletions(-) create mode 100644 app/code/Magento/AsynchronousOperations/Model/OperationRepositoryInterface.php create mode 100644 app/code/Magento/WebapiAsync/Model/OperationRepository.php create mode 100644 dev/tests/api-functional/testsuite/Magento/WebapiAsync/Model/OrderRepositoryInterfaceTest.php diff --git a/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php b/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php index 89d468159c6e9..1c1ca9c196d19 100644 --- a/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php +++ b/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php @@ -8,19 +8,18 @@ namespace Magento\AsynchronousOperations\Model; -use Magento\Framework\App\ObjectManager; -use Magento\Framework\DataObject\IdentityGeneratorInterface; -use Magento\Framework\Exception\LocalizedException; -use Magento\AsynchronousOperations\Api\Data\ItemStatusInterfaceFactory; use Magento\AsynchronousOperations\Api\Data\AsyncResponseInterface; use Magento\AsynchronousOperations\Api\Data\AsyncResponseInterfaceFactory; use Magento\AsynchronousOperations\Api\Data\ItemStatusInterface; +use Magento\AsynchronousOperations\Api\Data\ItemStatusInterfaceFactory; +use Magento\Authorization\Model\UserContextInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Bulk\BulkManagementInterface; +use Magento\Framework\DataObject\IdentityGeneratorInterface; +use Magento\Framework\Encryption\Encryptor; use Magento\Framework\Exception\BulkException; +use Magento\Framework\Exception\LocalizedException; use Psr\Log\LoggerInterface; -use Magento\AsynchronousOperations\Model\ResourceModel\Operation\OperationRepository; -use Magento\Authorization\Model\UserContextInterface; -use Magento\Framework\Encryption\Encryptor; /** * Class MassSchedule used for adding multiple entities as Operations to Bulk Management with the status tracking @@ -55,7 +54,7 @@ class MassSchedule private $logger; /** - * @var OperationRepository + * @var OperationRepositoryInterface */ private $operationRepository; @@ -77,7 +76,7 @@ class MassSchedule * @param AsyncResponseInterfaceFactory $asyncResponseFactory * @param BulkManagementInterface $bulkManagement * @param LoggerInterface $logger - * @param OperationRepository $operationRepository + * @param OperationRepositoryInterface $operationRepository * @param UserContextInterface $userContext * @param Encryptor|null $encryptor */ @@ -87,7 +86,7 @@ public function __construct( AsyncResponseInterfaceFactory $asyncResponseFactory, BulkManagementInterface $bulkManagement, LoggerInterface $logger, - OperationRepository $operationRepository, + OperationRepositoryInterface $operationRepository, UserContextInterface $userContext = null, Encryptor $encryptor = null ) { @@ -139,7 +138,7 @@ public function publishMass($topicName, array $entitiesArray, $groupId = null, $ $requestItem = $this->itemStatusInterfaceFactory->create(); try { - $operation = $this->operationRepository->createByTopic($topicName, $entityParams, $groupId); + $operation = $this->operationRepository->create($topicName, $entityParams, $groupId, $key); $operations[] = $operation; $requestItem->setId($key); $requestItem->setStatus(ItemStatusInterface::STATUS_ACCEPTED); diff --git a/app/code/Magento/AsynchronousOperations/Model/OperationRepositoryInterface.php b/app/code/Magento/AsynchronousOperations/Model/OperationRepositoryInterface.php new file mode 100644 index 0000000000000..945692fed7c99 --- /dev/null +++ b/app/code/Magento/AsynchronousOperations/Model/OperationRepositoryInterface.php @@ -0,0 +1,31 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\AsynchronousOperations\Model; + +use Magento\AsynchronousOperations\Api\Data\OperationInterface; + +/** + * Repository interface to create operation + */ +interface OperationRepositoryInterface +{ + /** + * Create operation by topic, parameters and group ID + * + * @param string $topicName + * @param array $entityParams + * format: array( + * '<arg1-name>' => '<arg1-value>', + * '<arg2-name>' => '<arg2-value>', + * ) + * @param string $groupId + * @param int|null $operationId + * @return OperationInterface + */ + public function create($topicName, $entityParams, $groupId, $operationId = null): OperationInterface; +} diff --git a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php index 54e65cc3470dd..40f776ad81099 100644 --- a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php +++ b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php @@ -10,6 +10,7 @@ use Magento\AsynchronousOperations\Api\Data\OperationInterface; use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory; +use Magento\AsynchronousOperations\Model\OperationRepositoryInterface; use Magento\Framework\MessageQueue\MessageValidator; use Magento\Framework\MessageQueue\MessageEncoder; use Magento\Framework\Serialize\Serializer\Json; @@ -18,10 +19,10 @@ /** * Create operation for list of bulk operations. */ -class OperationRepository +class OperationRepository implements OperationRepositoryInterface { /** - * @var \Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory + * @var OperationInterfaceFactory */ private $operationFactory; @@ -67,10 +68,14 @@ public function __construct( } /** - * @param $topicName - * @param $entityParams - * @param $groupId - * @return mixed + * Create operation by topic, parameters and group ID + * + * @param string $topicName + * @param array $entityParams + * @param string $groupId + * @return OperationInterface + * @deprecated No longer used. + * @see create() */ public function createByTopic($topicName, $entityParams, $groupId) { @@ -91,8 +96,16 @@ public function createByTopic($topicName, $entityParams, $groupId) ], ]; - /** @var \Magento\AsynchronousOperations\Api\Data\OperationInterface $operation */ + /** @var OperationInterface $operation */ $operation = $this->operationFactory->create($data); return $this->entityManager->save($operation); } + + /** + * @inheritDoc + */ + public function create($topicName, $entityParams, $groupId, $operationId = null): OperationInterface + { + return $this->createByTopic($topicName, $entityParams, $groupId); + } } diff --git a/app/code/Magento/AsynchronousOperations/etc/di.xml b/app/code/Magento/AsynchronousOperations/etc/di.xml index 171a01cedf289..0d8126358abf4 100644 --- a/app/code/Magento/AsynchronousOperations/etc/di.xml +++ b/app/code/Magento/AsynchronousOperations/etc/di.xml @@ -18,6 +18,7 @@ <preference for="Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface" type="Magento\AsynchronousOperations\Model\BulkStatus\Short" /> <preference for="Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface" type="Magento\AsynchronousOperations\Model\OperationSearchResults" /> <preference for="Magento\AsynchronousOperations\Api\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\OperationRepository" /> + <preference for="Magento\AsynchronousOperations\Model\OperationRepositoryInterface" type="Magento\AsynchronousOperations\Model\ResourceModel\Operation\OperationRepository" /> <type name="Magento\Framework\EntityManager\MetadataPool"> <arguments> <argument name="metadata" xsi:type="array"> diff --git a/app/code/Magento/Webapi/Controller/Rest/InputParamsResolver.php b/app/code/Magento/Webapi/Controller/Rest/InputParamsResolver.php index 07d1b4e07fe9d..723e274d1e5fa 100644 --- a/app/code/Magento/Webapi/Controller/Rest/InputParamsResolver.php +++ b/app/code/Magento/Webapi/Controller/Rest/InputParamsResolver.php @@ -8,7 +8,6 @@ use Magento\Framework\Webapi\ServiceInputProcessor; use Magento\Framework\Webapi\Rest\Request as RestRequest; -use Magento\Webapi\Controller\Rest\Router; use Magento\Webapi\Controller\Rest\Router\Route; /** @@ -81,7 +80,20 @@ public function resolve() $route = $this->getRoute(); $serviceMethodName = $route->getServiceMethod(); $serviceClassName = $route->getServiceClass(); + $inputData = $this->getInputData(); + return $this->serviceInputProcessor->process($serviceClassName, $serviceMethodName, $inputData); + } + /** + * Get API input data + * + * @return array + */ + public function getInputData() + { + $route = $this->getRoute(); + $serviceMethodName = $route->getServiceMethod(); + $serviceClassName = $route->getServiceClass(); /* * Valid only for updates using PUT when passing id value both in URL and body */ @@ -97,9 +109,7 @@ public function resolve() $inputData = $this->request->getRequestData(); } - $inputData = $this->paramsOverrider->override($inputData, $route->getParameters()); - $inputParams = $this->serviceInputProcessor->process($serviceClassName, $serviceMethodName, $inputData); - return $inputParams; + return $this->paramsOverrider->override($inputData, $route->getParameters()); } /** diff --git a/app/code/Magento/WebapiAsync/Controller/Rest/Asynchronous/InputParamsResolver.php b/app/code/Magento/WebapiAsync/Controller/Rest/Asynchronous/InputParamsResolver.php index 93bddd09faef8..064bd99b9b6bf 100644 --- a/app/code/Magento/WebapiAsync/Controller/Rest/Asynchronous/InputParamsResolver.php +++ b/app/code/Magento/WebapiAsync/Controller/Rest/Asynchronous/InputParamsResolver.php @@ -8,12 +8,12 @@ namespace Magento\WebapiAsync\Controller\Rest\Asynchronous; -use Magento\Framework\Webapi\ServiceInputProcessor; use Magento\Framework\Webapi\Rest\Request as RestRequest; -use Magento\Webapi\Controller\Rest\Router; +use Magento\Framework\Webapi\ServiceInputProcessor; +use Magento\Webapi\Controller\Rest\InputParamsResolver as WebapiInputParamsResolver; use Magento\Webapi\Controller\Rest\ParamsOverrider; use Magento\Webapi\Controller\Rest\RequestValidator; -use Magento\Webapi\Controller\Rest\InputParamsResolver as WebapiInputParamsResolver; +use Magento\Webapi\Controller\Rest\Router; /** * This class is responsible for retrieving resolved input data @@ -96,6 +96,22 @@ public function resolve() } $this->requestValidator->validate(); $webapiResolvedParams = []; + foreach ($this->getInputData() as $key => $singleEntityParams) { + $webapiResolvedParams[$key] = $this->resolveBulkItemParams($singleEntityParams); + } + return $webapiResolvedParams; + } + + /** + * Get API input data + * + * @return array + */ + public function getInputData() + { + if ($this->isBulk === false) { + return [$this->inputParamsResolver->getInputData()]; + } $inputData = $this->request->getRequestData(); $httpMethod = $this->request->getHttpMethod(); @@ -103,12 +119,7 @@ public function resolve() $requestBodyParams = $this->request->getBodyParams(); $inputData = array_merge($requestBodyParams, $inputData); } - - foreach ($inputData as $key => $singleEntityParams) { - $webapiResolvedParams[$key] = $this->resolveBulkItemParams($singleEntityParams); - } - - return $webapiResolvedParams; + return $inputData; } /** diff --git a/app/code/Magento/WebapiAsync/Model/OperationRepository.php b/app/code/Magento/WebapiAsync/Model/OperationRepository.php new file mode 100644 index 0000000000000..05dab58b945c0 --- /dev/null +++ b/app/code/Magento/WebapiAsync/Model/OperationRepository.php @@ -0,0 +1,102 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\WebapiAsync\Model; + +use Magento\AsynchronousOperations\Api\Data\OperationInterface; +use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory; +use Magento\AsynchronousOperations\Model\OperationRepositoryInterface; +use Magento\Framework\MessageQueue\MessageValidator; +use Magento\Framework\Serialize\Serializer\Json; +use Magento\Framework\EntityManager\EntityManager; +use Magento\WebapiAsync\Controller\Rest\Asynchronous\InputParamsResolver; + +/** + * Repository class to create operation + */ +class OperationRepository implements OperationRepositoryInterface +{ + /** + * @var OperationInterfaceFactory + */ + private $operationFactory; + + /** + * @var Json + */ + private $jsonSerializer; + + /** + * @var EntityManager + */ + private $entityManager; + + /** + * @var MessageValidator + */ + private $messageValidator; + /** + * @var InputParamsResolver + */ + private $inputParamsResolver; + + /** + * Initialize dependencies. + * + * @param OperationInterfaceFactory $operationFactory + * @param EntityManager $entityManager + * @param MessageValidator $messageValidator + * @param Json $jsonSerializer + * @param InputParamsResolver $inputParamsResolver + */ + public function __construct( + OperationInterfaceFactory $operationFactory, + EntityManager $entityManager, + MessageValidator $messageValidator, + Json $jsonSerializer, + InputParamsResolver $inputParamsResolver + ) { + $this->operationFactory = $operationFactory; + $this->jsonSerializer = $jsonSerializer; + $this->messageValidator = $messageValidator; + $this->entityManager = $entityManager; + $this->inputParamsResolver = $inputParamsResolver; + } + + /** + * @inheritDoc + */ + public function create($topicName, $entityParams, $groupId, $operationId = null): OperationInterface + { + $this->messageValidator->validate($topicName, $entityParams); + $requestData = $this->inputParamsResolver->getInputData(); + if ($operationId === null || !isset($requestData[$operationId])) { + throw new \InvalidArgumentException( + 'Parameter "$operationId" must not be NULL and must exist in input data' + ); + } + $encodedMessage = $this->jsonSerializer->serialize($requestData[$operationId]); + + $serializedData = [ + 'entity_id' => null, + 'entity_link' => '', + 'meta_information' => $encodedMessage, + ]; + $data = [ + 'data' => [ + OperationInterface::BULK_ID => $groupId, + OperationInterface::TOPIC_NAME => $topicName, + OperationInterface::SERIALIZED_DATA => $this->jsonSerializer->serialize($serializedData), + OperationInterface::STATUS => OperationInterface::STATUS_TYPE_OPEN, + ], + ]; + + /** @var OperationInterface $operation */ + $operation = $this->operationFactory->create($data); + return $this->entityManager->save($operation); + } +} diff --git a/app/code/Magento/WebapiAsync/etc/di.xml b/app/code/Magento/WebapiAsync/etc/di.xml index 7411ec0561d24..cfe1a5dbae53f 100644 --- a/app/code/Magento/WebapiAsync/etc/di.xml +++ b/app/code/Magento/WebapiAsync/etc/di.xml @@ -34,10 +34,31 @@ <argument name="isBulk" xsi:type="boolean">true</argument> </arguments> </virtualType> + <virtualType name="Magento\WebapiAsync\Model\Bulk\OperationRepository" type="Magento\WebapiAsync\Model\OperationRepository"> + <arguments> + <argument name="inputParamsResolver" xsi:type="object">Magento\WebapiAsync\Controller\VirtualType\InputParamsResolver</argument> + </arguments> + </virtualType> + <virtualType name="Magento\WebapiAsync\Model\MassSchedule" type="Magento\AsynchronousOperations\Model\MassSchedule"> + <arguments> + <argument name="operationRepository" xsi:type="object">Magento\WebapiAsync\Model\OperationRepository</argument> + </arguments> + </virtualType> + <virtualType name="Magento\WebapiAsync\Model\Bulk\MassSchedule" type="Magento\AsynchronousOperations\Model\MassSchedule"> + <arguments> + <argument name="operationRepository" xsi:type="object">Magento\WebapiAsync\Model\Bulk\OperationRepository</argument> + </arguments> + </virtualType> + <type name="Magento\WebapiAsync\Controller\Rest\AsynchronousRequestProcessor"> + <arguments> + <argument name="asyncBulkPublisher" xsi:type="object">Magento\WebapiAsync\Model\MassSchedule</argument> + </arguments> + </type> <virtualType name="Magento\WebapiAsync\Controller\Rest\VirtualType\AsynchronousBulkRequestProcessor" type="Magento\WebapiAsync\Controller\Rest\AsynchronousRequestProcessor"> <arguments> <argument name="inputParamsResolver" xsi:type="object">Magento\WebapiAsync\Controller\VirtualType\InputParamsResolver</argument> <argument name="processorPath" xsi:type="const">Magento\WebapiAsync\Controller\Rest\AsynchronousRequestProcessor::BULK_PROCESSOR_PATH</argument> + <argument name="asyncBulkPublisher" xsi:type="object">Magento\WebapiAsync\Model\Bulk\MassSchedule</argument> </arguments> </virtualType> <virtualType name="Magento\WebapiAsync\Controller\Rest\VirtualType\AsynchronousBulkSchemaRequestProcessor" type="Magento\WebapiAsync\Controller\Rest\AsynchronousSchemaRequestProcessor"> diff --git a/dev/tests/api-functional/testsuite/Magento/WebapiAsync/Model/OrderRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/WebapiAsync/Model/OrderRepositoryInterfaceTest.php new file mode 100644 index 0000000000000..bc7940ca35f35 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/WebapiAsync/Model/OrderRepositoryInterfaceTest.php @@ -0,0 +1,174 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\WebapiAsync\Model; + +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Webapi\Rest\Request; +use Magento\Sales\Api\Data\OrderInterface; +use Magento\Sales\Model\Order; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\MessageQueue\EnvironmentPreconditionException; +use Magento\TestFramework\MessageQueue\PreconditionFailedException; +use Magento\TestFramework\MessageQueue\PublisherConsumerController; +use Magento\TestFramework\TestCase\WebapiAbstract; + +/** + * Test order repository interface via async webapi + */ +class OrderRepositoryInterfaceTest extends WebapiAbstract +{ + private const ASYNC_BULK_SAVE_ORDER = '/async/bulk/V1/orders'; + private const ASYNC_SAVE_ORDER = '/async/V1/orders'; + /** + * @var ObjectManagerInterface + */ + private $objectManager; + /** + * @var PublisherConsumerController + */ + private $publisherConsumerController; + + /** + * @inheritDoc + */ + protected function setUp() + { + parent::setUp(); + $this->objectManager = Bootstrap::getObjectManager(); + + $params = array_merge_recursive( + Bootstrap::getInstance()->getAppInitParams(), + ['MAGE_DIRS' => ['cache' => ['path' => TESTS_TEMP_DIR . '/cache']]] + ); + + /** @var PublisherConsumerController publisherConsumerController */ + $this->publisherConsumerController = $this->objectManager->create( + PublisherConsumerController::class, + [ + 'consumers' => ['async.operations.all'], + 'logFilePath' => TESTS_TEMP_DIR . "/MessageQueueTestLog.txt", + 'appInitParams' => $params, + ] + ); + + try { + $this->publisherConsumerController->initialize(); + } catch (EnvironmentPreconditionException $e) { + $this->markTestSkipped($e->getMessage()); + } catch (PreconditionFailedException $e) { + $this->fail( + $e->getMessage() + ); + } + } + + /** + * @inheritDoc + */ + public function tearDown() + { + $this->publisherConsumerController->stopConsumers(); + parent::tearDown(); + } + + /** + * Check that order is updated successfuly via async webapi + * + * @magentoApiDataFixture Magento/Sales/_files/order.php + * @dataProvider saveDataProvider + * @param array $data + * @param bool $isBulk + * @return void + */ + public function testSave(array $data, bool $isBulk = true): void + { + $this->_markTestAsRestOnly(); + /** @var Order $beforeUpdateOrder */ + $beforeUpdateOrder = $this->objectManager->get(Order::class)->loadByIncrementId('100000001'); + $requestData = [ + 'entity' => array_merge($data, [OrderInterface::ENTITY_ID => $beforeUpdateOrder->getEntityId()]) + ]; + if ($isBulk) { + $requestData = [$requestData]; + } + $serviceInfo = [ + 'rest' => [ + 'resourcePath' => $isBulk ? self::ASYNC_BULK_SAVE_ORDER : self::ASYNC_SAVE_ORDER, + 'httpMethod' => Request::HTTP_METHOD_POST, + ] + ]; + $this->makeAsyncRequest($serviceInfo, $requestData); + try { + $this->publisherConsumerController->waitForAsynchronousResult( + function (Order $beforeUpdateOrder, array $data) { + /** @var Order $afterUpdateOrder */ + $afterUpdateOrder = $this->objectManager->get(Order::class)->load($beforeUpdateOrder->getId()); + foreach ($data as $attribute => $value) { + $getter = 'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $attribute))); + if ($value !== $afterUpdateOrder->$getter()) { + return false; + } + } + //check that base_grand_total and grand_total are not overwritten + $this->assertEquals( + $beforeUpdateOrder->getBaseGrandTotal(), + $afterUpdateOrder->getBaseGrandTotal() + ); + $this->assertEquals( + $beforeUpdateOrder->getGrandTotal(), + $afterUpdateOrder->getGrandTotal() + ); + return true; + }, + [$beforeUpdateOrder, $data] + ); + } catch (PreconditionFailedException $e) { + $this->fail("Order update via async webapi failed"); + } + } + + /** + * Data provider for tesSave() + * + * @return array + */ + public function saveDataProvider(): array + { + return [ + 'update order in bulk mode' => [ + [ + OrderInterface::CUSTOMER_EMAIL => 'customer.email.modified@magento.test' + ], + true + ], + 'update order in single mode' => [ + [ + OrderInterface::CUSTOMER_EMAIL => 'customer.email.modified@magento.test' + ], + false + ] + ]; + } + + /** + * Make async webapi request + * + * @param array $serviceInfo + * @param array $requestData + * @return void + */ + private function makeAsyncRequest(array $serviceInfo, array $requestData): void + { + $response = $this->_webApiCall($serviceInfo, $requestData); + $this->assertNotEmpty($response['request_items']); + foreach ($response['request_items'] as $requestItem) { + $this->assertEquals('accepted', $requestItem['status']); + } + $this->assertFalse($response['errors']); + } +} From cf9dbc39da2ea762ad1ea509690390defaddd109 Mon Sep 17 00:00:00 2001 From: Nikita Shcherbatykh <nikita.shcherbatykh@transoftgroup.com> Date: Tue, 10 Mar 2020 14:30:37 +0200 Subject: [PATCH 108/153] MC-32225: MFTF test for Recently Viewed products issues does not work on store level --- ...oreFrontRecentlyViewedAtStoreLevelTest.xml | 166 ++++++++++++++++++ ...rontRecentlyViewedAtStoreViewLevelTest.xml | 2 +- 2 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml new file mode 100644 index 0000000000000..8243f21cb6510 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StoreFrontRecentlyViewedAtStoreLevelTest"> + <annotations> + <stories value="Recently Viewed Product"/> + <title value="Recently Viewed Product at store level"/> + <description value="Recently Viewed Product should not be displayed on second store , if configured as, Per Store "/> + <testCaseId value="MC-32018"/> + <severity value="CRITICAL"/> + <group value="catalog"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <!--Create Simple Product and Category --> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="SimpleProduct" stepKey="createSimpleProduct2"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="SimpleProduct" stepKey="createSimpleProduct3"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="SimpleProduct" stepKey="createSimpleProduct4"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <!-- Create store1 for default website --> + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createFirstStore"> + <argument name="website" value="{{_defaultWebsite.name}}"/> + <argument name="storeGroupName" value="{{customStore.name}}"/> + <argument name="storeGroupCode" value="{{customStore.code}}"/> + </actionGroup> + <!-- Create Storeview1 for Store1--> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView"> + <argument name="StoreGroup" value="customStore"/> + <argument name="customStore" value="storeViewData"/> + </actionGroup> + <!--Create storeView 2--> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewTwo"> + <argument name="StoreGroup" value="customStore"/> + <argument name="customStore" value="customStoreEN"/> + </actionGroup> + <!-- Set Stores > Configurations > Catalog > Recently Viewed/Compared Products > Show for Current = store --> + <magentoCLI command="config:set {{RecentlyViewedProductScopeStoreGroup.path}} {{RecentlyViewedProductScopeStoreGroup.value}}" stepKey="RecentlyViewedProductScopeStoreGroup"/> + </before> + <after> + <!-- Delete Product and Category --> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> + <deleteData createDataKey="createSimpleProduct3" stepKey="deleteSimpleProduct3"/> + <deleteData createDataKey="createSimpleProduct4" stepKey="deleteSimpleProduct4"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <!-- Delete store1 for default website --> + <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteFirstStore"> + <argument name="storeGroupName" value="customStore.name"/> + </actionGroup> + + <!--Reset Stores > Configurations > Catalog > Recently Viewed/Compared Products > Show for Current = Website--> + <magentoCLI command="config:set {{RecentlyViewedProductScopeWebsite.path}} {{RecentlyViewedProductScopeWebsite.value}}" stepKey="RecentlyViewedProductScopeWebsite"/> + + <!-- Clear Widget--> + <actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="clearRecentlyViewedWidgetsFromCMSContent"> + <argument name="content" value="{{CmsHomePageContent.content}}"/> + <argument name="pageId" value="{{CmsHomePageContent.page_id}}"/> + </actionGroup> + <!-- Logout Admin --> + <actionGroup ref="logout" stepKey="logout"/> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCacheAfterDeletion"/> + </after> + <!--Create widget for recently viewed products--> + <actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="clearRecentlyViewedWidgetsFromCMSContentBefore"> + <argument name="content" value="{{CmsHomePageContent.content}}"/> + <argument name="pageId" value="{{CmsHomePageContent.page_id}}"/> + </actionGroup> + + <amOnPage url="{{AdminCmsPageEditPage.url(CmsHomePageContent.page_id)}}" stepKey="navigateToEditCmsHomePage"/> + <waitForPageLoad time="50" stepKey="waitForCmsContentPageToLoad"/> + + <actionGroup ref="AdminInsertRecentlyViewedWidgetActionGroup" stepKey="insertRecentlyViewedWidget"> + <argument name="attributeSelector1" value="show_attributes"/> + <argument name="attributeSelector2" value="show_buttons"/> + <argument name="productAttributeSection1" value="1"/> + <argument name="productAttributeSection2" value="4"/> + <argument name="buttonToShowSection1" value="1"/> + <argument name="buttonToShowSection2" value="3"/> + </actionGroup> + <!-- Warm up cache --> + <magentoCLI command="cache:flush" stepKey="flushCacheAfterWidgetCreated"/> + <!-- Navigate to product 3 on store front --> + <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStoreOneProductPageTwo"/> + <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct3.name$)}}" stepKey="goToStoreOneProductPageThree"/> + <!-- Go to Home Page --> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStoreFrontHomePage"/> + <waitForPageLoad time="30" stepKey="waitForHomeContentPageToLoad"/> + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertStoreOneRecentlyViewedProduct2"> + <argument name="productName" value="$$createSimpleProduct2.name$$"/> + <argument name="productPosition" value="2"/> + </actionGroup> + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertStoreOneRecentlyViewedProduct3"> + <argument name="productName" value="$$createSimpleProduct3.name$$"/> + <argument name="productPosition" value="1"/> + </actionGroup> + <!-- Switch to second store and add second product (visible on second store) to wishlist --> + <click selector="{{StorefrontFooterSection.switchStoreButton}}" stepKey="clickSwitchStoreButtonOnDefaultStore"/> + <click selector="{{StorefrontFooterSection.storeLink(customStore.name)}}" stepKey="selectCustomStore"/> + <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct1.name$)}}" stepKey="goToStore2ProductPage1"/> + <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStore2ProductPage2"/> + <!-- Go to Home Page --> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage2"/> + <waitForPageLoad time="30" stepKey="waitForStoreHomeContentPageToLoad"/> + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertNextStore1RecentlyViewedProduct1"> + <argument name="productName" value="$$createSimpleProduct1.name$$"/> + <argument name="productPosition" value="2"/> + </actionGroup> + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertNextStore1RecentlyViewedProduct2"> + <argument name="productName" value="$$createSimpleProduct2.name$$"/> + <argument name="productPosition" value="1"/> + </actionGroup> + + <grabTextFrom selector="{{StoreFrontRecentlyViewedProductSection.ProductName('2')}}" stepKey="grabDontSeeHomeProduct3"/> + <assertNotContains expected="$$createSimpleProduct3.name$$" actual="$grabDontSeeHomeProduct3" stepKey="assertNotSeeProduct3"/> + + <!-- Switch Storeview--> + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStoreViewActionGroup"> + <argument name="storeView" value="customStoreEN"/> + </actionGroup> + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertNextStoreView2RecentlyViewedProduct1"> + <argument name="productName" value="$$createSimpleProduct1.name$$"/> + <argument name="productPosition" value="2"/> + </actionGroup> + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertNextStoreView2RecentlyViewedProduct2"> + <argument name="productName" value="$$createSimpleProduct2.name$$"/> + <argument name="productPosition" value="1"/> + </actionGroup> + + <grabTextFrom selector="{{StoreFrontRecentlyViewedProductSection.ProductName('2')}}" stepKey="grabStoreView2DontSeeHomeProduct3"/> + <assertNotContains expected="$$createSimpleProduct3.name$$" actual="$grabDontSeeHomeProduct3" stepKey="assertStoreView2NotSeeProduct3"/> + + <!-- Switch to default store--> + + <click selector="{{StorefrontFooterSection.switchStoreButton}}" stepKey="clickSwitchStoreButtonOnHomeDefaultStore"/> + <click selector="{{StorefrontFooterSection.storeLink('Main Website Store')}}" stepKey="selectDefaultStoreToSwitchOn"/> + + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertSwitchStore1RecentlyViewedProduct2"> + <argument name="productName" value="$$createSimpleProduct2.name$$"/> + <argument name="productPosition" value="2"/> + </actionGroup> + + <actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertSwitchStore1RecentlyViewedProduct3"> + <argument name="productName" value="$$createSimpleProduct3.name$$"/> + <argument name="productPosition" value="1"/> + </actionGroup> + <grabTextFrom selector="{{StoreFrontRecentlyViewedProductSection.ProductName('2')}}" stepKey="grabDontSeeHomeProduct1"/> + <assertNotContains expected="$$createSimpleProduct1.name$$" actual="$grabDontSeeHomeProduct1" stepKey="assertNotSeeProduct1"/> + + </test> +</tests> \ No newline at end of file diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml index afcf42fb0431a..f8ee9e562a6a9 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml @@ -12,7 +12,7 @@ <stories value="Recently Viewed Product"/> <title value="Recently Viewed Product at store view level"/> <description value="Recently Viewed Product should not be displayed on second store view, if configured as, Per Store View "/> - <testCaseId value="MC-30453"/> + <testCaseId value="MC-31877"/> <severity value="CRITICAL"/> <group value="catalog"/> </annotations> From 06d33fe294c4310f2a649ca70d4be6439a5a4030 Mon Sep 17 00:00:00 2001 From: Piotr Markiewicz <piotr.markiewicz@vaimo.com> Date: Tue, 10 Mar 2020 15:08:28 +0100 Subject: [PATCH 109/153] Added unit tests + prevent Path Traversal in Delete controller --- .../Adminhtml/Export/File/Delete.php | 2 +- .../Adminhtml/Export/File/DeleteTest.php | 181 +++++++++++++++++ .../Adminhtml/Export/File/DownloadTest.php | 188 ++++++++++++++++++ 3 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php create mode 100644 app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php index 316607bb247fb..1b7fdc2881073 100644 --- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php +++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php @@ -62,7 +62,7 @@ public function execute() $resultRedirect = $this->resultRedirectFactory->create(); $resultRedirect->setPath('adminhtml/export/index'); $fileName = $this->getRequest()->getParam('filename'); - if (empty($fileName)) { + if (empty($fileName) || preg_match('/\.\.(\\\|\/)/', $fileName) !== 0) { $this->messageManager->addErrorMessage(__('Please provide valid export file name')); return $resultRedirect; diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php new file mode 100644 index 0000000000000..eceaab3d1d1f3 --- /dev/null +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php @@ -0,0 +1,181 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\ImportExport\Controller\Adminhtml\Export\File; + +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; + +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class DeleteTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var \Magento\Backend\App\Action\Context|\PHPUnit_Framework_MockObject_MockObject + */ + protected $context; + + /** + * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + */ + protected $objectManagerHelper; + + /** + * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject + */ + protected $request; + + /** + * @var \Magento\Framework\Controller\Result\Raw|\PHPUnit_Framework_MockObject_MockObject + */ + protected $redirect; + + /** + * @var \Magento\Framework\Controller\Result\RedirectFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $resultRedirectFactory; + + /** + * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject + */ + protected $fileSystem; + + /** + * @var \Magento\Framework\Filesystem\DriverInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $file; + + /** + * @var \Magento\ImportExport\Controller\Adminhtml\Export\File\Delete|\PHPUnit_Framework_MockObject_MockObject + */ + protected $deleteController; + + /** + * @var \Magento\Framework\Message\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $messageManager; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $directory; + + /** + * Set up + */ + protected function setUp() + { + $this->request = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->fileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->directory = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\ReadInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->file = $this->getMockBuilder(\Magento\Framework\Filesystem\DriverInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->context = $this->createPartialMock( + \Magento\Backend\App\Action\Context::class, + ['getRequest', 'getResultRedirectFactory', 'getMessageManager'] + ); + + $this->redirect = $this->createPartialMock(\Magento\Backend\Model\View\Result\Redirect::class, ['setPath']); + + $this->resultRedirectFactory = $this->createPartialMock( + \Magento\Framework\Controller\Result\RedirectFactory::class, + ['create'] + ); + $this->resultRedirectFactory->expects($this->any())->method('create')->willReturn($this->redirect); + $this->context->expects($this->any())->method('getRequest')->willReturn($this->request); + $this->context->expects($this->any()) + ->method('getResultRedirectFactory') + ->willReturn($this->resultRedirectFactory); + + $this->context->expects($this->any()) + ->method('getMessageManager') + ->willReturn($this->messageManager); + + + $this->objectManagerHelper = new ObjectManagerHelper($this); + $this->deleteController = $this->objectManagerHelper->getObject( + Delete::class, + [ + 'context' => $this->context, + 'filesystem' => $this->fileSystem, + 'file' => $this->file + ] + ); + } + + /** + * Tests download controller with different file names in request. + */ + public function testExecuteSuccess() + { + $this->request->method('getParam') + ->with('filename') + ->willReturn('sampleFile'); + + $this->fileSystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory)); + $this->directory->expects($this->once())->method('isFile')->willReturn(true); + $this->file->expects($this->once())->method('deleteFile')->willReturn(true); + $this->messageManager->expects($this->once())->method('addSuccessMessage'); + + $this->deleteController->execute(); + } + + /** + * Tests download controller with different file names in request. + + */ + public function testExecuteFileDoesntExists() + { + $this->request->method('getParam') + ->with('filename') + ->willReturn('sampleFile'); + + $this->fileSystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory)); + $this->directory->expects($this->once())->method('isFile')->willReturn(false); + $this->messageManager->expects($this->once())->method('addErrorMessage'); + + $this->deleteController->execute(); + } + + /** + * Test execute() with invalid file name + * @param string $requestFilename + * @dataProvider executeDataProvider + */ + public function testExecuteInvalidFileName($requestFilename) + { + $this->request->method('getParam')->with('filename')->willReturn($requestFilename); + $this->messageManager->expects($this->once())->method('addErrorMessage'); + + $this->deleteController->execute(); + } + + /** + * @return array + */ + public function executeDataProvider() + { + return [ + 'Relative file name' => ['../.htaccess'], + 'Empty file name' => [''], + 'Null file name' => [null], + ]; + } +} diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php new file mode 100644 index 0000000000000..e2b5395ac2231 --- /dev/null +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php @@ -0,0 +1,188 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\ImportExport\Controller\Adminhtml\Export\File; + +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; + +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class DownloadTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var \Magento\Backend\App\Action\Context|\PHPUnit_Framework_MockObject_MockObject + */ + protected $context; + + /** + * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + */ + protected $objectManagerHelper; + + /** + * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject + */ + protected $request; + + /** + * @var \Magento\Framework\Controller\Result\Raw|\PHPUnit_Framework_MockObject_MockObject + */ + protected $redirect; + + /** + * @var \Magento\Framework\Controller\Result\RedirectFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $resultRedirectFactory; + + /** + * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject + */ + protected $fileSystem; + + /** + * @var \Magento\Framework\App\Response\Http\FileFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $fileFactory; + + /** + * @var \Magento\ImportExport\Controller\Adminhtml\Export\File\Download|\PHPUnit_Framework_MockObject_MockObject + */ + protected $downloadController; + + /** + * @var \Magento\Framework\Message\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $messageManager; + + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $directory; + + /** + * Set up + */ + protected function setUp() + { + $this->request = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->fileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->directory = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\ReadInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->fileFactory = $this->getMockBuilder(\Magento\Framework\App\Response\Http\FileFactory::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->context = $this->createPartialMock( + \Magento\Backend\App\Action\Context::class, + ['getRequest', 'getResultRedirectFactory', 'getMessageManager'] + ); + + $this->redirect = $this->createPartialMock( + \Magento\Backend\Model\View\Result\Redirect::class, + ['setPath'] + ); + + $this->resultRedirectFactory = $this->createPartialMock( + \Magento\Framework\Controller\Result\RedirectFactory::class, + ['create'] + ); + $this->resultRedirectFactory->expects($this->any()) + ->method('create') + ->willReturn($this->redirect); + + $this->context->expects($this->any()) + ->method('getRequest') + ->willReturn($this->request); + + $this->context->expects($this->any()) + ->method('getResultRedirectFactory') + ->willReturn($this->resultRedirectFactory); + + $this->context->expects($this->any()) + ->method('getMessageManager') + ->willReturn($this->messageManager); + + $this->objectManagerHelper = new ObjectManagerHelper($this); + $this->downloadController = $this->objectManagerHelper->getObject( + Download::class, + [ + 'context' => $this->context, + 'filesystem' => $this->fileSystem, + 'fileFactory' => $this->fileFactory + ] + ); + } + + /** + * Tests download controller with successful file downloads + */ + public function testExecuteSuccess() + { + $this->request->method('getParam') + ->with('filename') + ->willReturn('sampleFile.csv'); + + $this->fileSystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory)); + $this->directory->expects($this->once())->method('isFile')->willReturn(true); + $this->fileFactory->expects($this->once())->method('create'); + + $this->downloadController->execute(); + } + + /** + * Tests download controller with file that doesn't exist + + */ + public function testExecuteFileDoesntExists() + { + $this->request->method('getParam') + ->with('filename') + ->willReturn('sampleFile'); + + $this->fileSystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory)); + $this->directory->expects($this->once())->method('isFile')->willReturn(false); + $this->messageManager->expects($this->once())->method('addErrorMessage'); + + $this->downloadController->execute(); + } + + /** + * Test execute() with invalid file name + * @param string $requestFilename + * @dataProvider executeDataProvider + */ + public function testExecuteInvalidFileName($requestFilename) + { + $this->request->method('getParam')->with('filename')->willReturn($requestFilename); + $this->messageManager->expects($this->once())->method('addErrorMessage'); + + $this->downloadController->execute(); + } + + /** + * @return array + */ + public function executeDataProvider() + { + return [ + 'Relative file name' => ['../.htaccess'], + 'Empty file name' => [''], + 'Null file name' => [null], + ]; + } +} From 4229fa21fb02fd3df2ae5eae93bb14774ae2f042 Mon Sep 17 00:00:00 2001 From: Piotr Markiewicz <piotr.markiewicz@vaimo.com> Date: Tue, 10 Mar 2020 16:18:06 +0100 Subject: [PATCH 110/153] Unit Tests code review changes --- .../Adminhtml/Export/File/DeleteTest.php | 129 +++++++++-------- .../Adminhtml/Export/File/DownloadTest.php | 135 ++++++++++-------- 2 files changed, 145 insertions(+), 119 deletions(-) diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php index eceaab3d1d1f3..c6c472c977c07 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php @@ -3,119 +3,132 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\ImportExport\Controller\Adminhtml\Export\File; +use Magento\Backend\App\Action\Context; +use Magento\Backend\Model\View\Result\Redirect; +use Magento\Framework\App\Request\Http; +use Magento\Framework\Controller\Result\Raw; +use Magento\Framework\Controller\Result\RedirectFactory; +use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Directory\ReadInterface; +use Magento\Framework\Filesystem\DriverInterface; +use Magento\Framework\Message\ManagerInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class DeleteTest extends \PHPUnit\Framework\TestCase +class DeleteTest extends TestCase { /** - * @var \Magento\Backend\App\Action\Context|\PHPUnit_Framework_MockObject_MockObject + * @var Context|MockObject */ - protected $context; + private $contextMock; /** - * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + * @var ObjectManagerHelper */ - protected $objectManagerHelper; + private $objectManagerHelper; /** - * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject + * @var Http|MockObject */ - protected $request; + private $requestMock; /** - * @var \Magento\Framework\Controller\Result\Raw|\PHPUnit_Framework_MockObject_MockObject + * @var Raw|MockObject */ - protected $redirect; + private $redirectMock; /** - * @var \Magento\Framework\Controller\Result\RedirectFactory|\PHPUnit_Framework_MockObject_MockObject + * @var RedirectFactory|MockObject */ - protected $resultRedirectFactory; + private $resultRedirectFactoryMock; /** - * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject + * @var Filesystem|MockObject */ - protected $fileSystem; + private $fileSystemMock; /** - * @var \Magento\Framework\Filesystem\DriverInterface|\PHPUnit_Framework_MockObject_MockObject + * @var DriverInterface|MockObject */ - protected $file; + private $fileMock; /** - * @var \Magento\ImportExport\Controller\Adminhtml\Export\File\Delete|\PHPUnit_Framework_MockObject_MockObject + * @var Delete|MockObject */ - protected $deleteController; + private $deleteControllerMock; /** - * @var \Magento\Framework\Message\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ManagerInterface|MockObject */ - protected $messageManager; + private $messageManagerMock; /** - * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ReadInterface|MockObject */ - protected $directory; + private $directoryMock; /** * Set up */ protected function setUp() { - $this->request = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class) + $this->requestMock = $this->getMockBuilder(Http::class) ->disableOriginalConstructor() ->getMock(); - $this->fileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem::class) + $this->fileSystemMock = $this->getMockBuilder(Filesystem::class) ->disableOriginalConstructor() ->getMock(); - $this->directory = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\ReadInterface::class) + $this->directoryMock = $this->getMockBuilder(ReadInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->file = $this->getMockBuilder(\Magento\Framework\Filesystem\DriverInterface::class) + $this->fileMock = $this->getMockBuilder(DriverInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class) + $this->messageManagerMock = $this->getMockBuilder(ManagerInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->context = $this->createPartialMock( - \Magento\Backend\App\Action\Context::class, + $this->contextMock = $this->createPartialMock( + Context::class, ['getRequest', 'getResultRedirectFactory', 'getMessageManager'] ); - $this->redirect = $this->createPartialMock(\Magento\Backend\Model\View\Result\Redirect::class, ['setPath']); + $this->redirectMock = $this->createPartialMock(Redirect::class, ['setPath']); - $this->resultRedirectFactory = $this->createPartialMock( - \Magento\Framework\Controller\Result\RedirectFactory::class, + $this->resultRedirectFactoryMock = $this->createPartialMock( + RedirectFactory::class, ['create'] ); - $this->resultRedirectFactory->expects($this->any())->method('create')->willReturn($this->redirect); - $this->context->expects($this->any())->method('getRequest')->willReturn($this->request); - $this->context->expects($this->any()) + $this->resultRedirectFactoryMock->expects($this->any())->method('create')->willReturn($this->redirectMock); + $this->contextMock->expects($this->any())->method('getRequest')->willReturn($this->requestMock); + $this->contextMock->expects($this->any()) ->method('getResultRedirectFactory') - ->willReturn($this->resultRedirectFactory); + ->willReturn($this->resultRedirectFactoryMock); - $this->context->expects($this->any()) + $this->contextMock->expects($this->any()) ->method('getMessageManager') - ->willReturn($this->messageManager); + ->willReturn($this->messageManagerMock); $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->deleteController = $this->objectManagerHelper->getObject( + $this->deleteControllerMock = $this->objectManagerHelper->getObject( Delete::class, [ - 'context' => $this->context, - 'filesystem' => $this->fileSystem, - 'file' => $this->file + 'context' => $this->contextMock, + 'filesystem' => $this->fileSystemMock, + 'file' => $this->fileMock ] ); } @@ -125,52 +138,52 @@ protected function setUp() */ public function testExecuteSuccess() { - $this->request->method('getParam') + $this->requestMock->method('getParam') ->with('filename') ->willReturn('sampleFile'); - $this->fileSystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory)); - $this->directory->expects($this->once())->method('isFile')->willReturn(true); - $this->file->expects($this->once())->method('deleteFile')->willReturn(true); - $this->messageManager->expects($this->once())->method('addSuccessMessage'); + $this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock)); + $this->directoryMock->expects($this->once())->method('isFile')->willReturn(true); + $this->fileMock->expects($this->once())->method('deleteFile')->willReturn(true); + $this->messageManagerMock->expects($this->once())->method('addSuccessMessage'); - $this->deleteController->execute(); + $this->deleteControllerMock->execute(); } /** * Tests download controller with different file names in request. - */ public function testExecuteFileDoesntExists() { - $this->request->method('getParam') + $this->requestMock->method('getParam') ->with('filename') ->willReturn('sampleFile'); - $this->fileSystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory)); - $this->directory->expects($this->once())->method('isFile')->willReturn(false); - $this->messageManager->expects($this->once())->method('addErrorMessage'); + $this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock)); + $this->directoryMock->expects($this->once())->method('isFile')->willReturn(false); + $this->messageManagerMock->expects($this->once())->method('addErrorMessage'); - $this->deleteController->execute(); + $this->deleteControllerMock->execute(); } /** * Test execute() with invalid file name * @param string $requestFilename - * @dataProvider executeDataProvider + * @dataProvider invalidFileDataProvider */ public function testExecuteInvalidFileName($requestFilename) { - $this->request->method('getParam')->with('filename')->willReturn($requestFilename); - $this->messageManager->expects($this->once())->method('addErrorMessage'); + $this->requestMock->method('getParam')->with('filename')->willReturn($requestFilename); + $this->messageManagerMock->expects($this->once())->method('addErrorMessage'); - $this->deleteController->execute(); + $this->deleteControllerMock->execute(); } /** + * Data provider to test possible invalid filenames * @return array */ - public function executeDataProvider() + public function invalidFileDataProvider() { return [ 'Relative file name' => ['../.htaccess'], diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php index e2b5395ac2231..71f6940ad7a86 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php @@ -3,127 +3,140 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\ImportExport\Controller\Adminhtml\Export\File; +use Magento\Backend\App\Action\Context; +use Magento\Backend\Model\View\Result\Redirect; +use Magento\Framework\App\Request\Http; +use Magento\Framework\App\Response\Http\FileFactory; +use Magento\Framework\Controller\Result\Raw; +use Magento\Framework\Controller\Result\RedirectFactory; +use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Directory\ReadInterface; +use Magento\Framework\Message\ManagerInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class DownloadTest extends \PHPUnit\Framework\TestCase +class DownloadTest extends TestCase { /** - * @var \Magento\Backend\App\Action\Context|\PHPUnit_Framework_MockObject_MockObject + * @var Context|MockObject */ - protected $context; + private $contextMock; /** - * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + * @var ObjectManagerHelper */ - protected $objectManagerHelper; + private $objectManagerHelper; /** - * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject + * @var Http|MockObject */ - protected $request; + private $requestMock; /** - * @var \Magento\Framework\Controller\Result\Raw|\PHPUnit_Framework_MockObject_MockObject + * @var Raw|MockObject */ - protected $redirect; + private $redirectMock; /** - * @var \Magento\Framework\Controller\Result\RedirectFactory|\PHPUnit_Framework_MockObject_MockObject + * @var RedirectFactory|MockObject */ - protected $resultRedirectFactory; + private $resultRedirectFactoryMock; /** - * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject + * @var Filesystem|MockObject */ - protected $fileSystem; + private $fileSystemMock; /** - * @var \Magento\Framework\App\Response\Http\FileFactory|\PHPUnit_Framework_MockObject_MockObject + * @var FileFactory|MockObject */ - protected $fileFactory; + private $fileFactoryMock; /** - * @var \Magento\ImportExport\Controller\Adminhtml\Export\File\Download|\PHPUnit_Framework_MockObject_MockObject + * @var Download|MockObject */ - protected $downloadController; + private $downloadControllerMock; /** - * @var \Magento\Framework\Message\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ManagerInterface|MockObject */ - protected $messageManager; + private $messageManagerMock; /** - * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ReadInterface|MockObject */ - protected $directory; + private $directoryMock; /** * Set up */ protected function setUp() { - $this->request = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class) + $this->requestMock = $this->getMockBuilder(Http::class) ->disableOriginalConstructor() ->getMock(); - $this->fileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem::class) + $this->fileSystemMock = $this->getMockBuilder(Filesystem::class) ->disableOriginalConstructor() ->getMock(); - $this->directory = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\ReadInterface::class) + $this->directoryMock = $this->getMockBuilder(ReadInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->fileFactory = $this->getMockBuilder(\Magento\Framework\App\Response\Http\FileFactory::class) + $this->fileFactoryMock = $this->getMockBuilder(FileFactory::class) ->disableOriginalConstructor() ->getMock(); - $this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class) + $this->messageManagerMock = $this->getMockBuilder(ManagerInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->context = $this->createPartialMock( - \Magento\Backend\App\Action\Context::class, + $this->contextMock = $this->createPartialMock( + Context::class, ['getRequest', 'getResultRedirectFactory', 'getMessageManager'] ); - $this->redirect = $this->createPartialMock( - \Magento\Backend\Model\View\Result\Redirect::class, + $this->redirectMock = $this->createPartialMock( + Redirect::class, ['setPath'] ); - $this->resultRedirectFactory = $this->createPartialMock( - \Magento\Framework\Controller\Result\RedirectFactory::class, + $this->resultRedirectFactoryMock = $this->createPartialMock( + RedirectFactory::class, ['create'] ); - $this->resultRedirectFactory->expects($this->any()) + $this->resultRedirectFactoryMock->expects($this->any()) ->method('create') - ->willReturn($this->redirect); + ->willReturn($this->redirectMock); - $this->context->expects($this->any()) + $this->contextMock->expects($this->any()) ->method('getRequest') - ->willReturn($this->request); + ->willReturn($this->requestMock); - $this->context->expects($this->any()) + $this->contextMock->expects($this->any()) ->method('getResultRedirectFactory') - ->willReturn($this->resultRedirectFactory); + ->willReturn($this->resultRedirectFactoryMock); - $this->context->expects($this->any()) + $this->contextMock->expects($this->any()) ->method('getMessageManager') - ->willReturn($this->messageManager); + ->willReturn($this->messageManagerMock); $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->downloadController = $this->objectManagerHelper->getObject( + $this->downloadControllerMock = $this->objectManagerHelper->getObject( Download::class, [ - 'context' => $this->context, - 'filesystem' => $this->fileSystem, - 'fileFactory' => $this->fileFactory + 'context' => $this->contextMock, + 'filesystem' => $this->fileSystemMock, + 'fileFactory' => $this->fileFactoryMock ] ); } @@ -133,51 +146,51 @@ protected function setUp() */ public function testExecuteSuccess() { - $this->request->method('getParam') + $this->requestMock->method('getParam') ->with('filename') ->willReturn('sampleFile.csv'); - $this->fileSystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory)); - $this->directory->expects($this->once())->method('isFile')->willReturn(true); - $this->fileFactory->expects($this->once())->method('create'); + $this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock)); + $this->directoryMock->expects($this->once())->method('isFile')->willReturn(true); + $this->fileFactoryMock->expects($this->once())->method('create'); - $this->downloadController->execute(); + $this->downloadControllerMock->execute(); } /** * Tests download controller with file that doesn't exist - */ public function testExecuteFileDoesntExists() { - $this->request->method('getParam') + $this->requestMock->method('getParam') ->with('filename') ->willReturn('sampleFile'); - $this->fileSystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory)); - $this->directory->expects($this->once())->method('isFile')->willReturn(false); - $this->messageManager->expects($this->once())->method('addErrorMessage'); + $this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock)); + $this->directoryMock->expects($this->once())->method('isFile')->willReturn(false); + $this->messageManagerMock->expects($this->once())->method('addErrorMessage'); - $this->downloadController->execute(); + $this->downloadControllerMock->execute(); } /** * Test execute() with invalid file name - * @param string $requestFilename - * @dataProvider executeDataProvider + * @param ?string $requestFilename + * @dataProvider invalidFileDataProvider */ public function testExecuteInvalidFileName($requestFilename) { - $this->request->method('getParam')->with('filename')->willReturn($requestFilename); - $this->messageManager->expects($this->once())->method('addErrorMessage'); + $this->requestMock->method('getParam')->with('filename')->willReturn($requestFilename); + $this->messageManagerMock->expects($this->once())->method('addErrorMessage'); - $this->downloadController->execute(); + $this->downloadControllerMock->execute(); } /** + * Data provider to test possible invalid filenames * @return array */ - public function executeDataProvider() + public function invalidFileDataProvider() { return [ 'Relative file name' => ['../.htaccess'], From 66fb07c196e94729b6592ba9fb4c4ee14d55c6ff Mon Sep 17 00:00:00 2001 From: Daniel Renaud <drenaud@magento.com> Date: Tue, 10 Mar 2020 12:21:50 -0500 Subject: [PATCH 111/153] MC-29423: GraphQL Send Friend is still sending emails when disabled --- .../Model/Resolver/SendEmailToFriend.php | 8 +- .../Resolver/SendFriendConfiguration.php | 46 ++++++++ .../SendFriendGraphQl/etc/schema.graphqls | 9 ++ .../GraphQl/SendFriend/SendFriendTest.php | 41 ++++--- .../GraphQl/SendFriend/StoreConfigTest.php | 106 ++++++++++++++++++ 5 files changed, 193 insertions(+), 17 deletions(-) create mode 100644 app/code/Magento/SendFriendGraphQl/Model/Resolver/SendFriendConfiguration.php create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php diff --git a/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendEmailToFriend.php b/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendEmailToFriend.php index 0a4fe1e3e5616..ebc1981ca965c 100644 --- a/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendEmailToFriend.php +++ b/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendEmailToFriend.php @@ -48,8 +48,14 @@ public function __construct( */ public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) { + $storeId = $context->getExtensionAttributes()->getStore()->getId(); + + if (!$this->sendFriendHelper->isEnabled($storeId)) { + throw new GraphQlInputException(__('"Email to a Friend" is not enabled.')); + } + /** @var ContextInterface $context */ - if (!$this->sendFriendHelper->isAllowForGuest() + if (!$this->sendFriendHelper->isAllowForGuest($storeId) && false === $context->getExtensionAttributes()->getIsCustomer() ) { throw new GraphQlAuthorizationException(__('The current customer isn\'t authorized.')); diff --git a/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendFriendConfiguration.php b/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendFriendConfiguration.php new file mode 100644 index 0000000000000..517a3454fac64 --- /dev/null +++ b/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendFriendConfiguration.php @@ -0,0 +1,46 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\SendFriendGraphQl\Model\Resolver; + +use Magento\Framework\GraphQl\Config\Element\Field; +use Magento\Framework\GraphQl\Query\ResolverInterface; +use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; +use Magento\SendFriend\Helper\Data as SendFriendHelper; + +/** + * Resolve Store Config information for SendFriend + */ +class SendFriendConfiguration implements ResolverInterface +{ + /** + * @var SendFriendHelper + */ + private $sendFriendHelper; + + /** + * @param SendFriendHelper $sendFriendHelper + */ + public function __construct(SendFriendHelper $sendFriendHelper) + { + $this->sendFriendHelper = $sendFriendHelper; + } + + /** + * @inheritDoc + */ + public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) + { + $store = $context->getExtensionAttributes()->getStore(); + $storeId = $store->getId(); + + return [ + 'enabled' => $this->sendFriendHelper->isEnabled($storeId), + 'allow_guest' => $this->sendFriendHelper->isAllowForGuest($storeId) + ]; + } +} diff --git a/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls b/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls index 1234b65a7b910..9793d85e45c88 100644 --- a/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls +++ b/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls @@ -37,3 +37,12 @@ type SendEmailToFriendRecipient { name: String! email: String! } + +type StoreConfig { + sendFriend: SendFriendConfiguration @resolver(class: "\\Magento\\SendFriendGraphQl\\Model\\Resolver\\SendFriendConfiguration") @doc(description: "Config for 'Email to a Friend' feature") +} + +type SendFriendConfiguration { + enabled: Boolean! @doc(description: "Indicates whether or not the feature is enabled.") + allow_guest: Boolean! @doc(description: "Indicates whether or not the feature is allowed for guest customers.") +} diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/SendFriendTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/SendFriendTest.php index e01e074900519..93001dd396cdc 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/SendFriendTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/SendFriendTest.php @@ -45,6 +45,7 @@ protected function setUp() /** * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoConfigFixture default_store sendfriend/email/enabled 1 * @magentoConfigFixture default_store sendfriend/email/allow_guest 1 */ public function testSendFriendGuestEnable() @@ -66,6 +67,7 @@ public function testSendFriendGuestEnable() /** * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoConfigFixture default_store sendfriend/email/enabled 1 * @magentoConfigFixture default_store sendfriend/email/allow_guest 0 * @expectedException \Exception * @expectedExceptionMessage The current customer isn't authorized. @@ -90,9 +92,11 @@ public function testSendFriendGuestDisableAsGuest() /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php - * @magentoConfigFixture default_store sendfriend/email/allow_guest 0 + * @magentoConfigFixture default_store sendfriend/email/enabled 0 + * @expectedException \Exception + * @expectedExceptionMessage "Email to a Friend" is not enabled. */ - public function testSendFriendGuestDisableAsCustomer() + public function testSendFriendDisableAsCustomer() { $productId = (int)$this->productRepository->get('simple_product')->getId(); $recipients = '{ @@ -111,6 +115,9 @@ public function testSendFriendGuestDisableAsCustomer() /** * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoConfigFixture default_store sendfriend/email/enabled 1 + * @expectedException \Exception + * @expectedExceptionMessage The product that was requested doesn't exist. Verify the product and try again. */ public function testSendWithoutExistProduct() { @@ -125,15 +132,13 @@ public function testSendWithoutExistProduct() }'; $query = $this->getQuery($productId, $recipients); - $this->expectExceptionMessage( - 'The product that was requested doesn\'t exist. Verify the product and try again.' - ); $this->graphQlMutation($query, [], '', $this->getHeaderMap()); } /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoConfigFixture default_store sendfriend/email/enabled 1 */ public function testMaxSendEmailToFriend() { @@ -176,6 +181,7 @@ public function testMaxSendEmailToFriend() /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php + * @magentoConfigFixture default_store sendfriend/email/enabled 1 * @dataProvider sendFriendsErrorsDataProvider * @param string $input * @param string $errorMessage @@ -188,7 +194,7 @@ public function testErrors(string $input, string $errorMessage) sendEmailToFriend( input: { $input - } + } ) { sender { name @@ -210,6 +216,7 @@ public function testErrors(string $input, string $errorMessage) /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoConfigFixture default_store sendfriend/email/enabled 1 * @magentoConfigFixture default_store sendfriend/email/max_per_hour 1 * @magentoApiDataFixture Magento/SendFriend/Fixtures/sendfriend_configuration.php */ @@ -238,6 +245,7 @@ public function testLimitMessagesPerHour() /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoConfigFixture default_store sendfriend/email/enabled 1 */ public function testSendProductWithoutSenderEmail() { @@ -256,6 +264,7 @@ public function testSendProductWithoutSenderEmail() /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product_without_visibility.php + * @magentoConfigFixture default_store sendfriend/email/enabled 1 */ public function testSendProductWithoutVisibility() { @@ -282,12 +291,12 @@ public function sendFriendsErrorsDataProvider() { return [ [ - 'product_id: 1 + 'product_id: 1 sender: { name: "Name" email: "e@mail.com" message: "Lorem Ipsum" - } + } recipients: [ { name: "" @@ -300,12 +309,12 @@ public function sendFriendsErrorsDataProvider() ]', 'Please provide Name for all of recipients.' ], [ - 'product_id: 1 + 'product_id: 1 sender: { name: "Name" email: "e@mail.com" message: "Lorem Ipsum" - } + } recipients: [ { name: "Recipient Name 1" @@ -318,12 +327,12 @@ public function sendFriendsErrorsDataProvider() ]', 'Please provide Email for all of recipients.' ], [ - 'product_id: 1 + 'product_id: 1 sender: { name: "" email: "e@mail.com" message: "Lorem Ipsum" - } + } recipients: [ { name: "Recipient Name 1" @@ -336,12 +345,12 @@ public function sendFriendsErrorsDataProvider() ]', 'Please provide Name of sender.' ], [ - 'product_id: 1 + 'product_id: 1 sender: { name: "Name" email: "e@mail.com" message: "" - } + } recipients: [ { name: "Recipient Name 1" @@ -403,9 +412,9 @@ private function getQuery(int $productId, string $recipients): string name: "Name" email: "e@mail.com" message: "Lorem Ipsum" - } + } recipients: [{$recipients}] - } + } ) { sender { name diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php new file mode 100644 index 0000000000000..3c64ee6e73fb1 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php @@ -0,0 +1,106 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\GraphQl\SendFriend; + +use Magento\TestFramework\TestCase\GraphQlAbstract; + +/** + * Test SendFriend configuration resolves correctly in StoreConfig + */ +class StoreConfigTest extends GraphQlAbstract +{ + public function testSendFriendFieldsAreReturnedWithoutError() + { + $query = $this->getQuery(); + + $response = $this->graphQlQuery($query); + $this->assertArrayNotHasKey('errors', $response); + $this->assertArrayHasKey('sendFriend', $response['storeConfig']); + $this->assertArrayHasKey('enabled', $response['storeConfig']['sendFriend']); + $this->assertArrayHasKey('allow_guest', $response['storeConfig']['sendFriend']); + $this->assertNotNull($response['storeConfig']['sendFriend']['enabled']); + $this->assertNotNull($response['storeConfig']['sendFriend']['allow_guest']); + } + + /** + * @magentoConfigFixture default_store sendfriend/email/enabled 0 + */ + public function testSendFriendDisabled() + { + $response = $this->graphQlQuery($this->getQuery()); + + $this->assertResponse( + ['enabled' => false, 'allow_guest' => false], + $response + ); + } + + /** + * @magentoConfigFixture default_store sendfriend/email/enabled 1 + * @magentoConfigFixture default_store sendfriend/email/allow_guest 0 + */ + public function testSendFriendEnabledGuestDisabled() + { + $response = $this->graphQlQuery($this->getQuery()); + + $this->assertResponse( + ['enabled' => true, 'allow_guest' => false], + $response + ); + } + + /** + * @magentoConfigFixture default_store sendfriend/email/enabled 1 + * @magentoConfigFixture default_store sendfriend/email/allow_guest 1 + */ + public function testSendFriendEnabledGuestEnabled() + { + $response = $this->graphQlQuery($this->getQuery()); + + $this->assertResponse( + ['enabled' => true, 'allow_guest' => true], + $response + ); + } + + /** + * Assert response matches expected output + * + * @param array $expectedValues + * @param array $response + */ + private function assertResponse(array $expectedValues, array $response) + { + $this->assertArrayNotHasKey('errors', $response); + $this->assertArrayHasKey('sendFriend', $response['storeConfig']); + $this->assertArrayHasKey('enabled', $response['storeConfig']['sendFriend']); + $this->assertArrayHasKey('allow_guest', $response['storeConfig']['sendFriend']); + $this->assertEquals($expectedValues['enabled'], $response['storeConfig']['sendFriend']['enabled']); + $this->assertEquals($expectedValues['allow_guest'], $response['storeConfig']['sendFriend']['allow_guest']); + } + + /** + * Return simple storeConfig query to get sendFriend configuration + * + * @return string + */ + private function getQuery() + { + return <<<QUERY +{ + storeConfig{ + id + sendFriend { + enabled + allow_guest + } + } +} +QUERY; + } +} From 647080652c61b7adbb760284dc78e1f6e9fdced8 Mon Sep 17 00:00:00 2001 From: Prabhu Ram <pganapat@adobe.com> Date: Tue, 10 Mar 2020 13:39:39 -0500 Subject: [PATCH 112/153] MC-31987: Varnish graphql cache has to skip authenticated requests - Modified vcl to not cache authorized requests for graphql --- app/code/Magento/PageCache/etc/varnish4.vcl | 7 ++++++- app/code/Magento/PageCache/etc/varnish5.vcl | 7 ++++++- app/code/Magento/PageCache/etc/varnish6.vcl | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 6de6b4e917044..6723cd988417a 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -108,6 +108,11 @@ sub vcl_recv { #unset req.http.Cookie; } + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=" && req.http.Authorization ~ "^Bearer") { + # Authentificated customers should not be cached by default + return (pass); + } + return (hash); } @@ -123,7 +128,7 @@ sub vcl_hash { hash_data(server.ip); } - if (req.url ~ "/graphql") { + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { call process_graphql_headers; } diff --git a/app/code/Magento/PageCache/etc/varnish5.vcl b/app/code/Magento/PageCache/etc/varnish5.vcl index 4505e74629714..3cc75adb8cfe9 100644 --- a/app/code/Magento/PageCache/etc/varnish5.vcl +++ b/app/code/Magento/PageCache/etc/varnish5.vcl @@ -109,6 +109,11 @@ sub vcl_recv { #unset req.http.Cookie; } + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=" && req.http.Authorization ~ "^Bearer") { + # Authentificated customers should not be cached by default + return (pass); + } + return (hash); } @@ -130,7 +135,7 @@ sub vcl_hash { } /* {{ design_exceptions_code }} */ - if (req.url ~ "/graphql") { + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=" ) { call process_graphql_headers; } } diff --git a/app/code/Magento/PageCache/etc/varnish6.vcl b/app/code/Magento/PageCache/etc/varnish6.vcl index b43c8a77bca74..fbe7f4d62f1c7 100644 --- a/app/code/Magento/PageCache/etc/varnish6.vcl +++ b/app/code/Magento/PageCache/etc/varnish6.vcl @@ -109,6 +109,11 @@ sub vcl_recv { #unset req.http.Cookie; } + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=" && req.http.Authorization ~ "^Bearer") { + # Authentificated customers should not be cached by default + return (pass); + } + return (hash); } @@ -130,7 +135,7 @@ sub vcl_hash { } /* {{ design_exceptions_code }} */ - if (req.url ~ "/graphql") { + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { call process_graphql_headers; } } From 19b9bfb88b11b75a7b4da46f08a92e6e68e43472 Mon Sep 17 00:00:00 2001 From: Prabhu Ram <pganapat@adobe.com> Date: Tue, 10 Mar 2020 13:46:50 -0500 Subject: [PATCH 113/153] MC-31987: Varnish graphql cache has to skip authenticated requests - (Forward Port) MC-31679: FPC doesn't work with Varnish enabled to 2.4 --- .../HTTP/PhpEnvironment/Response.php | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php index dc3e63fcc7df8..f12de83c52474 100644 --- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php +++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php @@ -183,27 +183,4 @@ public function __sleep() { return ['content', 'isRedirect', 'statusCode']; } - - /** - * Sending provided headers. - * - * Had to be overridden because the original did not work correctly with multi-headers. - */ - public function sendHeaders() - { - if ($this->headersSent()) { - return $this; - } - - $status = $this->renderStatusLine(); - header($status); - - /** @var \Zend\Http\Header\HeaderInterface $header */ - foreach ($this->getHeaders() as $header) { - header($header->toString(), false); - } - - $this->headersSent = true; - return $this; - } } From dee14ee7278a75191aa97d4f4c0bf7f0fda863b8 Mon Sep 17 00:00:00 2001 From: Prabhu Ram <pganapat@adobe.com> Date: Tue, 10 Mar 2020 14:31:38 -0500 Subject: [PATCH 114/153] MC-31987: Varnish graphql cache has to skip authenticated requests - review fix --- app/code/Magento/PageCache/etc/varnish4.vcl | 8 +++++--- app/code/Magento/PageCache/etc/varnish5.vcl | 8 +++++--- app/code/Magento/PageCache/etc/varnish6.vcl | 6 ++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 6723cd988417a..7226d07e5f48c 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -108,9 +108,11 @@ sub vcl_recv { #unset req.http.Cookie; } - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=" && req.http.Authorization ~ "^Bearer") { - # Authentificated customers should not be cached by default - return (pass); + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { + # Authentificated customers should not be cached by default + if (req.http.Authorization ~ "^Bearer") { + return (pass); + } } return (hash); diff --git a/app/code/Magento/PageCache/etc/varnish5.vcl b/app/code/Magento/PageCache/etc/varnish5.vcl index 3cc75adb8cfe9..267ca5633f66d 100644 --- a/app/code/Magento/PageCache/etc/varnish5.vcl +++ b/app/code/Magento/PageCache/etc/varnish5.vcl @@ -109,9 +109,11 @@ sub vcl_recv { #unset req.http.Cookie; } - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=" && req.http.Authorization ~ "^Bearer") { - # Authentificated customers should not be cached by default - return (pass); + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { + # Authentificated customers should not be cached by default + if (req.http.Authorization ~ "^Bearer") { + return (pass); + } } return (hash); diff --git a/app/code/Magento/PageCache/etc/varnish6.vcl b/app/code/Magento/PageCache/etc/varnish6.vcl index fbe7f4d62f1c7..bf56d00749b2e 100644 --- a/app/code/Magento/PageCache/etc/varnish6.vcl +++ b/app/code/Magento/PageCache/etc/varnish6.vcl @@ -109,9 +109,11 @@ sub vcl_recv { #unset req.http.Cookie; } - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=" && req.http.Authorization ~ "^Bearer") { + if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { # Authentificated customers should not be cached by default - return (pass); + if (req.http.Authorization ~ "^Bearer") { + return (pass); + } } return (hash); From 187ac76e853915ce59666aceb1a56267b001bf8b Mon Sep 17 00:00:00 2001 From: Prabhu Ram <pganapat@adobe.com> Date: Tue, 10 Mar 2020 14:32:26 -0500 Subject: [PATCH 115/153] MC-31987: Varnish graphql cache has to skip authenticated requests - typo --- app/code/Magento/PageCache/etc/varnish4.vcl | 2 +- app/code/Magento/PageCache/etc/varnish5.vcl | 2 +- app/code/Magento/PageCache/etc/varnish6.vcl | 2 +- vendor/.htaccess | 7 ------- 4 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 vendor/.htaccess diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 7226d07e5f48c..235ce4cfc0bb4 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -109,7 +109,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authentificated customers should not be cached by default + # Authenticated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/app/code/Magento/PageCache/etc/varnish5.vcl b/app/code/Magento/PageCache/etc/varnish5.vcl index 267ca5633f66d..740019eebdb08 100644 --- a/app/code/Magento/PageCache/etc/varnish5.vcl +++ b/app/code/Magento/PageCache/etc/varnish5.vcl @@ -110,7 +110,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authentificated customers should not be cached by default + # Authenticated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/app/code/Magento/PageCache/etc/varnish6.vcl b/app/code/Magento/PageCache/etc/varnish6.vcl index bf56d00749b2e..d0764e799f013 100644 --- a/app/code/Magento/PageCache/etc/varnish6.vcl +++ b/app/code/Magento/PageCache/etc/varnish6.vcl @@ -110,7 +110,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authentificated customers should not be cached by default + # Authenticated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/vendor/.htaccess b/vendor/.htaccess deleted file mode 100644 index b97408bad3f2e..0000000000000 --- a/vendor/.htaccess +++ /dev/null @@ -1,7 +0,0 @@ -<IfVersion < 2.4> - order allow,deny - deny from all -</IfVersion> -<IfVersion >= 2.4> - Require all denied -</IfVersion> From f59b93fca4f286617a2e20be4f0fb328cd2e1b3c Mon Sep 17 00:00:00 2001 From: Prabhu Ram <pganapat@adobe.com> Date: Tue, 10 Mar 2020 14:34:54 -0500 Subject: [PATCH 116/153] Revert "MC-31987: Varnish graphql cache has to skip authenticated requests" This reverts commit 187ac76e853915ce59666aceb1a56267b001bf8b. --- app/code/Magento/PageCache/etc/varnish4.vcl | 2 +- app/code/Magento/PageCache/etc/varnish5.vcl | 2 +- app/code/Magento/PageCache/etc/varnish6.vcl | 2 +- vendor/.htaccess | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 vendor/.htaccess diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 235ce4cfc0bb4..7226d07e5f48c 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -109,7 +109,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authenticated customers should not be cached by default + # Authentificated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/app/code/Magento/PageCache/etc/varnish5.vcl b/app/code/Magento/PageCache/etc/varnish5.vcl index 740019eebdb08..267ca5633f66d 100644 --- a/app/code/Magento/PageCache/etc/varnish5.vcl +++ b/app/code/Magento/PageCache/etc/varnish5.vcl @@ -110,7 +110,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authenticated customers should not be cached by default + # Authentificated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/app/code/Magento/PageCache/etc/varnish6.vcl b/app/code/Magento/PageCache/etc/varnish6.vcl index d0764e799f013..bf56d00749b2e 100644 --- a/app/code/Magento/PageCache/etc/varnish6.vcl +++ b/app/code/Magento/PageCache/etc/varnish6.vcl @@ -110,7 +110,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authenticated customers should not be cached by default + # Authentificated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/vendor/.htaccess b/vendor/.htaccess new file mode 100644 index 0000000000000..b97408bad3f2e --- /dev/null +++ b/vendor/.htaccess @@ -0,0 +1,7 @@ +<IfVersion < 2.4> + order allow,deny + deny from all +</IfVersion> +<IfVersion >= 2.4> + Require all denied +</IfVersion> From dc96b5759934a5ca1eea06ce478eedaf52c186db Mon Sep 17 00:00:00 2001 From: Prabhu Ram <pganapat@adobe.com> Date: Tue, 10 Mar 2020 14:35:42 -0500 Subject: [PATCH 117/153] MC-31987: Varnish graphql cache has to skip authenticated requests - typo fix --- app/code/Magento/PageCache/etc/varnish4.vcl | 2 +- app/code/Magento/PageCache/etc/varnish5.vcl | 2 +- app/code/Magento/PageCache/etc/varnish6.vcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 7226d07e5f48c..235ce4cfc0bb4 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -109,7 +109,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authentificated customers should not be cached by default + # Authenticated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/app/code/Magento/PageCache/etc/varnish5.vcl b/app/code/Magento/PageCache/etc/varnish5.vcl index 267ca5633f66d..740019eebdb08 100644 --- a/app/code/Magento/PageCache/etc/varnish5.vcl +++ b/app/code/Magento/PageCache/etc/varnish5.vcl @@ -110,7 +110,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authentificated customers should not be cached by default + # Authenticated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/app/code/Magento/PageCache/etc/varnish6.vcl b/app/code/Magento/PageCache/etc/varnish6.vcl index bf56d00749b2e..d0764e799f013 100644 --- a/app/code/Magento/PageCache/etc/varnish6.vcl +++ b/app/code/Magento/PageCache/etc/varnish6.vcl @@ -110,7 +110,7 @@ sub vcl_recv { } if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authentificated customers should not be cached by default + # Authenticated customers should not be cached by default if (req.http.Authorization ~ "^Bearer") { return (pass); } From de81e6201e14459cc24286fce39a3c86980b8836 Mon Sep 17 00:00:00 2001 From: Prabhu Ram <pganapat@adobe.com> Date: Tue, 10 Mar 2020 16:05:12 -0500 Subject: [PATCH 118/153] MC-31987: Varnish graphql cache has to skip authenticated requests - review fix --- app/code/Magento/PageCache/etc/varnish4.vcl | 10 ++++------ app/code/Magento/PageCache/etc/varnish5.vcl | 10 ++++------ app/code/Magento/PageCache/etc/varnish6.vcl | 10 ++++------ 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 235ce4cfc0bb4..9f3ecdc56083f 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -108,11 +108,9 @@ sub vcl_recv { #unset req.http.Cookie; } - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authenticated customers should not be cached by default - if (req.http.Authorization ~ "^Bearer") { - return (pass); - } + # Authenticated graphQL customers should not be cached by default + if (req.url ~ "/graphql" && req.http.Authorization ~ "^Bearer") { + return (pass); } return (hash); @@ -130,7 +128,7 @@ sub vcl_hash { hash_data(server.ip); } - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { + if (req.url ~ "/graphql") { call process_graphql_headers; } diff --git a/app/code/Magento/PageCache/etc/varnish5.vcl b/app/code/Magento/PageCache/etc/varnish5.vcl index 740019eebdb08..2b6a8b69e9792 100644 --- a/app/code/Magento/PageCache/etc/varnish5.vcl +++ b/app/code/Magento/PageCache/etc/varnish5.vcl @@ -109,11 +109,9 @@ sub vcl_recv { #unset req.http.Cookie; } - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authenticated customers should not be cached by default - if (req.http.Authorization ~ "^Bearer") { - return (pass); - } + # Authenticated graphQL customers should not be cached by default + if (req.url ~ "/graphql" && req.http.Authorization ~ "^Bearer") { + return (pass); } return (hash); @@ -137,7 +135,7 @@ sub vcl_hash { } /* {{ design_exceptions_code }} */ - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=" ) { + if (req.url ~ "/graphql") { call process_graphql_headers; } } diff --git a/app/code/Magento/PageCache/etc/varnish6.vcl b/app/code/Magento/PageCache/etc/varnish6.vcl index d0764e799f013..be2895d526373 100644 --- a/app/code/Magento/PageCache/etc/varnish6.vcl +++ b/app/code/Magento/PageCache/etc/varnish6.vcl @@ -109,11 +109,9 @@ sub vcl_recv { #unset req.http.Cookie; } - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { - # Authenticated customers should not be cached by default - if (req.http.Authorization ~ "^Bearer") { - return (pass); - } + # Authenticated graphQL customers should not be cached by default + if (req.url ~ "/graphql" && req.http.Authorization ~ "^Bearer") { + return (pass); } return (hash); @@ -137,7 +135,7 @@ sub vcl_hash { } /* {{ design_exceptions_code }} */ - if (req.method == "GET" && req.url ~ "/graphql" && req.url ~ "query=") { + if (req.url ~ "/graphql") { call process_graphql_headers; } } From ce1f70291b2f3d2b3a34a9bff936b6c090339927 Mon Sep 17 00:00:00 2001 From: Prabhu Ram <pganapat@adobe.com> Date: Tue, 10 Mar 2020 16:14:23 -0500 Subject: [PATCH 119/153] MC-31987: Varnish graphql cache has to skip authenticated requests - review fix --- app/code/Magento/PageCache/etc/varnish4.vcl | 2 +- app/code/Magento/PageCache/etc/varnish5.vcl | 2 +- app/code/Magento/PageCache/etc/varnish6.vcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl index 9f3ecdc56083f..f5e25ce36e973 100644 --- a/app/code/Magento/PageCache/etc/varnish4.vcl +++ b/app/code/Magento/PageCache/etc/varnish4.vcl @@ -108,7 +108,7 @@ sub vcl_recv { #unset req.http.Cookie; } - # Authenticated graphQL customers should not be cached by default + # Authenticated GraphQL requests should not be cached by default if (req.url ~ "/graphql" && req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/app/code/Magento/PageCache/etc/varnish5.vcl b/app/code/Magento/PageCache/etc/varnish5.vcl index 2b6a8b69e9792..92bb3394486fc 100644 --- a/app/code/Magento/PageCache/etc/varnish5.vcl +++ b/app/code/Magento/PageCache/etc/varnish5.vcl @@ -109,7 +109,7 @@ sub vcl_recv { #unset req.http.Cookie; } - # Authenticated graphQL customers should not be cached by default + # Authenticated GraphQL requests should not be cached by default if (req.url ~ "/graphql" && req.http.Authorization ~ "^Bearer") { return (pass); } diff --git a/app/code/Magento/PageCache/etc/varnish6.vcl b/app/code/Magento/PageCache/etc/varnish6.vcl index be2895d526373..eef5e99862538 100644 --- a/app/code/Magento/PageCache/etc/varnish6.vcl +++ b/app/code/Magento/PageCache/etc/varnish6.vcl @@ -109,7 +109,7 @@ sub vcl_recv { #unset req.http.Cookie; } - # Authenticated graphQL customers should not be cached by default + # Authenticated GraphQL requests should not be cached by default if (req.url ~ "/graphql" && req.http.Authorization ~ "^Bearer") { return (pass); } From fcda68c7cec7c4e24e92a0338ce65c7758dd3709 Mon Sep 17 00:00:00 2001 From: Daniel Renaud <drenaud@magento.com> Date: Tue, 10 Mar 2020 16:21:33 -0500 Subject: [PATCH 120/153] MC-29423: GraphQL Send Friend is still sending emails when disabled - rename storeConfig fields --- .../Resolver/SendFriendConfiguration.php | 4 +-- .../SendFriendGraphQl/etc/schema.graphqls | 6 ++-- .../GraphQl/SendFriend/StoreConfigTest.php | 36 +++++++++---------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendFriendConfiguration.php b/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendFriendConfiguration.php index 517a3454fac64..7149dccdec834 100644 --- a/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendFriendConfiguration.php +++ b/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendFriendConfiguration.php @@ -39,8 +39,8 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value $storeId = $store->getId(); return [ - 'enabled' => $this->sendFriendHelper->isEnabled($storeId), - 'allow_guest' => $this->sendFriendHelper->isAllowForGuest($storeId) + 'enabled_for_customers' => $this->sendFriendHelper->isEnabled($storeId), + 'enabled_for_guests' => $this->sendFriendHelper->isAllowForGuest($storeId) ]; } } diff --git a/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls b/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls index 9793d85e45c88..7dc28c54cf6ef 100644 --- a/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls +++ b/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls @@ -39,10 +39,10 @@ type SendEmailToFriendRecipient { } type StoreConfig { - sendFriend: SendFriendConfiguration @resolver(class: "\\Magento\\SendFriendGraphQl\\Model\\Resolver\\SendFriendConfiguration") @doc(description: "Config for 'Email to a Friend' feature") + sendFriend: SendFriendConfiguration @resolver(class: "\\Magento\\SendFriendGraphQl\\Model\\Resolver\\SendFriendConfiguration") @doc(description: "Email to a Friend configuration.") } type SendFriendConfiguration { - enabled: Boolean! @doc(description: "Indicates whether or not the feature is enabled.") - allow_guest: Boolean! @doc(description: "Indicates whether or not the feature is allowed for guest customers.") + enabled_for_customers: Boolean! @doc(description: "Indicates whether the Email to a Friend feature is enabled.") + enabled_for_guests: Boolean! @doc(description: "Indicates whether the Email to a Friend feature is enabled for guests.") } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php index 3c64ee6e73fb1..73855f63a0945 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php @@ -16,15 +16,15 @@ class StoreConfigTest extends GraphQlAbstract { public function testSendFriendFieldsAreReturnedWithoutError() { - $query = $this->getQuery(); + $query = $this->getStoreConfigQuery(); $response = $this->graphQlQuery($query); $this->assertArrayNotHasKey('errors', $response); $this->assertArrayHasKey('sendFriend', $response['storeConfig']); - $this->assertArrayHasKey('enabled', $response['storeConfig']['sendFriend']); - $this->assertArrayHasKey('allow_guest', $response['storeConfig']['sendFriend']); - $this->assertNotNull($response['storeConfig']['sendFriend']['enabled']); - $this->assertNotNull($response['storeConfig']['sendFriend']['allow_guest']); + $this->assertArrayHasKey('enabled_for_customers', $response['storeConfig']['sendFriend']); + $this->assertArrayHasKey('enabled_for_guests', $response['storeConfig']['sendFriend']); + $this->assertNotNull($response['storeConfig']['sendFriend']['enabled_for_customers']); + $this->assertNotNull($response['storeConfig']['sendFriend']['enabled_for_guests']); } /** @@ -32,10 +32,10 @@ public function testSendFriendFieldsAreReturnedWithoutError() */ public function testSendFriendDisabled() { - $response = $this->graphQlQuery($this->getQuery()); + $response = $this->graphQlQuery($this->getStoreConfigQuery()); $this->assertResponse( - ['enabled' => false, 'allow_guest' => false], + ['enabled_for_customers' => false, 'enabled_for_guests' => false], $response ); } @@ -46,10 +46,10 @@ public function testSendFriendDisabled() */ public function testSendFriendEnabledGuestDisabled() { - $response = $this->graphQlQuery($this->getQuery()); + $response = $this->graphQlQuery($this->getStoreConfigQuery()); $this->assertResponse( - ['enabled' => true, 'allow_guest' => false], + ['enabled_for_customers' => true, 'enabled_for_guests' => false], $response ); } @@ -60,10 +60,10 @@ public function testSendFriendEnabledGuestDisabled() */ public function testSendFriendEnabledGuestEnabled() { - $response = $this->graphQlQuery($this->getQuery()); + $response = $this->graphQlQuery($this->getStoreConfigQuery()); $this->assertResponse( - ['enabled' => true, 'allow_guest' => true], + ['enabled_for_customers' => true, 'enabled_for_guests' => true], $response ); } @@ -78,10 +78,10 @@ private function assertResponse(array $expectedValues, array $response) { $this->assertArrayNotHasKey('errors', $response); $this->assertArrayHasKey('sendFriend', $response['storeConfig']); - $this->assertArrayHasKey('enabled', $response['storeConfig']['sendFriend']); - $this->assertArrayHasKey('allow_guest', $response['storeConfig']['sendFriend']); - $this->assertEquals($expectedValues['enabled'], $response['storeConfig']['sendFriend']['enabled']); - $this->assertEquals($expectedValues['allow_guest'], $response['storeConfig']['sendFriend']['allow_guest']); + $this->assertArrayHasKey('enabled_for_customers', $response['storeConfig']['sendFriend']); + $this->assertArrayHasKey('enabled_for_guests', $response['storeConfig']['sendFriend']); + $this->assertEquals($expectedValues['enabled_for_customers'], $response['storeConfig']['sendFriend']['enabled_for_customers']); + $this->assertEquals($expectedValues['enabled_for_guests'], $response['storeConfig']['sendFriend']['enabled_for_guests']); } /** @@ -89,15 +89,15 @@ private function assertResponse(array $expectedValues, array $response) * * @return string */ - private function getQuery() + private function getStoreConfigQuery() { return <<<QUERY { storeConfig{ id sendFriend { - enabled - allow_guest + enabled_for_customers + enabled_for_guests } } } From 19c7b22583829b1c362cb89eebc16c8d97095749 Mon Sep 17 00:00:00 2001 From: Vasya Tsviklinskyi <tsviklinskyi@gmail.com> Date: Wed, 11 Mar 2020 11:51:55 +0200 Subject: [PATCH 121/153] MC-32330: Shopping Cart QTY text box functionality slow --- .../view/frontend/web/js/action/update-shopping-cart.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js b/app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js index a8e70b65019ce..f9def2fd58b23 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js @@ -122,6 +122,9 @@ define([ submitForm: function () { this.element .off('submit', this.onSubmit) + .on('submit', function () { + $(document.body).trigger('processStart'); + }) .submit(); } }); From 85d6433f5734752d496a3b7423bbc3461fd9b5cc Mon Sep 17 00:00:00 2001 From: Vasya Tsviklinskyi <tsviklinskyi@gmail.com> Date: Wed, 11 Mar 2020 13:37:35 +0200 Subject: [PATCH 122/153] MC-32332: MFTF test for Review Grid Filters not working --- .../AdminAddProductReviewActionGroup.xml | 29 +++++++++ .../AdminFilterProductReviewActionGroup.xml | 21 ++++++ .../Test/Mftf/Data/ProductReviewData.xml | 3 + .../Test/Mftf/Page/AdminProductReviewPage.xml | 14 ++++ .../Section/AdminCreateNewReviewSection.xml | 26 ++++++++ .../Test/AdminReviewsByProductsReportTest.xml | 64 +++++++++++++++++++ 6 files changed, 157 insertions(+) create mode 100644 app/code/Magento/Review/Test/Mftf/ActionGroup/AdminAddProductReviewActionGroup.xml create mode 100644 app/code/Magento/Review/Test/Mftf/ActionGroup/AdminFilterProductReviewActionGroup.xml create mode 100644 app/code/Magento/Review/Test/Mftf/Page/AdminProductReviewPage.xml create mode 100644 app/code/Magento/Review/Test/Mftf/Section/AdminCreateNewReviewSection.xml create mode 100644 app/code/Magento/Review/Test/Mftf/Test/AdminReviewsByProductsReportTest.xml diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminAddProductReviewActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminAddProductReviewActionGroup.xml new file mode 100644 index 0000000000000..9316194dcc78b --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminAddProductReviewActionGroup.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminAddProductReviewActionGroup"> + <arguments> + <argument name="review" type="entity" defaultValue="simpleProductReview"/> + <argument name="sku" type="string"/> + </arguments> + <!--Click on Add New Review --> + <click selector="{{AdminCreateNewReviewSection.addNewReviewButton}}" stepKey="clickOnNewReview"/> + <waitForElementVisible selector="{{AdminCreateNewReviewSection.addNewReviewBySKU(sku)}}" stepKey="waitForVisibleReviewButton"/> + <!--Select Product by SKU and Create Review --> + <click selector="{{AdminCreateNewReviewSection.addNewReviewBySKU(sku)}}" stepKey="addNewReviewBySKU"/> + <waitForElementVisible selector="{{AdminCreateNewReviewSection.select_stores}}" stepKey="waitForVisibleReviewDetails"/> + <selectOption selector="{{AdminCreateNewReviewSection.select_stores}}" userInput="{{review.select_stores[0]}}" stepKey="visibilityField"/> + <fillField selector="{{AdminCreateNewReviewSection.nickname}}" userInput="{{review.nickname}}" stepKey="fillNicknameField"/> + <fillField selector="{{AdminCreateNewReviewSection.title}}" userInput="{{review.title}}" stepKey="fillSummaryField"/> + <fillField selector="{{AdminCreateNewReviewSection.detail}}" userInput="{{review.detail}}" stepKey="fillReviewField"/> + <click selector="{{AdminCreateNewReviewSection.submitReview}}" stepKey="clickSubmitReview"/> + <waitForElementVisible selector="{{AdminCreateNewReviewSection.SuccessMessage}}" stepKey="waitForSuccessMessage"/> + <see selector="{{AdminCreateNewReviewSection.SuccessMessage}}" userInput="You saved the review." stepKey="seeSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminFilterProductReviewActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminFilterProductReviewActionGroup.xml new file mode 100644 index 0000000000000..daab520025477 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminFilterProductReviewActionGroup.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminFilterProductReviewActionGroup"> + <arguments> + <argument name="reviewCount" type="string"/> + </arguments> + <!--Sort Review Column in Grid --> + <waitForPageLoad stepKey="waitForGridToAppear"/> + <fillField userInput="{{reviewCount}}" selector="{{AdminCreateNewReviewSection.gridProducts_filter_review_cnt}}" stepKey="searchReview"/> + <click selector="{{AdminCreateNewReviewSection.searchButton}}" stepKey="startSearch"/> + <waitForPageLoad stepKey="waitForResults"/> + <see userInput="{{reviewCount}}" selector="{{AdminCreateNewReviewSection.gridReviewColumn}}" stepKey="assertReviewColumn"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/Data/ProductReviewData.xml b/app/code/Magento/Review/Test/Mftf/Data/ProductReviewData.xml index 89758328efd54..f66decd1b7bd0 100644 --- a/app/code/Magento/Review/Test/Mftf/Data/ProductReviewData.xml +++ b/app/code/Magento/Review/Test/Mftf/Data/ProductReviewData.xml @@ -12,5 +12,8 @@ <data key="nickname" unique="suffix">user</data> <data key="title">Review title</data> <data key="detail">Simple product review</data> + <array key="select_stores"> + <item>Default Store View</item> + </array> </entity> </entities> diff --git a/app/code/Magento/Review/Test/Mftf/Page/AdminProductReviewPage.xml b/app/code/Magento/Review/Test/Mftf/Page/AdminProductReviewPage.xml new file mode 100644 index 0000000000000..131fc5e82d944 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Page/AdminProductReviewPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> + <page name="AdminProductReviewPage" url="review/product/new/{{productId}}/" area="admin" module="Review" parameterized="true"> + <section name="AdminCreateNewReviewSection"/> + </page> +</pages> diff --git a/app/code/Magento/Review/Test/Mftf/Section/AdminCreateNewReviewSection.xml b/app/code/Magento/Review/Test/Mftf/Section/AdminCreateNewReviewSection.xml new file mode 100644 index 0000000000000..3b17b20e9da1b --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Section/AdminCreateNewReviewSection.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminCreateNewReviewSection"> + <element name="addNewReviewButton" type="button" selector="#add" timeout="30"/> + <element name="addNewReviewBySKU" type="text" selector="//td[contains(@class,'col-sku')][contains(text(),'{{sku}}')]" parameterized="true"/> + <element name="select_stores" type="text" selector="#select_stores"/> + <element name="nickname" type="text" selector="#nickname"/> + <element name="title" type="text" selector="#title"/> + <element name="detail" type="textarea" selector="#detail"/> + <element name="submitReview" type="button" selector="#save_button"/> + <element name="SuccessMessage" type="button" selector="div.message-success"/> + <element name="gridProducts_filter_review_cnt" type="button" selector="#gridProducts_filter_review_cnt"/> + <element name="searchButton" type="button" selector="//*[@id='gridProducts']//button[contains(@title, 'Search')]"/> + <element name="gridReviewColumn" type="text" selector="//tbody//td[@data-column='review_cnt']"/> + <element name="gridCustomer_filter_review_cnt" type="button" selector="#customers_grid_filter_review_cnt"/> + <element name="CustomerSearchButton" type="button" selector="//*[@id='customers_grid']//button[contains(@title, 'Search')]"/> + </section> +</sections> diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminReviewsByProductsReportTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminReviewsByProductsReportTest.xml new file mode 100644 index 0000000000000..050f30d6ca65f --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminReviewsByProductsReportTest.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminReviewsByProductsReportTest"> + <annotations> + <features value="Review"/> + <stories value="Review By Products"/> + <title value="Admin Reports Review by Products"/> + <description value="Review By Products Grid Filters"/> + <severity value="AVERAGE"/> + <testCaseId value="MC-32083"/> + </annotations> + <before> + <!--Login--> + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> + <!--Create product and Category--> + <createData stepKey="category" entity="SimpleSubCategory"/> + <createData stepKey="createProduct1" entity="SimpleProduct"> + <requiredEntity createDataKey="category"/> + </createData> + <createData stepKey="createProduct2" entity="SimpleProduct"> + <requiredEntity createDataKey="category"/> + </createData> + </before> + <after> + <!-- Delete reviews --> + <actionGroup ref="AdminOpenReviewsPageActionGroup" stepKey="openAllReviewsPage"/> + <actionGroup ref="AdminDeleteReviewsByUserNicknameActionGroup" stepKey="deleteCustomerReview"/> + <!--delete Category and Products --> + <deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/> + <deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> + <deleteData createDataKey="category" stepKey="deleteCategory"/> + <!--Logout--> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <!-- Navigate to Marketing > User Content> All Review --> + <amOnPage url="{{AdminReviewsPage.url}}" stepKey="openReviewsPage"/> + <waitForPageLoad time="30" stepKey="waitForPageLoadCreatedReviewOne"/> + <actionGroup ref="AdminAddProductReviewActionGroup" stepKey="addFirstReview"> + <argument name="sku" value="$$createProduct1.sku$$"/> + </actionGroup> + <waitForPageLoad time="30" stepKey="waitForPageLoadCreatedReviewTwo"/> + <actionGroup ref="AdminAddProductReviewActionGroup" stepKey="addSecondReview"> + <argument name="sku" value="$$createProduct2.sku$$"/> + </actionGroup> + <!-- Navigate to Reports > Reviews >By Products --> + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsByProductsPage"> + <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuReportsReviewsByProducts.dataUiId}}"/> + </actionGroup> + <!--Sort Review Column --> + <grabTextFrom selector="{{AdminCreateNewReviewSection.gridReviewColumn}}" stepKey="grabReviewQuantity"/> + <actionGroup ref="AdminFilterProductReviewActionGroup" stepKey="navigateToReportsReview"> + <argument name="reviewCount" value="$grabReviewQuantity"/> + </actionGroup> + </test> +</tests> From e699d3feb9514ee73c8c0afc3fdb8b5c03ed18d5 Mon Sep 17 00:00:00 2001 From: Nikita Shcherbatykh <nikita.shcherbatykh@transoftgroup.com> Date: Wed, 11 Mar 2020 15:09:26 +0200 Subject: [PATCH 123/153] MC-32229: Category and other trees not working in Cart Price Rule --- .../Adminhtml/Promo/Quote/NewActionHtml.php | 29 ++++++ .../Promo/Quote/NewConditionHtml.php | 33 ++++++- .../Promo/Quote/NewActionHtmlTest.php | 7 ++ .../Promo/Quote/NewConditionHtmlTest.php | 88 +++++++++++++++++++ 4 files changed, 155 insertions(+), 2 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtmlTest.php diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtml.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtml.php index 56c08864c90c4..af28547456a9d 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtml.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtml.php @@ -47,6 +47,7 @@ public function execute() if ($model instanceof AbstractCondition) { $model->setJsFormObject($formName); $model->setFormName($formName); + $this->setJsFormObject($model); $html = $model->asHtmlRecursive(); } else { $html = ''; @@ -54,4 +55,32 @@ public function execute() $this->getResponse() ->setBody($html); } + + /** + * Set jsFormObject for the model object + * + * @return void + * @param AbstractCondition $model + */ + private function setJsFormObject(AbstractCondition $model): void + { + $requestJsFormName = $this->getRequest()->getParam('form'); + $actualJsFormName = $this->getJsFormObjectName($model->getFormName()); + if ($requestJsFormName === $actualJsFormName) { //new + $model->setJsFormObject($actualJsFormName); + } else { //edit + $model->setJsFormObject($requestJsFormName); + } + } + + /** + * Get jsFormObject name + * + * @param string $formName + * @return string + */ + private function getJsFormObjectName(string $formName): string + { + return $formName . 'rule_actions_fieldset_'; + } } diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtml.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtml.php index 50545fd864866..3646f9592c497 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtml.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtml.php @@ -6,11 +6,13 @@ namespace Magento\SalesRule\Controller\Adminhtml\Promo\Quote; use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Rule\Model\Condition\AbstractCondition; +use Magento\SalesRule\Controller\Adminhtml\Promo\Quote; /** * Controller class NewConditionHtml. Returns condition html */ -class NewConditionHtml extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quote implements HttpPostActionInterface +class NewConditionHtml extends Quote implements HttpPostActionInterface { /** * New condition html action @@ -39,13 +41,40 @@ public function execute() $model->setAttribute($typeArr[1]); } - if ($model instanceof \Magento\Rule\Model\Condition\AbstractCondition) { + if ($model instanceof AbstractCondition) { $model->setJsFormObject($this->getRequest()->getParam('form')); $model->setFormName($formName); + $this->setJsFormObject($model); $html = $model->asHtmlRecursive(); } else { $html = ''; } $this->getResponse()->setBody($html); } + + /** + * Set jsFormObject for the model object + * + * @return void + * @param AbstractCondition $model + */ + private function setJsFormObject(AbstractCondition $model): void + { + $requestJsFormName = $this->getRequest()->getParam('form'); + $actualJsFormName = $this->getJsFormObjectName($model->getFormName()); + if ($requestJsFormName === $actualJsFormName) { //new + $model->setJsFormObject($actualJsFormName); + } + } + + /** + * Get jsFormObject name + * + * @param string $formName + * @return string + */ + private function getJsFormObjectName(string $formName): string + { + return $formName . 'rule_conditions_fieldset_'; + } } diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtmlTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtmlTest.php index 82f1c53d8f161..b2fc8365c90ea 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtmlTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtmlTest.php @@ -12,6 +12,7 @@ /** * New action html test * + * Verify the request object contains the proper form object for action * @magentoAppArea adminhtml */ class NewActionHtmlTest extends AbstractBackendController @@ -31,6 +32,11 @@ class NewActionHtmlTest extends AbstractBackendController */ private $formName = 'test_form'; + /** + * @var string + */ + private $requestFormName = 'rule_actions_fieldset_'; + /** * Test verifies that execute method has the proper data-form-part value in html response * @@ -73,6 +79,7 @@ private function prepareRequest(): void $this->getRequest()->setParams( [ 'id' => 1, + 'form' => $this->requestFormName, 'form_namespace' => $this->formName, 'type' => 'Magento\SalesRule\Model\Rule\Condition\Product|quote_item_price', ] diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtmlTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtmlTest.php new file mode 100644 index 0000000000000..f15befedfbca7 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewConditionHtmlTest.php @@ -0,0 +1,88 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\SalesRule\Controller\Adminhtml\Promo\Quote; + +use Magento\TestFramework\TestCase\AbstractBackendController; + +/** + * New condition html test + * + * Verify the request object contains the proper form object for condition + * @magentoAppArea adminhtml + */ +class NewConditionHtmlTest extends AbstractBackendController +{ + /** + * @var string + */ + protected $resource = 'Magento_SalesRule::quote'; + + /** + * @var string + */ + protected $uri = 'backend/sales_rule/promo_quote/newConditionHtml'; + + /** + * @var string + */ + private $formName = 'test_form'; + + /** + * @var string + */ + private $requestFormName = 'rule_conditions_fieldset_'; + + /** + * Test verifies that execute method has the proper data-form-part value in html response + * + * @return void + */ + public function testExecute(): void + { + $this->prepareRequest(); + $this->dispatch($this->uri); + $html = $this->getResponse() + ->getBody(); + $this->assertContains($this->formName, $html); + } + + /** + * @inheritdoc + */ + public function testAclHasAccess() + { + $this->prepareRequest(); + parent::testAclHasAccess(); + } + + /** + * @inheritdoc + */ + public function testAclNoAccess() + { + $this->prepareRequest(); + parent::testAclNoAccess(); + } + + /** + * Prepare request + * + * @return void + */ + private function prepareRequest(): void + { + $this->getRequest()->setParams( + [ + 'id' => 1, + 'form' => $this->requestFormName, + 'form_namespace' => $this->formName, + 'type' => 'Magento\SalesRule\Model\Rule\Condition\Product|category_ids', + ] + )->setMethod('POST'); + } +} From e3c2951cb7fe8c25afc3ad7ee8a8cda8c64422d0 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Wed, 11 Mar 2020 15:32:56 +0200 Subject: [PATCH 124/153] Fix mftf test --- .../Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml | 1 + .../Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml | 2 ++ .../Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml index 629599eba84fe..ab4502f3e9cfb 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml @@ -21,6 +21,7 @@ <element name="chooserBlock" type="block" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatches-visual-col .swatch_sub-menu_container" parameterized="true"/> <!-- Selector for Admin Description input where the index is zero-based --> <element name="swatchAdminDescriptionByIndex" type="input" selector="input[name='optiontext[value][option_{{index}}][0]']" parameterized="true"/> + <element name="swatchWindow" type="button" selector="#swatch_window_option_option_{{var}}" parameterized="true"/> <element name="nthChooseColor" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatch_row_name.colorpicker_handler" parameterized="true"/> <element name="nthUploadFile" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatch_row_name.btn_choose_file_upload" parameterized="true"/> <element name="nthDelete" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) button.delete-option" parameterized="true"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml index 0e24d63728d9d..5a78efcde33b7 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml @@ -53,6 +53,7 @@ <click selector="{{AdminManageSwatchSection.nthUploadFile('1')}}" stepKey="clickUploadFile1"/> <attachFile selector="input[name='datafile']" userInput="adobe-thumb.jpg" stepKey="attachFile1"/> <fillField selector="{{AdminManageSwatchSection.adminInputByIndex('0')}}" userInput="adobe-thumb" stepKey="fillAdmin1"/> + <click selector="{{AdminManageSwatchSection.swatchWindow('0')}}" stepKey="clicksWatchWindow1"/> <!-- Set swatch image #2 --> <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/> @@ -62,6 +63,7 @@ <click selector="{{AdminManageSwatchSection.nthUploadFile('2')}}" stepKey="clickUploadFile2"/> <attachFile selector="input[name='datafile']" userInput="adobe-small.jpg" stepKey="attachFile2"/> <fillField selector="{{AdminManageSwatchSection.adminInputByIndex('1')}}" userInput="adobe-small" stepKey="fillAdmin2"/> + <click selector="{{AdminManageSwatchSection.swatchWindow('1')}}" stepKey="clicksWatchWindow2"/> <!-- Set swatch image #3 --> <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch3"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml index 427797bdb09e2..39b3ca51327ba 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml @@ -55,6 +55,7 @@ <click selector="{{AdminManageSwatchSection.nthUploadFile('1')}}" stepKey="clickUploadFile1"/> <attachFile selector="input[name='datafile']" userInput="adobe-thumb.jpg" stepKey="attachFile1"/> <fillField selector="{{AdminManageSwatchSection.adminInputByIndex('0')}}" userInput="adobe-thumb" stepKey="fillAdmin1"/> + <click selector="{{AdminManageSwatchSection.swatchWindow('0')}}" stepKey="clicksWatchWindow1"/> <!-- Set swatch #2 image using the file upload --> <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/> From bff7a3990245a5677c6aabfeddddf47440895824 Mon Sep 17 00:00:00 2001 From: Nikita Shcherbatykh <nikita.shcherbatykh@transoftgroup.com> Date: Wed, 11 Mar 2020 15:41:30 +0200 Subject: [PATCH 125/153] MC-31878: [Magento Cloud] - Order bulk update using rest api --- .../Model/OperationRepositoryInterface.php | 4 ++-- .../Model/ResourceModel/Operation/OperationRepository.php | 2 +- app/code/Magento/WebapiAsync/Model/OperationRepository.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/AsynchronousOperations/Model/OperationRepositoryInterface.php b/app/code/Magento/AsynchronousOperations/Model/OperationRepositoryInterface.php index 945692fed7c99..601ab44af5023 100644 --- a/app/code/Magento/AsynchronousOperations/Model/OperationRepositoryInterface.php +++ b/app/code/Magento/AsynchronousOperations/Model/OperationRepositoryInterface.php @@ -24,8 +24,8 @@ interface OperationRepositoryInterface * '<arg2-name>' => '<arg2-value>', * ) * @param string $groupId - * @param int|null $operationId + * @param int $operationId * @return OperationInterface */ - public function create($topicName, $entityParams, $groupId, $operationId = null): OperationInterface; + public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface; } diff --git a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php index 40f776ad81099..5e42d0a2310b9 100644 --- a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php +++ b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php @@ -104,7 +104,7 @@ public function createByTopic($topicName, $entityParams, $groupId) /** * @inheritDoc */ - public function create($topicName, $entityParams, $groupId, $operationId = null): OperationInterface + public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface { return $this->createByTopic($topicName, $entityParams, $groupId); } diff --git a/app/code/Magento/WebapiAsync/Model/OperationRepository.php b/app/code/Magento/WebapiAsync/Model/OperationRepository.php index 05dab58b945c0..695cab2ae4402 100644 --- a/app/code/Magento/WebapiAsync/Model/OperationRepository.php +++ b/app/code/Magento/WebapiAsync/Model/OperationRepository.php @@ -70,7 +70,7 @@ public function __construct( /** * @inheritDoc */ - public function create($topicName, $entityParams, $groupId, $operationId = null): OperationInterface + public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface { $this->messageValidator->validate($topicName, $entityParams); $requestData = $this->inputParamsResolver->getInputData(); From 41562d0cc1c6a9e5a6d2a8159a37de1f6e744384 Mon Sep 17 00:00:00 2001 From: Piotr Markiewicz <piotr.markiewicz@vaimo.com> Date: Wed, 11 Mar 2020 15:35:56 +0100 Subject: [PATCH 126/153] Fixed namespace for Test classes --- .../Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php | 3 ++- .../Unit/Controller/Adminhtml/Export/File/DownloadTest.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php index c6c472c977c07..eb29907f8830d 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php @@ -5,7 +5,7 @@ */ declare(strict_types=1); -namespace Magento\ImportExport\Controller\Adminhtml\Export\File; +namespace Magento\ImportExport\Test\Unit\Controller\Adminhtml\Export\File; use Magento\Backend\App\Action\Context; use Magento\Backend\Model\View\Result\Redirect; @@ -17,6 +17,7 @@ use Magento\Framework\Filesystem\DriverInterface; use Magento\Framework\Message\ManagerInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use Magento\ImportExport\Controller\Adminhtml\Export\File\Delete; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php index 71f6940ad7a86..4312520cfefd1 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php @@ -5,7 +5,7 @@ */ declare(strict_types=1); -namespace Magento\ImportExport\Controller\Adminhtml\Export\File; +namespace Magento\ImportExport\Test\Unit\Controller\Adminhtml\Export\File; use Magento\Backend\App\Action\Context; use Magento\Backend\Model\View\Result\Redirect; @@ -17,6 +17,7 @@ use Magento\Framework\Filesystem\Directory\ReadInterface; use Magento\Framework\Message\ManagerInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use Magento\ImportExport\Controller\Adminhtml\Export\File\Download; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; From e4255ece861bed0db15ca80a0dd89860bafc027a Mon Sep 17 00:00:00 2001 From: Piotr Markiewicz <piotr.markiewicz@vaimo.com> Date: Wed, 11 Mar 2020 16:26:05 +0100 Subject: [PATCH 127/153] Fixed for static tests --- .../Unit/Controller/Adminhtml/Export/File/DeleteTest.php | 9 ++++++--- .../Controller/Adminhtml/Export/File/DownloadTest.php | 8 ++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php index eb29907f8830d..ef40651f95be9 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php @@ -122,7 +122,6 @@ protected function setUp() ->method('getMessageManager') ->willReturn($this->messageManagerMock); - $this->objectManagerHelper = new ObjectManagerHelper($this); $this->deleteControllerMock = $this->objectManagerHelper->getObject( Delete::class, @@ -143,7 +142,9 @@ public function testExecuteSuccess() ->with('filename') ->willReturn('sampleFile'); - $this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock)); + $this->fileSystemMock->expects($this->once()) + ->method('getDirectoryRead') + ->will($this->returnValue($this->directoryMock)); $this->directoryMock->expects($this->once())->method('isFile')->willReturn(true); $this->fileMock->expects($this->once())->method('deleteFile')->willReturn(true); $this->messageManagerMock->expects($this->once())->method('addSuccessMessage'); @@ -160,7 +161,9 @@ public function testExecuteFileDoesntExists() ->with('filename') ->willReturn('sampleFile'); - $this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock)); + $this->fileSystemMock->expects($this->once()) + ->method('getDirectoryRead') + ->will($this->returnValue($this->directoryMock)); $this->directoryMock->expects($this->once())->method('isFile')->willReturn(false); $this->messageManagerMock->expects($this->once())->method('addErrorMessage'); diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php index 4312520cfefd1..4512aa6365ca5 100644 --- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php +++ b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php @@ -151,7 +151,9 @@ public function testExecuteSuccess() ->with('filename') ->willReturn('sampleFile.csv'); - $this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock)); + $this->fileSystemMock->expects($this->once()) + ->method('getDirectoryRead') + ->will($this->returnValue($this->directoryMock)); $this->directoryMock->expects($this->once())->method('isFile')->willReturn(true); $this->fileFactoryMock->expects($this->once())->method('create'); @@ -167,7 +169,9 @@ public function testExecuteFileDoesntExists() ->with('filename') ->willReturn('sampleFile'); - $this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock)); + $this->fileSystemMock->expects($this->once()) + ->method('getDirectoryRead') + ->will($this->returnValue($this->directoryMock)); $this->directoryMock->expects($this->once())->method('isFile')->willReturn(false); $this->messageManagerMock->expects($this->once())->method('addErrorMessage'); From 8f2b7351a25b0f6b0edc61a68cb8568ff69feddc Mon Sep 17 00:00:00 2001 From: Navarr Barnier <navarr@mediotype.com> Date: Wed, 11 Mar 2020 13:39:16 -0400 Subject: [PATCH 128/153] Update Frontend Development Workflow type's comment to be clearer An implementor expressed confusion, thinking that the comment applied to the value displayed in the setting as opposed to the setting itself. This commit makes the meaning of the comment clearer - in that, rather than the setting not being available, it has no effect. --- app/code/Magento/Developer/etc/adminhtml/system.xml | 2 +- app/code/Magento/Developer/i18n/en_US.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Developer/etc/adminhtml/system.xml b/app/code/Magento/Developer/etc/adminhtml/system.xml index 10449ab428726..812776ba1da28 100644 --- a/app/code/Magento/Developer/etc/adminhtml/system.xml +++ b/app/code/Magento/Developer/etc/adminhtml/system.xml @@ -11,7 +11,7 @@ <label>Frontend Development Workflow</label> <field id="type" translate="label comment" type="select" sortOrder="1" showInDefault="1" canRestore="1"> <label>Workflow type</label> - <comment>Not available in production mode.</comment> + <comment>Modifying this configuration has no effect in production mode.</comment> <source_model>Magento\Developer\Model\Config\Source\WorkflowType</source_model> <frontend_model>Magento\Developer\Block\Adminhtml\System\Config\WorkflowType</frontend_model> <backend_model>Magento\Developer\Model\Config\Backend\WorkflowType</backend_model> diff --git a/app/code/Magento/Developer/i18n/en_US.csv b/app/code/Magento/Developer/i18n/en_US.csv index 59e67445b2b58..649779cdf853d 100644 --- a/app/code/Magento/Developer/i18n/en_US.csv +++ b/app/code/Magento/Developer/i18n/en_US.csv @@ -9,4 +9,4 @@ "Allowed IPs (comma separated)","Allowed IPs (comma separated)" "Leave empty for access from any location.","Leave empty for access from any location." "Log to File","Log to File" -"Not available in production mode.","Not available in production mode." +"Modifying this configuration has no effect in production mode.","Modifying this configuration has no effect in production mode." From 15dd3ec9747157281694d2ce65c20ed93ea69754 Mon Sep 17 00:00:00 2001 From: Daniel Renaud <drenaud@magento.com> Date: Wed, 11 Mar 2020 12:45:52 -0500 Subject: [PATCH 129/153] MC-29423: GraphQL Send Friend is still sending emails when disabled - use snake case for field names --- .../SendFriendGraphQl/etc/schema.graphqls | 2 +- .../GraphQl/SendFriend/StoreConfigTest.php | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls b/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls index 7dc28c54cf6ef..f4967779f3822 100644 --- a/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls +++ b/app/code/Magento/SendFriendGraphQl/etc/schema.graphqls @@ -39,7 +39,7 @@ type SendEmailToFriendRecipient { } type StoreConfig { - sendFriend: SendFriendConfiguration @resolver(class: "\\Magento\\SendFriendGraphQl\\Model\\Resolver\\SendFriendConfiguration") @doc(description: "Email to a Friend configuration.") + send_friend: SendFriendConfiguration @resolver(class: "\\Magento\\SendFriendGraphQl\\Model\\Resolver\\SendFriendConfiguration") @doc(description: "Email to a Friend configuration.") } type SendFriendConfiguration { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php index 73855f63a0945..e1c475d2ea059 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php @@ -20,11 +20,11 @@ public function testSendFriendFieldsAreReturnedWithoutError() $response = $this->graphQlQuery($query); $this->assertArrayNotHasKey('errors', $response); - $this->assertArrayHasKey('sendFriend', $response['storeConfig']); - $this->assertArrayHasKey('enabled_for_customers', $response['storeConfig']['sendFriend']); - $this->assertArrayHasKey('enabled_for_guests', $response['storeConfig']['sendFriend']); - $this->assertNotNull($response['storeConfig']['sendFriend']['enabled_for_customers']); - $this->assertNotNull($response['storeConfig']['sendFriend']['enabled_for_guests']); + $this->assertArrayHasKey('send_friend', $response['storeConfig']); + $this->assertArrayHasKey('enabled_for_customers', $response['storeConfig']['send_friend']); + $this->assertArrayHasKey('enabled_for_guests', $response['storeConfig']['send_friend']); + $this->assertNotNull($response['storeConfig']['send_friend']['enabled_for_customers']); + $this->assertNotNull($response['storeConfig']['send_friend']['enabled_for_guests']); } /** @@ -77,11 +77,11 @@ public function testSendFriendEnabledGuestEnabled() private function assertResponse(array $expectedValues, array $response) { $this->assertArrayNotHasKey('errors', $response); - $this->assertArrayHasKey('sendFriend', $response['storeConfig']); - $this->assertArrayHasKey('enabled_for_customers', $response['storeConfig']['sendFriend']); - $this->assertArrayHasKey('enabled_for_guests', $response['storeConfig']['sendFriend']); - $this->assertEquals($expectedValues['enabled_for_customers'], $response['storeConfig']['sendFriend']['enabled_for_customers']); - $this->assertEquals($expectedValues['enabled_for_guests'], $response['storeConfig']['sendFriend']['enabled_for_guests']); + $this->assertArrayHasKey('send_friend', $response['storeConfig']); + $this->assertArrayHasKey('enabled_for_customers', $response['storeConfig']['send_friend']); + $this->assertArrayHasKey('enabled_for_guests', $response['storeConfig']['send_friend']); + $this->assertEquals($expectedValues['enabled_for_customers'], $response['storeConfig']['send_friend']['enabled_for_customers']); + $this->assertEquals($expectedValues['enabled_for_guests'], $response['storeConfig']['send_friend']['enabled_for_guests']); } /** @@ -95,7 +95,7 @@ private function getStoreConfigQuery() { storeConfig{ id - sendFriend { + send_friend { enabled_for_customers enabled_for_guests } From 7aa945b656baecaf231953b3e29ffab98e2f4708 Mon Sep 17 00:00:00 2001 From: Vasya Tsviklinskyi <tsviklinskyi@gmail.com> Date: Wed, 11 Mar 2020 19:48:28 +0200 Subject: [PATCH 130/153] MC-32223: JS bug in validate date of birth input on 2.3.4 --- app/code/Magento/Customer/view/frontend/web/js/validation.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Customer/view/frontend/web/js/validation.js b/app/code/Magento/Customer/view/frontend/web/js/validation.js index 67a714212026a..573556f0f33a2 100644 --- a/app/code/Magento/Customer/view/frontend/web/js/validation.js +++ b/app/code/Magento/Customer/view/frontend/web/js/validation.js @@ -2,6 +2,7 @@ define([ 'jquery', 'moment', 'jquery/validate', + 'validation', 'mage/translate' ], function ($, moment) { 'use strict'; From 53da3670a98b000d893c560ae1cf18b1d795dc44 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Thu, 12 Mar 2020 01:14:39 +0100 Subject: [PATCH 131/153] Deprecate `AdminLoginTest`, introduce `AdminLoginSuccessfulTest` --- .../Test/Mftf/Test/AdminLoginFailedTest.xml | 28 +++++++++++++++++++ .../Mftf/Test/AdminLoginSuccessfulTest.xml | 27 ++++++++++++++++++ .../Backend/Test/Mftf/Test/AdminLoginTest.xml | 2 +- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Backend/Test/Mftf/Test/AdminLoginFailedTest.xml create mode 100644 app/code/Magento/Backend/Test/Mftf/Test/AdminLoginSuccessfulTest.xml diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginFailedTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginFailedTest.xml new file mode 100644 index 0000000000000..1239fc471f59e --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginFailedTest.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminLoginFailedTest"> + <annotations> + <features value="Backend"/> + <stories value="Login on the Admin Login page"/> + <title value="Admin should not be able to log into the backend with invalid credentials"/> + <description value="Admin should not be able to log into the backend with invalid credentials"/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-71572"/> + <group value="example"/> + <group value="login"/> + </annotations> + + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"> + <argument name="password" value="INVALID!{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> + </actionGroup> + <actionGroup ref="AssertMessageOnAdminLoginActionGroup" stepKey="assertErrorMessage"/> + </test> +</tests> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginSuccessfulTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginSuccessfulTest.xml new file mode 100644 index 0000000000000..a8de04f4342de --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginSuccessfulTest.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminLoginSuccessfulTest"> + <annotations> + <features value="Backend"/> + <stories value="Login on the Admin Login page"/> + <title value="Admin should be able to log into the Magento Admin backend successfully"/> + <description value="Admin should be able to log into the Magento Admin backend successfully"/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-71572"/> + <group value="example"/> + <group value="login"/> + </annotations> + + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="assertLoggedIn"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> + </test> +</tests> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml index 566328e075600..5f916063cfd1d 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml @@ -8,7 +8,7 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminLoginTest"> + <test name="AdminLoginTest" deprecated="Replaced with AdminLoginSuccessfulTest"> <annotations> <features value="Backend"/> <stories value="Login on the Admin Login page"/> From aa6d0d9f0beaded06eb6fad1fe8689a2a076fa25 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Thu, 12 Mar 2020 01:17:48 +0100 Subject: [PATCH 132/153] Replace deprecated reference to Action Group --- app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml index 5f916063cfd1d..09893f5f51e5e 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml @@ -20,7 +20,7 @@ <group value="login"/> </annotations> - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <seeInCurrentUrl url="{{AdminLoginPage.url}}" stepKey="seeAdminLoginUrl"/> <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </test> From 39ade1f9791606927a37386d08a96105e4d18613 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Thu, 12 Mar 2020 09:48:15 +0200 Subject: [PATCH 133/153] added webapi test --- .../Guest/AddSimpleProductToCartTest.php | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php index 01ae565f00bf6..3bdce6ea98b30 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php @@ -10,6 +10,7 @@ use Exception; use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId; use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\TestCase\GraphQl\ResponseContainsErrorsException; use Magento\TestFramework\TestCase\GraphQlAbstract; /** @@ -79,6 +80,30 @@ public function testAddSimpleProductToCart() self::assertEquals('USD', $rowTotalIncludingTax['currency']); } + /** + * Add out of stock product to cart + * + * @@magentoApiDataFixture Magento/Catalog/_files/multiple_products.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @return void + */ + public function testAddProductToCartWithError(): void + { + $disabledProductSku = 'simple3'; + $quantity = 2; + + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $query = $this->getQuery($maskedQuoteId, $disabledProductSku, $quantity); + + $this->expectException(ResponseContainsErrorsException::class); + $this->expectExceptionMessage( + 'Could not add the product with SKU simple3 to the shopping cart: ' . + 'Product that you are trying to add is not available.' + ); + + $this->graphQlMutation($query); + } + /** * @expectedException Exception * @expectedExceptionMessage Required parameter "cart_id" is missing @@ -191,7 +216,7 @@ public function testAddSimpleProductToCustomerCart() private function getQuery(string $maskedQuoteId, string $sku, float $quantity): string { return <<<QUERY -mutation { +mutation { addSimpleProductsToCart( input: { cart_id: "{$maskedQuoteId}" From 9b178d0fbb4f3722680cb9f5c98c3a5ce99c878c Mon Sep 17 00:00:00 2001 From: Serhii Balko <serhii.balko@transoftgroup.com> Date: Thu, 12 Mar 2020 10:34:20 +0200 Subject: [PATCH 134/153] MC-31945: New customer creation via the admin does not honor default customer group --- .../Model/AttributeMetadataResolver.php | 40 ++++- .../Model/AttributeMetadataResolverTest.php | 166 ++++++++++++++++++ 2 files changed, 198 insertions(+), 8 deletions(-) create mode 100644 app/code/Magento/Customer/Test/Unit/Model/AttributeMetadataResolverTest.php diff --git a/app/code/Magento/Customer/Model/AttributeMetadataResolver.php b/app/code/Magento/Customer/Model/AttributeMetadataResolver.php index c936de1bd0230..27c5f77674577 100644 --- a/app/code/Magento/Customer/Model/AttributeMetadataResolver.php +++ b/app/code/Magento/Customer/Model/AttributeMetadataResolver.php @@ -6,17 +6,17 @@ */ namespace Magento\Customer\Model; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Model\Config\Share as ShareConfig; use Magento\Customer\Model\ResourceModel\Address\Attribute\Source\CountryWithWebsites; +use Magento\Eav\Api\Data\AttributeInterface; use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; -use Magento\Customer\Api\Data\AddressInterface; -use Magento\Ui\DataProvider\EavValidationRules; -use Magento\Ui\Component\Form\Field; use Magento\Eav\Model\Entity\Type; -use Magento\Eav\Api\Data\AttributeInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\View\Element\UiComponent\ContextInterface; -use Magento\Customer\Api\Data\CustomerInterface; -use Magento\Customer\Model\Config\Share as ShareConfig; -use Magento\Customer\Model\FileUploaderDataResolver; +use Magento\Ui\Component\Form\Field; +use Magento\Ui\DataProvider\EavValidationRules; /** * Class to build meta data of the customer or customer address attribute @@ -75,25 +75,33 @@ class AttributeMetadataResolver */ private $shareConfig; + /** + * @var GroupManagement + */ + private $groupManagement; + /** * @param CountryWithWebsites $countryWithWebsiteSource * @param EavValidationRules $eavValidationRules * @param FileUploaderDataResolver $fileUploaderDataResolver * @param ContextInterface $context * @param ShareConfig $shareConfig + * @param GroupManagement|null $groupManagement */ public function __construct( CountryWithWebsites $countryWithWebsiteSource, EavValidationRules $eavValidationRules, FileUploaderDataResolver $fileUploaderDataResolver, ContextInterface $context, - ShareConfig $shareConfig + ShareConfig $shareConfig, + ?GroupManagement $groupManagement = null ) { $this->countryWithWebsiteSource = $countryWithWebsiteSource; $this->eavValidationRules = $eavValidationRules; $this->fileUploaderDataResolver = $fileUploaderDataResolver; $this->context = $context; $this->shareConfig = $shareConfig; + $this->groupManagement = $groupManagement ?? ObjectManager::getInstance()->get(GroupManagement::class); } /** @@ -111,6 +119,7 @@ public function getAttributesMeta( bool $allowToShowHiddenAttributes ): array { $meta = $this->modifyBooleanAttributeMeta($attribute); + $this->modifyGroupAttributeMeta($attribute); // use getDataUsingMethod, since some getters are defined and apply additional processing of returning value foreach (self::$metaProperties as $metaName => $origName) { $value = $attribute->getDataUsingMethod($origName); @@ -196,6 +205,21 @@ private function modifyBooleanAttributeMeta(AttributeInterface $attribute): arra return $meta; } + /** + * Modify group attribute meta data + * + * @param AttributeInterface $attribute + * @return void + */ + private function modifyGroupAttributeMeta(AttributeInterface $attribute): void + { + if ($attribute->getAttributeCode() === 'group_id') { + $defaultGroup = $this->groupManagement->getDefaultGroup(); + $defaultGroupId = !empty($defaultGroup) ? $defaultGroup->getId() : null; + $attribute->setDataUsingMethod(self::$metaProperties['default'], $defaultGroupId); + } + } + /** * Add global scope parameter and filter options to website meta * diff --git a/app/code/Magento/Customer/Test/Unit/Model/AttributeMetadataResolverTest.php b/app/code/Magento/Customer/Test/Unit/Model/AttributeMetadataResolverTest.php new file mode 100644 index 0000000000000..aef9d8ca40e85 --- /dev/null +++ b/app/code/Magento/Customer/Test/Unit/Model/AttributeMetadataResolverTest.php @@ -0,0 +1,166 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Test\Unit\Model; + +use Magento\Customer\Model\Attribute; +use Magento\Customer\Model\AttributeMetadataResolver; +use Magento\Customer\Model\Config\Share as ShareConfig; +use Magento\Customer\Model\FileUploaderDataResolver; +use Magento\Customer\Model\GroupManagement; +use Magento\Customer\Model\ResourceModel\Address\Attribute\Source\CountryWithWebsites; +use Magento\Eav\Model\Entity\Type; +use Magento\Framework\View\Element\UiComponent\ContextInterface; +use Magento\Ui\DataProvider\EavValidationRules; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Class AttributeMetadataResolverTest + * + * Validate attributeMetadata contains correct values in meta data array + */ +class AttributeMetadataResolverTest extends TestCase +{ + /** + * @var CountryWithWebsites|MockObject + */ + private $countryWithWebsiteSource; + + /** + * @var EavValidationRules|MockObject + */ + private $eavValidationRules; + + /** + * @var FileUploaderDataResolver|MockObject + */ + private $fileUploaderDataResolver; + + /** + * @var ShareConfig|MockObject + */ + private $shareConfig; + + /** + * @var GroupManagement|MockObject + */ + private $groupManagement; + + /** + * @var ContextInterface|MockObject + */ + private $context; + + /** + * @var AttributeMetadataResolver + */ + private $model; + + /** + * @var Attribute|MockObject + */ + private $attribute; + + /** + * @inheritdoc + */ + public function setUp() + { + $this->countryWithWebsiteSource = $this->getMockBuilder(CountryWithWebsites::class) + ->setMethods(['getAllOptions']) + ->disableOriginalConstructor() + ->getMock(); + $this->eavValidationRules = $this->getMockBuilder(EavValidationRules::class) + ->setMethods(['build']) + ->disableOriginalConstructor() + ->getMock(); + $this->fileUploaderDataResolver = $this->getMockBuilder(FileUploaderDataResolver::class) + ->setMethods(['overrideFileUploaderMetadata']) + ->disableOriginalConstructor() + ->getMock(); + $this->context = $this->getMockBuilder(ContextInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $this->shareConfig = $this->getMockBuilder(ShareConfig::class) + ->disableOriginalConstructor() + ->getMock(); + $this->groupManagement = $this->getMockBuilder(GroupManagement::class) + ->setMethods(['getId', 'getDefaultGroup']) + ->disableOriginalConstructor() + ->getMock(); + $this->attribute = $this->getMockBuilder(Attribute::class) + ->setMethods([ + 'usesSource', + 'getDataUsingMethod', + 'getAttributeCode', + 'getFrontendInput', + 'getSource', + 'setDataUsingMethod' + ]) + ->disableOriginalConstructor() + ->getMock(); + + $this->model = new AttributeMetadataResolver( + $this->countryWithWebsiteSource, + $this->eavValidationRules, + $this->fileUploaderDataResolver, + $this->context, + $this->shareConfig, + $this->groupManagement + ); + } + + /** + * Test to get meta data of the customer or customer address attribute + * + * @return void + */ + public function testGetAttributesMetaHasDefaultAttributeValue(): void + { + $rules = [ + 'required-entry' => true + ]; + $defaultGroupId = '3'; + $allowToShowHiddenAttributes = false; + $usesSource = false; + $entityType = $this->getMockBuilder(Type::class) + ->disableOriginalConstructor() + ->getMock(); + $this->attribute->expects($this->once()) + ->method('usesSource') + ->willReturn($usesSource); + $this->attribute->expects($this->once()) + ->method('getAttributeCode') + ->willReturn('group_id'); + $this->groupManagement->expects($this->once()) + ->method('getDefaultGroup') + ->willReturnSelf(); + $this->groupManagement->expects($this->once()) + ->method('getId') + ->willReturn($defaultGroupId); + $this->attribute->expects($this->at(9)) + ->method('getDataUsingMethod') + ->with('default_value') + ->willReturn($defaultGroupId); + $this->attribute->expects($this->once()) + ->method('setDataUsingMethod') + ->willReturnSelf(); + $this->eavValidationRules->expects($this->once()) + ->method('build') + ->with($this->attribute) + ->willReturn($rules); + $this->fileUploaderDataResolver->expects($this->once()) + ->method('overrideFileUploaderMetadata') + ->with($entityType, $this->attribute) + ->willReturnSelf(); + + $meta = $this->model->getAttributesMeta($this->attribute, $entityType, $allowToShowHiddenAttributes); + $this->assertArrayHasKey('default', $meta['arguments']['data']['config']); + $this->assertEquals($defaultGroupId, $meta['arguments']['data']['config']['default']); + } +} From d81d1d451bb7f10492d249e2c0c70e9d8d1df905 Mon Sep 17 00:00:00 2001 From: Vaha <vaha@atwix.com> Date: Thu, 12 Mar 2020 11:30:25 +0200 Subject: [PATCH 135/153] added product list price modifier to modify price attributes data to price format --- .../AssertAdminProductGridCellActionGroup.xml | 23 ++++ ...dminProductGridColumnOptionActionGroup.xml | 21 ++++ ...learFiltersAdminProductGridActionGroup.xml | 19 ++++ ...esetAdminProductGridColumnsActionGroup.xml | 18 +++ ...nProductGridColumnsDropdownActionGroup.xml | 18 +++ .../Test/Mftf/Data/CustomAttributeData.xml | 8 ++ .../Catalog/Test/Mftf/Data/ProductData.xml | 4 + .../Mftf/Section/AdminProductGridSection.xml | 2 +- ...minCheckProductListPriceAttributesTest.xml | 64 +++++++++++ .../Product/Modifier/PriceAttributes.php | 105 ++++++++++++++++++ app/code/Magento/Catalog/etc/adminhtml/di.xml | 12 ++ .../Test/Mftf/Data/CustomAttributeData.xml | 14 +++ .../Msrp/Test/Mftf/Data/ProductData.xml | 16 +++ ...minCheckProductListPriceAttributesTest.xml | 29 +++++ app/code/Magento/Msrp/etc/adminhtml/di.xml | 7 ++ 15 files changed, 359 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertAdminProductGridCellActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckAdminProductGridColumnOptionActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/ClearFiltersAdminProductGridActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/ResetAdminProductGridColumnsActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/ToggleAdminProductGridColumnsDropdownActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml create mode 100644 app/code/Magento/Catalog/Ui/DataProvider/Product/Modifier/PriceAttributes.php create mode 100644 app/code/Magento/Msrp/Test/Mftf/Data/CustomAttributeData.xml create mode 100644 app/code/Magento/Msrp/Test/Mftf/Data/ProductData.xml create mode 100644 app/code/Magento/Msrp/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertAdminProductGridCellActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertAdminProductGridCellActionGroup.xml new file mode 100644 index 0000000000000..724c852e7b0be --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AssertAdminProductGridCellActionGroup.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AssertAdminProductGridCellActionGroup"> + <annotations> + <description>Checks value for Admin Product Grid cell by provided row and column.</description> + </annotations> + <arguments> + <argument name="row" type="string" defaultValue="1"/> + <argument name="column" type="string" defaultValue="Name"/> + <argument name="value" type="string" defaultValue="1"/> + </arguments> + + <see selector="{{AdminProductGridSection.productGridCell(row,column)}}" userInput="{{value}}" stepKey="seeProductGridCellWithProvidedValue"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckAdminProductGridColumnOptionActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckAdminProductGridColumnOptionActionGroup.xml new file mode 100644 index 0000000000000..dc10933150617 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckAdminProductGridColumnOptionActionGroup.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="CheckAdminProductGridColumnOptionActionGroup"> + <annotations> + <description>Checks Admin Product Grid 'Columns' option.</description> + </annotations> + <arguments> + <argument name="optionName" type="string" defaultValue="Name"/> + </arguments> + + <checkOption selector="{{AdminProductGridFilterSection.viewColumnOption(optionName)}}" stepKey="checkColumn"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ClearFiltersAdminProductGridActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ClearFiltersAdminProductGridActionGroup.xml new file mode 100644 index 0000000000000..fb75b65120287 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ClearFiltersAdminProductGridActionGroup.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="ClearFiltersAdminProductGridActionGroup"> + <annotations> + <description>Clicks on 'Clear Filters'.</description> + </annotations> + + <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> + <waitForPageLoad stepKey="waitForGridLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ResetAdminProductGridColumnsActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ResetAdminProductGridColumnsActionGroup.xml new file mode 100644 index 0000000000000..8e10da66a83af --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ResetAdminProductGridColumnsActionGroup.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="ResetAdminProductGridColumnsActionGroup"> + <annotations> + <description>Clicks 'reset' for Admin Product Grid 'Columns' dropdown.</description> + </annotations> + + <click selector="{{AdminProductGridFilterSection.resetGridColumns}}" stepKey="resetProductGridColumns"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ToggleAdminProductGridColumnsDropdownActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ToggleAdminProductGridColumnsDropdownActionGroup.xml new file mode 100644 index 0000000000000..783c05797c6e1 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/ToggleAdminProductGridColumnsDropdownActionGroup.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="ToggleAdminProductGridColumnsDropdownActionGroup"> + <annotations> + <description>Toggles Admin Product Grid 'Columns' dropdown.</description> + </annotations> + + <click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="toggleColumnsDropdown"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml index 1effb4ed0664e..9b35ceba0494c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml @@ -31,6 +31,14 @@ <data key="attribute_code">short_description</data> <data key="value" unique="suffix">API Product Short Description</data> </entity> + <entity name="ApiProductSpecialPrice" type="custom_attribute"> + <data key="attribute_code">special_price</data> + <data key="value">51.51</data> + </entity> + <entity name="ApiProductCost" type="custom_attribute"> + <data key="attribute_code">cost</data> + <data key="value">50.05</data> + </entity> <entity name="ApiProductNewsFromDate" type="custom_attribute"> <data key="attribute_code">news_from_date</data> <data key="value">2018-05-17 00:00:00</data> diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml index a44db8010a822..a4439e34fbfca 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml @@ -175,6 +175,10 @@ <data key="status">1</data> <data key="quantity">0</data> </entity> + <entity name="SimpleOutOfStockProductWithSpecialPriceAndCost" type="product" extends="SimpleOutOfStockProduct"> + <requiredEntity type="custom_attribute_array">ApiProductSpecialPrice</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductCost</requiredEntity> + </entity> <entity name="SimpleProductInStockQuantityZero" type="product"> <data key="name" unique="suffix">SimpleProductInStockQuantityZero</data> <data key="sku" unique="suffix">testSku</data> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml index 07dd26381fe08..1aff1a5031413 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml @@ -21,7 +21,7 @@ <element name="firstProductRowEditButton" type="button" selector="table.data-grid tr.data-row td .action-menu-item:first-of-type"/> <element name="productThumbnail" type="text" selector="table.data-grid tr:nth-child({{row}}) td.data-grid-thumbnail-cell > img" parameterized="true"/> <element name="productThumbnailBySrc" type="text" selector="img.admin__control-thumbnail[src*='{{pattern}}']" parameterized="true"/> - <element name="productGridCell" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{column}}')]/preceding-sibling::th) +1 ]" parameterized="true"/> + <element name="productGridCell" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[normalize-space(.)='{{column}}']/preceding-sibling::th) +1 ]" parameterized="true"/> <element name="productGridHeaderCell" type="text" selector="//div[@data-role='grid-wrapper']//tr//th[contains(., '{{column}}')]" parameterized="true"/> <element name="multicheckDropdown" type="button" selector="div[data-role='grid-wrapper'] th.data-grid-multicheck-cell button.action-multicheck-toggle"/> <element name="multicheckOption" type="button" selector="//div[@data-role='grid-wrapper']//th[contains(@class, data-grid-multicheck-cell)]//li//span[text() = '{{label}}']" parameterized="true"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml new file mode 100644 index 0000000000000..f2d6d9442fb18 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCheckProductListPriceAttributesTest"> + <annotations> + <stories value="Check price attributes values on Admin Product List"/> + <title value="Check price attributes values on Admin Product List."/> + <description value="Login as admin, create simple product, add cost, special price. Go to Admin + Product List page filter grid by created product, add mentioned columns to grid, check values."/> + <group value="catalog"/> + </annotations> + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> + <createData entity="SimpleOutOfStockProductWithSpecialPriceAndCost" stepKey="createSimpleProduct"/> + + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="adminOpenProductIndexPage"/> + <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridByCreatedSimpleProductSku"> + <argument name="product" value="$$createSimpleProduct$$"/> + </actionGroup> + </before> + <after> + <actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearFiltersAdminProductGrid"/> + <actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="openToResetColumnsDropdown"/> + <actionGroup ref="ResetAdminProductGridColumnsActionGroup" stepKey="resetAdminProductGridColumns"/> + + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <actionGroup ref="logout" stepKey="logout"/> + <!-- Reindex invalidated indices after product attribute has been created/deleted --> + <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> + </after> + + <actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="openColumnsDropdown"/> + <actionGroup ref="CheckAdminProductGridColumnOptionActionGroup" stepKey="checkSpecialPriceOption"> + <argument name="optionName" value="Special Price"/> + </actionGroup> + <actionGroup ref="CheckAdminProductGridColumnOptionActionGroup" stepKey="checkCostOption"> + <argument name="optionName" value="Cost"/> + </actionGroup> + <actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="closeColumnsDropdown"/> + + <actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seePrice"> + <argument name="row" value="1"/> + <argument name="column" value="Price"/> + <argument name="value" value="${{SimpleOutOfStockProduct.price}}"/> + </actionGroup> + <actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeCorrectSpecialPrice"> + <argument name="row" value="1"/> + <argument name="column" value="Special Price"/> + <argument name="value" value="${{ApiProductSpecialPrice.value}}"/> + </actionGroup> + <actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeCorrectCost"> + <argument name="row" value="1"/> + <argument name="column" value="Cost"/> + <argument name="value" value="${{ApiProductCost.value}}"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Modifier/PriceAttributes.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Modifier/PriceAttributes.php new file mode 100644 index 0000000000000..7f333441dab34 --- /dev/null +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Modifier/PriceAttributes.php @@ -0,0 +1,105 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Ui\DataProvider\Product\Modifier; + +use Magento\Framework\Currency; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Locale\CurrencyInterface; +use Magento\Store\Api\Data\StoreInterface; +use Magento\Store\Model\StoreManagerInterface; +use Magento\Ui\DataProvider\Modifier\ModifierInterface; + +/** + * Modify product listing price attributes + */ +class PriceAttributes implements ModifierInterface +{ + /** + * @var array + */ + private $priceAttributeList; + + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @var CurrencyInterface + */ + private $localeCurrency; + + /** + * PriceAttributes constructor. + * + * @param StoreManagerInterface $storeManager + * @param CurrencyInterface $localeCurrency + * @param array $priceAttributeList + */ + public function __construct( + StoreManagerInterface $storeManager, + CurrencyInterface $localeCurrency, + array $priceAttributeList = [] + ) { + $this->storeManager = $storeManager; + $this->localeCurrency = $localeCurrency; + $this->priceAttributeList = $priceAttributeList; + } + + /** + * @inheritdoc + */ + public function modifyData(array $data): array + { + if (empty($data) || empty($this->priceAttributeList)) { + return $data; + } + + foreach ($data['items'] as &$item) { + foreach ($this->priceAttributeList as $priceAttribute) { + if (isset($item[$priceAttribute])) { + $item[$priceAttribute] = $this->getCurrency()->toCurrency(sprintf("%f", $item[$priceAttribute])); + } + } + } + + return $data; + } + + /** + * @inheritdoc + */ + public function modifyMeta(array $meta): array + { + return $meta; + } + + /** + * Retrieve store + * + * @return StoreInterface + * @throws NoSuchEntityException + */ + private function getStore(): StoreInterface + { + return $this->storeManager->getStore(); + } + + /** + * Retrieve currency + * + * @return Currency + * @throws NoSuchEntityException + */ + private function getCurrency(): Currency + { + $baseCurrencyCode = $this->getStore()->getBaseCurrencyCode(); + + return $this->localeCurrency->getCurrency($baseCurrencyCode); + } +} diff --git a/app/code/Magento/Catalog/etc/adminhtml/di.xml b/app/code/Magento/Catalog/etc/adminhtml/di.xml index 4f905cd85f3d1..7d74ab38a8560 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/di.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/di.xml @@ -177,6 +177,10 @@ <item name="class" xsi:type="string">Magento\Catalog\Ui\DataProvider\Product\Modifier\Attributes</item> <item name="sortOrder" xsi:type="number">10</item> </item> + <item name="priceAttributes" xsi:type="array"> + <item name="class" xsi:type="string">Magento\Catalog\Ui\DataProvider\Product\Modifier\PriceAttributes</item> + <item name="sortOrder" xsi:type="number">10</item> + </item> </argument> </arguments> </virtualType> @@ -188,6 +192,14 @@ </argument> </arguments> </type> + <type name="Magento\Catalog\Ui\DataProvider\Product\Modifier\PriceAttributes"> + <arguments> + <argument name="priceAttributeList" xsi:type="array"> + <item name="cost" xsi:type="string">cost</item> + <item name="special_price" xsi:type="string">special_price</item> + </argument> + </arguments> + </type> <type name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\CustomOptions"> <arguments> <argument name="scopeName" xsi:type="string">product_form.product_form</argument> diff --git a/app/code/Magento/Msrp/Test/Mftf/Data/CustomAttributeData.xml b/app/code/Magento/Msrp/Test/Mftf/Data/CustomAttributeData.xml new file mode 100644 index 0000000000000..6f620c8f9aa7f --- /dev/null +++ b/app/code/Magento/Msrp/Test/Mftf/Data/CustomAttributeData.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="ApiProductMsrp" type="custom_attribute"> + <data key="attribute_code">msrp</data> + <data key="value">111.11</data> + </entity> +</entities> diff --git a/app/code/Magento/Msrp/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Msrp/Test/Mftf/Data/ProductData.xml new file mode 100644 index 0000000000000..aa79b6032df4b --- /dev/null +++ b/app/code/Magento/Msrp/Test/Mftf/Data/ProductData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="SimpleOutOfStockProductWithSpecialPriceCostAndMsrp" type="product" extends="SimpleOutOfStockProduct"> + <requiredEntity type="custom_attribute_array">ApiProductSpecialPrice</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductCost</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductMsrp</requiredEntity> + </entity> +</entities> diff --git a/app/code/Magento/Msrp/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml b/app/code/Magento/Msrp/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml new file mode 100644 index 0000000000000..874edf0dff9e3 --- /dev/null +++ b/app/code/Magento/Msrp/Test/Mftf/Test/AdminCheckProductListPriceAttributesTest.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCheckProductListPriceAttributesTest"> + <annotations> + <group value="msrp"/> + </annotations> + <before> + <createData entity="SimpleOutOfStockProductWithSpecialPriceCostAndMsrp" stepKey="createSimpleProduct"/> + </before> + + <actionGroup ref="CheckAdminProductGridColumnOptionActionGroup" stepKey="checkMsrpOption" after="checkCostOption"> + <argument name="optionName" value="Minimum Advertised Price"/> + </actionGroup> + + <actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeCorrectMsrp" after="seeCorrectCost"> + <argument name="row" value="1"/> + <argument name="column" value="Minimum Advertised Price"/> + <argument name="value" value="${{ApiProductMsrp.value}}"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Msrp/etc/adminhtml/di.xml b/app/code/Magento/Msrp/etc/adminhtml/di.xml index 6126e9132cd7a..d517bd0aa4e7f 100644 --- a/app/code/Magento/Msrp/etc/adminhtml/di.xml +++ b/app/code/Magento/Msrp/etc/adminhtml/di.xml @@ -19,4 +19,11 @@ </argument> </arguments> </virtualType> + <type name="Magento\Catalog\Ui\DataProvider\Product\Modifier\PriceAttributes"> + <arguments> + <argument name="priceAttributeList" xsi:type="array"> + <item name="msrp" xsi:type="string">msrp</item> + </argument> + </arguments> + </type> </config> From f7819a64af4ce9789fa86a71948870eaccbf8c95 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Thu, 12 Mar 2020 12:18:45 +0200 Subject: [PATCH 136/153] Added an error logging --- .../Controller/Adminhtml/Order/Create/Reorder.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php index 925e8bfdd05aa..eeaf4bee1b1c2 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Create/Reorder.php @@ -20,6 +20,7 @@ use Magento\Sales\Helper\Reorder as ReorderHelper; use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Reorder\UnavailableProductsProvider; +use Psr\Log\LoggerInterface; /** * Controller create order. @@ -41,6 +42,11 @@ class Reorder extends Create implements HttpGetActionInterface */ private $reorderHelper; + /** + * @var LoggerInterface + */ + private $logger; + /** * @param Action\Context $context * @param Product $productHelper @@ -50,6 +56,7 @@ class Reorder extends Create implements HttpGetActionInterface * @param UnavailableProductsProvider $unavailableProductsProvider * @param OrderRepositoryInterface $orderRepository * @param ReorderHelper $reorderHelper + * @param LoggerInterface $logger */ public function __construct( Action\Context $context, @@ -59,11 +66,13 @@ public function __construct( ForwardFactory $resultForwardFactory, UnavailableProductsProvider $unavailableProductsProvider, OrderRepositoryInterface $orderRepository, - ReorderHelper $reorderHelper + ReorderHelper $reorderHelper, + LoggerInterface $logger ) { $this->unavailableProductsProvider = $unavailableProductsProvider; $this->orderRepository = $orderRepository; $this->reorderHelper = $reorderHelper; + $this->logger = $logger; parent::__construct( $context, $productHelper, @@ -110,9 +119,11 @@ public function execute() $this->_getOrderCreateModel()->initFromOrder($order); $resultRedirect->setPath('sales/*'); } catch (\Magento\Framework\Exception\LocalizedException $e) { + $this->logger->critical($e); $this->messageManager->addErrorMessage($e->getMessage()); return $resultRedirect->setPath('sales/*'); } catch (\Exception $e) { + $this->logger->critical($e); $this->messageManager->addException($e, __('Error while processing order.')); return $resultRedirect->setPath('sales/*'); } From 983a2fb56fe89bf62cf0e57ba60b60ff1b1414aa Mon Sep 17 00:00:00 2001 From: "rostyslav.hymon" <rostyslav.hymon@transoftgroup.com> Date: Thu, 12 Mar 2020 12:44:29 +0200 Subject: [PATCH 137/153] MC-32152: Backend cart in customer detail view --- .../Block/Adminhtml/Edit/Tab/Cart.php | 130 ++++++++++++++---- .../Controller/Adminhtml/Index/Cart.php | 120 ++++++++++------ .../tab/cart_website_filter_form.phtml | 10 ++ .../Block/Adminhtml/Edit/Tab/CartsTest.php | 4 +- .../Controller/Adminhtml/IndexTest.php | 2 +- 5 files changed, 195 insertions(+), 71 deletions(-) create mode 100644 app/code/Magento/Customer/view/adminhtml/templates/tab/cart_website_filter_form.phtml diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php index ec4bd93ee4ff0..656a78d1165e3 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php @@ -5,37 +5,51 @@ */ namespace Magento\Customer\Block\Adminhtml\Edit\Tab; -use Magento\Catalog\Model\Product; +use Magento\Backend\Block\Template\Context; +use Magento\Backend\Block\Widget\Form; +use Magento\Backend\Block\Widget\Grid\Extended; +use Magento\Backend\Helper\Data; +use Magento\Customer\Block\Adminhtml\Edit\Tab\View\Grid\Renderer\Item; +use Magento\Customer\Block\Adminhtml\Grid\Renderer\Multiaction; use Magento\Customer\Controller\RegistryConstants; -use Magento\Directory\Model\Currency; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\Data\CollectionFactory; +use Magento\Framework\Data\FormFactory; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Registry; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Model\Quote; +use Magento\Quote\Model\QuoteFactory; +use Magento\Store\Model\System\Store as SystemStore; /** * Adminhtml customer orders grid block * * @api * @since 100.0.2 + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Cart extends \Magento\Backend\Block\Widget\Grid\Extended +class Cart extends Extended { /** * Core registry * - * @var \Magento\Framework\Registry + * @var Registry */ protected $_coreRegistry = null; /** - * @var \Magento\Framework\Data\CollectionFactory + * @var CollectionFactory */ protected $_dataCollectionFactory; /** - * @var \Magento\Quote\Api\CartRepositoryInterface + * @var CartRepositoryInterface */ protected $quoteRepository; /** - * @var \Magento\Quote\Model\Quote + * @var Quote */ protected $quote = null; @@ -45,32 +59,46 @@ class Cart extends \Magento\Backend\Block\Widget\Grid\Extended protected $_parentTemplate; /** - * @var \Magento\Quote\Model\QuoteFactory + * @var QuoteFactory */ protected $quoteFactory; + /** + * @var SystemStore + */ + private $systemStore; + /** + * @var FormFactory + */ + private $formFactory; /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Helper\Data $backendHelper - * @param \Magento\Quote\Api\CartRepositoryInterface $quoteRepository - * @param \Magento\Framework\Data\CollectionFactory $dataCollectionFactory - * @param \Magento\Framework\Registry $coreRegistry - * @param \Magento\Quote\Model\QuoteFactory $quoteFactory + * @param Context $context + * @param Data $backendHelper + * @param CartRepositoryInterface $quoteRepository + * @param CollectionFactory $dataCollectionFactory + * @param Registry $coreRegistry + * @param QuoteFactory $quoteFactory * @param array $data + * @param SystemStore|null $systemStore + * @param FormFactory|null $formFactory */ public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Helper\Data $backendHelper, - \Magento\Quote\Api\CartRepositoryInterface $quoteRepository, - \Magento\Framework\Data\CollectionFactory $dataCollectionFactory, - \Magento\Framework\Registry $coreRegistry, - \Magento\Quote\Model\QuoteFactory $quoteFactory, - array $data = [] + Context $context, + Data $backendHelper, + CartRepositoryInterface $quoteRepository, + CollectionFactory $dataCollectionFactory, + Registry $coreRegistry, + QuoteFactory $quoteFactory, + array $data = [], + ?SystemStore $systemStore = null, + ?FormFactory $formFactory = null ) { $this->_dataCollectionFactory = $dataCollectionFactory; $this->_coreRegistry = $coreRegistry; $this->quoteRepository = $quoteRepository; $this->quoteFactory = $quoteFactory; + $this->systemStore = $systemStore ?? ObjectManager::getInstance()->get(SystemStore::class); + $this->formFactory = $formFactory ?? ObjectManager::getInstance()->get(FormFactory::class); parent::__construct($context, $backendHelper, $data); } @@ -92,8 +120,11 @@ protected function _construct() */ protected function _prepareGrid() { - $this->setId('customer_cart_grid' . $this->getWebsiteId()); + $this->setId('customer_cart_grid'); parent::_prepareGrid(); + if (!$this->_storeManager->isSingleStoreMode()) { + $this->prepareWebsiteFilter(); + } } /** @@ -129,7 +160,7 @@ protected function _prepareColumns() [ 'header' => __('Product'), 'index' => 'name', - 'renderer' => \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Grid\Renderer\Item::class + 'renderer' => Item::class ] ); @@ -167,7 +198,7 @@ protected function _prepareColumns() [ 'header' => __('Action'), 'index' => 'quote_item_id', - 'renderer' => \Magento\Customer\Block\Adminhtml\Grid\Renderer\Multiaction::class, + 'renderer' => Multiaction::class, 'filter' => false, 'sortable' => false, 'actions' => [ @@ -245,10 +276,59 @@ protected function getQuote() try { $this->quote = $this->quoteRepository->getForCustomer($customerId, $storeIds); - } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + } catch (NoSuchEntityException $e) { $this->quote = $this->quoteFactory->create()->setSharedStoreIds($storeIds); } } return $this->quote; } + + /** + * Add website filter block to the layout + * + * @return void + */ + private function prepareWebsiteFilter(): void + { + $form = $this->formFactory->create(); + $form->addField( + 'website_filter', + 'select', + [ + 'name' => 'website_id', + 'values' => $this->systemStore->getWebsiteOptionHash(), + 'value' => $this->getWebsiteId() ?? $this->_storeManager->getWebsite()->getId(), + 'no_span' => true, + 'onchange' => "{$this->getJsObjectName()}.loadByElement(this);", + ] + ); + /** + * @var Form $formWidget + */ + $formWidget = $this->getLayout()->createBlock(Form::class); + $formWidget->setForm($form); + $formWidget->setTemplate('Magento_Customer::tab/cart_website_filter_form.phtml'); + $this->setChild( + 'website_filter_block', + $formWidget + ); + } + + /** + * @inheritDoc + */ + public function getMainButtonsHtml() + { + return $this->getWebsiteFilterHtml() . parent::getMainButtonsHtml(); + } + + /** + * Generate website filter + * + * @return string + */ + private function getWebsiteFilterHtml(): string + { + return $this->getChildHtml('website_filter_block'); + } } diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php index 1e4c1fb001ea3..6528ac4c1f211 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php @@ -5,84 +5,116 @@ */ namespace Magento\Customer\Controller\Adminhtml\Index; +use Magento\Backend\App\Action\Context; +use Magento\Backend\Model\View\Result\ForwardFactory; use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Api\AddressRepositoryInterface; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Api\Data\AddressInterfaceFactory; use Magento\Customer\Api\Data\CustomerInterfaceFactory; +use Magento\Customer\Controller\Adminhtml\Index as BaseAction; +use Magento\Customer\Helper\View; use Magento\Customer\Model\Address\Mapper; -use Magento\Framework\DataObjectFactory as ObjectFactory; +use Magento\Customer\Model\AddressFactory; +use Magento\Customer\Model\CustomerFactory; +use Magento\Customer\Model\Metadata\FormFactory; use Magento\Framework\Api\DataObjectHelper; +use Magento\Framework\Api\ExtensibleDataObjectConverter; +use Magento\Framework\App\Action\HttpGetActionInterface; +use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; +use Magento\Framework\App\Response\Http\FileFactory; +use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Framework\DataObjectFactory as ObjectFactory; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Math\Random; +use Magento\Framework\Reflection\DataObjectProcessor; +use Magento\Framework\Registry; +use Magento\Framework\View\Result\Layout; +use Magento\Framework\View\Result\LayoutFactory; +use Magento\Framework\View\Result\PageFactory; +use Magento\Newsletter\Model\SubscriberFactory; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Model\Quote; +use Magento\Quote\Model\QuoteFactory; +use Magento\Store\Model\StoreManagerInterface; /** + * Admin customer shopping cart controller + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @deprecated 100.2.0 */ -class Cart extends \Magento\Customer\Controller\Adminhtml\Index +class Cart extends BaseAction implements HttpGetActionInterface, HttpPostActionInterface { /** - * @var \Magento\Quote\Model\QuoteFactory + * @var QuoteFactory */ private $quoteFactory; + /** + * @var StoreManagerInterface + */ + private $storeManager; /** * Constructor * - * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Framework\Registry $coreRegistry - * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory - * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Customer\Model\AddressFactory $addressFactory - * @param \Magento\Customer\Model\Metadata\FormFactory $formFactory - * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory - * @param \Magento\Customer\Helper\View $viewHelper - * @param \Magento\Framework\Math\Random $random + * @param Context $context + * @param Registry $coreRegistry + * @param FileFactory $fileFactory + * @param CustomerFactory $customerFactory + * @param AddressFactory $addressFactory + * @param FormFactory $formFactory + * @param SubscriberFactory $subscriberFactory + * @param View $viewHelper + * @param Random $random * @param CustomerRepositoryInterface $customerRepository - * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter + * @param ExtensibleDataObjectConverter $extensibleDataObjectConverter * @param Mapper $addressMapper * @param AccountManagementInterface $customerAccountManagement * @param AddressRepositoryInterface $addressRepository * @param CustomerInterfaceFactory $customerDataFactory * @param AddressInterfaceFactory $addressDataFactory * @param \Magento\Customer\Model\Customer\Mapper $customerMapper - * @param \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor + * @param DataObjectProcessor $dataObjectProcessor * @param DataObjectHelper $dataObjectHelper * @param ObjectFactory $objectFactory * @param \Magento\Framework\View\LayoutFactory $layoutFactory - * @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory - * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory - * @param \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory - * @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory - * @param \Magento\Quote\Model\QuoteFactory|null $quoteFactory + * @param LayoutFactory $resultLayoutFactory + * @param PageFactory $resultPageFactory + * @param ForwardFactory $resultForwardFactory + * @param JsonFactory $resultJsonFactory + * @param QuoteFactory|null $quoteFactory + * @param StoreManagerInterface|null $storeManager * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Backend\App\Action\Context $context, - \Magento\Framework\Registry $coreRegistry, - \Magento\Framework\App\Response\Http\FileFactory $fileFactory, - \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Customer\Model\AddressFactory $addressFactory, - \Magento\Customer\Model\Metadata\FormFactory $formFactory, - \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, - \Magento\Customer\Helper\View $viewHelper, - \Magento\Framework\Math\Random $random, + Context $context, + Registry $coreRegistry, + FileFactory $fileFactory, + CustomerFactory $customerFactory, + AddressFactory $addressFactory, + FormFactory $formFactory, + SubscriberFactory $subscriberFactory, + View $viewHelper, + Random $random, CustomerRepositoryInterface $customerRepository, - \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, + ExtensibleDataObjectConverter $extensibleDataObjectConverter, Mapper $addressMapper, AccountManagementInterface $customerAccountManagement, AddressRepositoryInterface $addressRepository, CustomerInterfaceFactory $customerDataFactory, AddressInterfaceFactory $addressDataFactory, \Magento\Customer\Model\Customer\Mapper $customerMapper, - \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor, + DataObjectProcessor $dataObjectProcessor, DataObjectHelper $dataObjectHelper, ObjectFactory $objectFactory, \Magento\Framework\View\LayoutFactory $layoutFactory, - \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory, - \Magento\Framework\View\Result\PageFactory $resultPageFactory, - \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory, - \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory, - \Magento\Quote\Model\QuoteFactory $quoteFactory = null + LayoutFactory $resultLayoutFactory, + PageFactory $resultPageFactory, + ForwardFactory $resultForwardFactory, + JsonFactory $resultJsonFactory, + QuoteFactory $quoteFactory = null, + ?StoreManagerInterface $storeManager = null ) { parent::__construct( $context, @@ -111,13 +143,14 @@ public function __construct( $resultForwardFactory, $resultJsonFactory ); - $this->quoteFactory = $quoteFactory ?: $this->_objectManager->get(\Magento\Quote\Model\QuoteFactory::class); + $this->quoteFactory = $quoteFactory ?: $this->_objectManager->get(QuoteFactory::class); + $this->storeManager = $storeManager ?? $this->_objectManager->get(StoreManagerInterface::class); } /** * Handle and then get cart grid contents * - * @return \Magento\Framework\View\Result\Layout + * @return Layout */ public function execute() { @@ -127,16 +160,17 @@ public function execute() // delete an item from cart $deleteItemId = $this->getRequest()->getPost('delete'); if ($deleteItemId) { - /** @var \Magento\Quote\Api\CartRepositoryInterface $quoteRepository */ - $quoteRepository = $this->_objectManager->create(\Magento\Quote\Api\CartRepositoryInterface::class); - /** @var \Magento\Quote\Model\Quote $quote */ + /** @var CartRepositoryInterface $quoteRepository */ + $quoteRepository = $this->_objectManager->create(CartRepositoryInterface::class); + /** @var Quote $quote */ try { - $quote = $quoteRepository->getForCustomer($customerId); - } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + $storeIds = $this->storeManager->getWebsite($websiteId)->getStoreIds(); + $quote = $quoteRepository->getForCustomer($customerId, $storeIds); + } catch (NoSuchEntityException $e) { $quote = $this->quoteFactory->create(); } $quote->setWebsite( - $this->_objectManager->get(\Magento\Store\Model\StoreManagerInterface::class)->getWebsite($websiteId) + $this->storeManager->getWebsite($websiteId) ); $item = $quote->getItemById($deleteItemId); if ($item && $item->getId()) { diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/cart_website_filter_form.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart_website_filter_form.phtml new file mode 100644 index 0000000000000..ec903fa978fce --- /dev/null +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart_website_filter_form.phtml @@ -0,0 +1,10 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/** @var $block \Magento\Backend\Block\Widget\Form */ +?> +<?= $block->getFormHtml() ?> +<?= $block->getChildHtml('form_after') ?> diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartsTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartsTest.php index fa8577c6c6a40..604f7d8fcb2a1 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartsTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartsTest.php @@ -55,12 +55,12 @@ public function testGetHtml() ); $html = $this->_block->toHtml(); - $this->assertContains("<div id=\"customer_cart_grid1\"", $html); + $this->assertContains("<div id=\"customer_cart_grid\"", $html); $this->assertRegExp( '/<div class=".*admin__data-grid-toolbar"/', $html ); - $this->assertContains("customer_cart_grid1JsObject = new varienGrid(\"customer_cart_grid1\",", $html); + $this->assertContains("customer_cart_gridJsObject = new varienGrid(\"customer_cart_grid\",", $html); $this->assertContains( 'backend\u002Fcustomer\u002Fcart_product_composite_cart\u002Fconfigure\u002Fwebsite_id\u002F1', $html diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php index 4a7cc7591f7aa..1442449f6aedd 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php @@ -434,7 +434,7 @@ public function testCartAction() $this->getRequest()->setParam('id', 1)->setParam('website_id', 1)->setPostValue('delete', 1); $this->dispatch('backend/customer/index/cart'); $body = $this->getResponse()->getBody(); - $this->assertContains('<div id="customer_cart_grid1"', $body); + $this->assertContains('<div id="customer_cart_grid"', $body); } /** From f0a412f8a046b81ca1cb520d579113ec451f6554 Mon Sep 17 00:00:00 2001 From: Nikita Shcherbatykh <nikita.shcherbatykh@transoftgroup.com> Date: Thu, 12 Mar 2020 15:39:58 +0200 Subject: [PATCH 138/153] MC-32175: [Page builder] Category page returns 500 error --- .../Magento/Catalog/Block/Product/View.php | 4 +- .../Magento/Review/Block/Product/View.php | 9 +++- .../Review/Block/Product/View/ListView.php | 5 +- .../Test/Unit/Block/Product/ListViewTest.php | 49 +++++++++++++++++++ 4 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 app/code/Magento/Review/Test/Unit/Block/Product/ListViewTest.php diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php index ed6278c2b585d..437171bcb4bc6 100644 --- a/app/code/Magento/Catalog/Block/Product/View.php +++ b/app/code/Magento/Catalog/Block/Product/View.php @@ -323,9 +323,9 @@ public function getQuantityValidators() */ public function getIdentities() { - $identities = $this->getProduct()->getIdentities(); + $product = $this->getProduct(); - return $identities; + return $product ? $product->getIdentities() : []; } /** diff --git a/app/code/Magento/Review/Block/Product/View.php b/app/code/Magento/Review/Block/Product/View.php index c7b813ea8eed9..c66e3e50b919b 100644 --- a/app/code/Magento/Review/Block/Product/View.php +++ b/app/code/Magento/Review/Block/Product/View.php @@ -82,13 +82,20 @@ public function __construct( */ protected function _toHtml() { - $this->getProduct()->setShortDescription(null); + $product = $this->getProduct(); + + if (!$product) { + return ''; + } + + $product->setShortDescription(null); return parent::_toHtml(); } /** * Replace review summary html with more detailed review summary + * * Reviews collection count will be jerked here * * @param \Magento\Catalog\Model\Product $product diff --git a/app/code/Magento/Review/Block/Product/View/ListView.php b/app/code/Magento/Review/Block/Product/View/ListView.php index 5df8a3698e537..2d3d1f6637f1f 100644 --- a/app/code/Magento/Review/Block/Product/View/ListView.php +++ b/app/code/Magento/Review/Block/Product/View/ListView.php @@ -55,7 +55,10 @@ protected function _prepareLayout() */ protected function _beforeToHtml() { - $this->getReviewsCollection()->load()->addRateVotes(); + if ($this->getProductId()) { + $this->getReviewsCollection()->load()->addRateVotes(); + } + return parent::_beforeToHtml(); } diff --git a/app/code/Magento/Review/Test/Unit/Block/Product/ListViewTest.php b/app/code/Magento/Review/Test/Unit/Block/Product/ListViewTest.php new file mode 100644 index 0000000000000..a1cc7a05dfef5 --- /dev/null +++ b/app/code/Magento/Review/Test/Unit/Block/Product/ListViewTest.php @@ -0,0 +1,49 @@ +<?php +/** + * Test class for \Magento\Review\Block\Product\View\ListView + * + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Review\Test\Unit\Block\Product; + +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Review\Block\Product\View\ListView; +use PHPUnit\Framework\TestCase; + +/** + * Class ViewTest + */ +class ListViewTest extends TestCase +{ + /** + * @var ListView + */ + private $listView; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @inheritDoc + */ + protected function setUp() + { + $this->objectManager = new ObjectManager($this); + $this->listView = $this->objectManager->getObject( + ListView::class + ); + } + + /** + * Validate that ListView->toHtml() would not crush if provided product is null + */ + public function testBlockShouldNotFailWithNullProduct() + { + $output = $this->listView->toHtml(); + $this->assertEquals('', $output); + } +} From 2d8721912c321c2098db2e458ec1a0c6c1155658 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Thu, 12 Mar 2020 18:41:35 +0200 Subject: [PATCH 139/153] changes requested; add out stock product to cart test --- .../Guest/AddSimpleProductToCartTest.php | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php index 3bdce6ea98b30..e5953e7b7ad72 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php @@ -80,24 +80,48 @@ public function testAddSimpleProductToCart() self::assertEquals('USD', $rowTotalIncludingTax['currency']); } + /** + * Add disabled product to cart + * + * @magentoApiDataFixture Magento/Catalog/_files/multiple_products.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @return void + */ + public function testAddDisabledProductToCart(): void + { + $sku = 'simple3'; + $quantity = 2; + + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $query = $this->getQuery($maskedQuoteId, $sku, $quantity); + + $this->expectException(ResponseContainsErrorsException::class); + $this->expectExceptionMessage( + 'Could not add the product with SKU ' . $sku . ' to the shopping cart: ' . + 'Product that you are trying to add is not available.' + ); + + $this->graphQlMutation($query); + } + /** * Add out of stock product to cart * - * @@magentoApiDataFixture Magento/Catalog/_files/multiple_products.php + * @magentoApiDataFixture Magento/Catalog/_files/product_virtual_out_of_stock.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php * @return void */ - public function testAddProductToCartWithError(): void + public function testAddOutOfStockProductToCart(): void { - $disabledProductSku = 'simple3'; + $sku = 'virtual-product-out'; $quantity = 2; $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); - $query = $this->getQuery($maskedQuoteId, $disabledProductSku, $quantity); + $query = $this->getQuery($maskedQuoteId, $sku, $quantity); $this->expectException(ResponseContainsErrorsException::class); $this->expectExceptionMessage( - 'Could not add the product with SKU simple3 to the shopping cart: ' . + 'Could not add the product with SKU ' . $sku . ' to the shopping cart: ' . 'Product that you are trying to add is not available.' ); From d25e66736bb3f431091ef9615d99f53c291545a4 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Fri, 13 Mar 2020 02:11:49 +0100 Subject: [PATCH 140/153] Improve the Create Account tests (Success & Failure) --- .../Mftf/Test/StorefrontCreateCustomerTest.xml | 17 ++++++++++------- .../StorefrontCreateExistingCustomerTest.xml | 15 +++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml index 7899f4ac53132..0bc46e8717f33 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml @@ -12,19 +12,22 @@ <annotations> <features value="Customer"/> <stories value="Create a Customer via the Storefront"/> - <title value="Admin should be able to create a customer via the storefront"/> - <description value="Admin should be able to create a customer via the storefront"/> + <title value="As a Customer I should be able to register an account on Storefront"/> + <description value="As a Customer I should be able to register an account on Storefront"/> <severity value="CRITICAL"/> <testCaseId value="MAGETWO-23546"/> <group value="customer"/> <group value="create"/> </annotations> - <after> - <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> - </after> - <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> - <argument name="Customer" value="CustomerEntityOne"/> + <actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/> + <actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm"> + <argument name="customer" value="Simple_US_Customer"/> + </actionGroup> + <actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/> + <actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeSuccessMessage"> + <argument name="messageType" value="success"/> + <argument name="message" value="Thank you for registering with Main Website Store."/> </actionGroup> </test> </tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateExistingCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateExistingCustomerTest.xml index 952ac235d92a4..07ac295e5cce0 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateExistingCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateExistingCustomerTest.xml @@ -8,29 +8,28 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="StorefrontCreateExistingCustomerTest"> + <test name="StorefrontCreateExistingCustomerTest" extends="StorefrontCreateCustomerTest"> <annotations> <features value="Customer"/> <stories value="Customer Registration"/> - <title value="Attempt to register customer on storefront with existing email"/> - <description value="Attempt to register customer on storefront with existing email"/> + <title value="As a Customer I should not be able to register an account using already registered e-mail"/> + <description value="As a Customer I should not be able to register an account using already registered e-mail"/> <testCaseId value="MC-10907"/> <severity value="MAJOR"/> <group value="customers"/> <group value="mtf_migrated"/> </annotations> <before> - <createData entity="Simple_US_Customer" stepKey="customer"/> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> </before> <after> - <deleteData createDataKey="customer" stepKey="deleteCustomer"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> </after> - <actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/> <actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm"> - <argument name="customer" value="$$customer$$"/> + <argument name="customer" value="$$createCustomer$$"/> </actionGroup> - <actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/> + <remove keyForRemoval="seeSuccessMessage"/> <actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeErrorMessage"> <argument name="messageType" value="error"/> <argument name="message" value="There is already an account with this email address."/> From 6fa5df862e45a70a343e446d2c5201747b1caad1 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Fri, 13 Mar 2020 02:17:13 +0100 Subject: [PATCH 141/153] Add `deprecated` notice about not using super-hero ActionGroups --- .../Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml index 56afa8854ce0d..59601a58e64c7 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml @@ -8,7 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="SignUpNewUserFromStorefrontActionGroup"> + <actionGroup name="SignUpNewUserFromStorefrontActionGroup" deprecated="Avoid using super-ActionGroups. See StorefrontCreateCustomerTest for replacement."> <annotations> <description>Goes to the Storefront. Clicks on 'Create Account'. Fills in the provided Customer details, excluding Newsletter Sign-Up. Clicks on 'Create Account' button. Validate that the Customer details are present and correct.</description> </annotations> From 657ff0f8b1adb7eb36b03f2fdde35b4aa163aa2a Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Fri, 13 Mar 2020 03:42:23 +0100 Subject: [PATCH 142/153] Add to cart with Expired session: - Added information about avoiding excessive Action Groups - Extracted atomic action groups with minimal features - Rewritten StorefrontAddProductToCartWithExpiredSessionTest.xml --- .../AddSimpleProductToCartActionGroup.xml | 2 +- ...roductAddToCartErrorMessageActionGroup.xml | 17 +++++++++++++ ...ductAddToCartSuccessMessageActionGroup.xml | 17 +++++++++++++ ...efrontOpenProductEntityPageActionGroup.xml | 21 ++++++++++++++++ ...tPageAddSimpleProductToCartActionGroup.xml | 15 ++++++++++++ ...StorefrontFakeBrokenSessionActionGroup.xml | 14 +++++++++++ ...ddProductToCartWithExpiredSessionTest.xml} | 24 ++++++++----------- .../Test/Mftf/Test/_Deprecated_Test.xml | 11 +++++++++ 8 files changed, 106 insertions(+), 15 deletions(-) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontOpenProductEntityPageActionGroup.xml create mode 100644 app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductPageAddSimpleProductToCartActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFakeBrokenSessionActionGroup.xml rename app/code/Magento/Customer/Test/Mftf/Test/{AddingProductWithExpiredSessionTest.xml => StorefrontAddProductToCartWithExpiredSessionTest.xml} (64%) create mode 100644 app/code/Magento/Customer/Test/Mftf/Test/_Deprecated_Test.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddSimpleProductToCartActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddSimpleProductToCartActionGroup.xml index 81e3b8c99d9d2..68a051c232338 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddSimpleProductToCartActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddSimpleProductToCartActionGroup.xml @@ -8,7 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="AddSimpleProductToCartActionGroup"> + <actionGroup name="AddSimpleProductToCartActionGroup" deprecated="Avoid using super-ActionGroups. Use StorefrontOpenProductEntityPageActionGroup, StorefrontAddSimpleProductToCartActionGroup and StorefrontAssertProductAddedToCartResultMessageActionGroup"> <annotations> <description>Navigates to the Storefront Product page. Then adds the Product to the Cart. Validates that the Success Message is present and correct.</description> </annotations> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml new file mode 100644 index 0000000000000..2147f837d0abc --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontAssertProductAddToCartErrorMessageActionGroup"> + <arguments> + <argument name="message" type="string" defaultValue=""/> + </arguments> + <waitForElementVisible selector="{{StorefrontMessagesSection.error}}" time="10" stepKey="waitForProductAddedMessage"/> + <see selector="{{StorefrontMessagesSection.error}}" userInput="{{message}}" stepKey="seeAddToCartErrorMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml new file mode 100644 index 0000000000000..60c9461c53f7b --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontAssertProductAddToCartSuccessMessageActionGroup"> + <arguments> + <argument name="message" type="string" defaultValue=""/> + </arguments> + <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForProductAddedMessage"/> + <see selector="{{StorefrontMessagesSection.success}}" userInput="message" stepKey="seeAddToCartSuccessMessage"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontOpenProductEntityPageActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontOpenProductEntityPageActionGroup.xml new file mode 100644 index 0000000000000..88dcaff646799 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontOpenProductEntityPageActionGroup.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontOpenProductEntityPageActionGroup"> + <annotations> + <description>Opens Storefront Product page for the provided Product Entity</description> + </annotations> + <arguments> + <argument name="product" type="entity"/> + </arguments> + + <amOnPage url="{{StorefrontProductPage.url(product.custom_attributes[url_key])}}" stepKey="goToProductPage"/> + <waitForPageLoad stepKey="waitForProductPageLoaded"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductPageAddSimpleProductToCartActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductPageAddSimpleProductToCartActionGroup.xml new file mode 100644 index 0000000000000..202f8989dce0f --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductPageAddSimpleProductToCartActionGroup.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontProductPageAddSimpleProductToCartActionGroup"> + <click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCart"/> + <waitForElementVisible selector="{{StorefrontProductActionSection.addToCartButtonTitleIsAddToCart}}" stepKey="waitForElementVisibleAddToCartButtonTitleIsAddToCart"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFakeBrokenSessionActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFakeBrokenSessionActionGroup.xml new file mode 100644 index 0000000000000..3d989a7833b8a --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFakeBrokenSessionActionGroup.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontFakeBrokenSessionActionGroup"> + <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> + <resetCookie userInput="form_key" stepKey="resetCookieForCart2"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontAddProductToCartWithExpiredSessionTest.xml similarity index 64% rename from app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml rename to app/code/Magento/Customer/Test/Mftf/Test/StorefrontAddProductToCartWithExpiredSessionTest.xml index 01f35439f23b8..73d050cfa09b9 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontAddProductToCartWithExpiredSessionTest.xml @@ -7,7 +7,7 @@ --> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AddingProductWithExpiredSessionTest"> + <test name="StorefrontAddProductToCartWithExpiredSessionTest"> <annotations> <title value="Adding a product to cart from category page with an expired session"/> <description value="Adding a product to cart from category page with an expired session"/> @@ -23,24 +23,20 @@ <createData entity="_defaultProduct" stepKey="createSimpleProduct"> <requiredEntity createDataKey="createCategory"/> </createData> + <magentoCron stepKey="runCronReindex" groups="index"/> </before> - - <!--Navigate to a category page --> - <amOnPage url="$$createSimpleProduct.name$$.html" stepKey="goToProductPage"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - - <!-- Remove PHPSESSID and form_key to replicate an expired session--> - <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> - <resetCookie userInput="form_key" stepKey="resetCookieForCart2"/> - - <!-- "Add to Cart" any product--> - <click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCart"/> - <see stepKey="assertErrorMessage" userInput="Your session has expired"/> <after> - <!--Delete created product--> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> </after> + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage"> + <argument name="product" value="$$createSimpleProduct$$"/> + </actionGroup> + <actionGroup ref="StorefrontFakeBrokenSessionActionGroup" stepKey="fakeBrokenSession"/> + <actionGroup ref="StorefrontProductPageAddSimpleProductToCartActionGroup" stepKey="addProductToCart"/> + <actionGroup ref="StorefrontAssertProductAddToCartErrorMessageActionGroup" stepKey="assertFailure"> + <argument name="message" value="Your session has expired"/> + </actionGroup> </test> </tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/_Deprecated_Test.xml b/app/code/Magento/Customer/Test/Mftf/Test/_Deprecated_Test.xml new file mode 100644 index 0000000000000..5f948f5b69cae --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Test/_Deprecated_Test.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AddingProductWithExpiredSessionTest" extends="StorefrontAddProductToCartWithExpiredSessionTest" deprecated="Use StorefrontAddProductToCartWithExpiredSessionTest"/> +</tests> From 2dd2121d4c5bc6b01fd1c37447515a6277e7ab15 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Fri, 13 Mar 2020 03:54:14 +0100 Subject: [PATCH 143/153] Move Assertions to the right module --- .../StorefrontAssertProductAddToCartErrorMessageActionGroup.xml | 0 .../StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename app/code/Magento/{Catalog => Checkout}/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml (100%) rename app/code/Magento/{Catalog => Checkout}/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml (100%) diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml similarity index 100% rename from app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml rename to app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartErrorMessageActionGroup.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml similarity index 100% rename from app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml rename to app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontAssertProductAddToCartSuccessMessageActionGroup.xml From 158f788ec5a49557104fe1722c7e9551721b5932 Mon Sep 17 00:00:00 2001 From: AleksLi <aleksliwork@gmail.com> Date: Fri, 13 Mar 2020 08:22:22 +0100 Subject: [PATCH 144/153] MC-26683: Added test case for 'Some of the products are out of stock.' case --- .../Quote/Guest/AddSimpleProductToCartTest.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php index e5953e7b7ad72..986de59ff7bd2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php @@ -8,6 +8,7 @@ namespace Magento\GraphQl\Quote\Guest; use Exception; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\GraphQl\ResponseContainsErrorsException; @@ -107,22 +108,26 @@ public function testAddDisabledProductToCart(): void /** * Add out of stock product to cart * - * @magentoApiDataFixture Magento/Catalog/_files/product_virtual_out_of_stock.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/Catalog/_files/multiple_products.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/set_simple_product_out_of_stock.php * @return void + * @throws NoSuchEntityException */ public function testAddOutOfStockProductToCart(): void { - $sku = 'virtual-product-out'; - $quantity = 2; + $sku = 'simple1'; + $quantity = 1; $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); $query = $this->getQuery($maskedQuoteId, $sku, $quantity); $this->expectException(ResponseContainsErrorsException::class); $this->expectExceptionMessage( - 'Could not add the product with SKU ' . $sku . ' to the shopping cart: ' . - 'Product that you are trying to add is not available.' + 'Some of the products are out of stock.' ); $this->graphQlMutation($query); From 9948da7e013245ec3af6f6e7633ffa08a12b4ad9 Mon Sep 17 00:00:00 2001 From: Serhii Balko <serhii.balko@transoftgroup.com> Date: Fri, 13 Mar 2020 12:09:00 +0200 Subject: [PATCH 145/153] MC-31196: [2.4.0] Paypal issue with region on 2.3.4 --- .../Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml index 061bc795b2bff..77ae5dbf64840 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml @@ -22,6 +22,9 @@ <createData entity="FirstLevelSubCat" stepKey="createDefaultCategory"> <field key="is_active">true</field> </createData> + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData createDataKey="createDefaultCategory" stepKey="deleteCategory"/> From 8673f269870df9bb0580d84bb72b235a1ffc6f91 Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal <d.tsymbal@atwix.com> Date: Thu, 12 Mar 2020 16:42:08 +0200 Subject: [PATCH 146/153] Enable Persistent Shopping Cart --- ...sistentShoppingCartSettingsActionGroup.xml | 15 ++++++++ ...hoppingCartOptionsAvailableActionGroup.xml | 18 ++++++++++ ...onfigurationPersistentShoppingCartPage.xml | 14 ++++++++ ...dminPersistentShoppingCartSettingsTest.xml | 34 +++++++++++++++++++ .../AdminPersistentShoppingCartSection.xml | 20 +++++++++++ 5 files changed, 101 insertions(+) create mode 100644 app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminNavigateToPersistentShoppingCartSettingsActionGroup.xml create mode 100644 app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminPersistentShoppingCartOptionsAvailableActionGroup.xml create mode 100644 app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationPersistentShoppingCartPage.xml create mode 100644 app/code/Magento/Backend/Test/Mftf/Test/AdminPersistentShoppingCartSettingsTest.xml create mode 100644 app/code/Magento/Config/Test/Mftf/Section/AdminPersistentShoppingCartSection.xml diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminNavigateToPersistentShoppingCartSettingsActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminNavigateToPersistentShoppingCartSettingsActionGroup.xml new file mode 100644 index 0000000000000..811187b9fe95e --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminNavigateToPersistentShoppingCartSettingsActionGroup.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminNavigateToPersistentShoppingCartSettingsActionGroup"> + <amOnPage url="{{AdminConfigurationPersistentShoppingCartPage.url}}" stepKey="navigateToPersistencePage"/> + <conditionalClick selector="{{AdminPersistentShoppingCartSection.DefaultLayoutsTab}}" dependentSelector="{{AdminPersistentShoppingCartSection.CheckIfTabExpand}}" visible="true" stepKey="clickTab"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminPersistentShoppingCartOptionsAvailableActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminPersistentShoppingCartOptionsAvailableActionGroup.xml new file mode 100644 index 0000000000000..3b75602e6d89c --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminPersistentShoppingCartOptionsAvailableActionGroup.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AssertAdminPersistentShoppingCartOptionsAvailableActionGroup"> + <seeElement stepKey="seeLifetimeInput" selector="{{AdminPersistentShoppingCartSection.persistenceLifeTime}}"/> + <seeElement stepKey="seeRememberMeEnableInput" selector="{{AdminPersistentShoppingCartSection.rememberMeEnable}}"/> + <seeElement stepKey="seeRememberMeDefaultInput" selector="{{AdminPersistentShoppingCartSection.rememberMeDefault}}"/> + <seeElement stepKey="seeClearPersistence" selector="{{AdminPersistentShoppingCartSection.clearPersistenceOnLogout}}"/> + <seeElement stepKey="seePersistShoppingCart" selector="{{AdminPersistentShoppingCartSection.persistShoppingCart}}"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationPersistentShoppingCartPage.xml b/app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationPersistentShoppingCartPage.xml new file mode 100644 index 0000000000000..f7e579c57e21c --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/Page/AdminConfigurationPersistentShoppingCartPage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> + <page name="AdminConfigurationPersistentShoppingCartPage" url="admin/system_config/edit/section/persistent/" module="Customers" area="admin"> + <section name="AdminPersistentShoppingCartSection"/> + </page> +</pages> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminPersistentShoppingCartSettingsTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminPersistentShoppingCartSettingsTest.xml new file mode 100644 index 0000000000000..cf1ed2d63034f --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminPersistentShoppingCartSettingsTest.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminPersistentShoppingCartSettingsTest"> + <annotations> + <features value="Backend"/> + <stories value="Enable Persistent Shopping cart"/> + <title value="Admin should be able to manage persistent shopping cart settings"/> + <description value="Admin should be able to enable persistent shopping cart in Magento Admin backend and see additional options"/> + <group value="backend"/> + </annotations> + + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <magentoCLI stepKey="enablePersistentShoppingCart" command="config:set persistent/options/enabled 1"/> + <magentoCLI stepKey="cacheClean" command="cache:clean config"/> + </before> + <after> + <magentoCLI stepKey="disablePersistentShoppingCart" command="config:set persistent/options/enabled 0"/> + <magentoCLI stepKey="cacheClean" command="cache:clean config"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <actionGroup ref="AdminNavigateToPersistentShoppingCartSettingsActionGroup" stepKey="navigateToPersistenceSettings"/> + <actionGroup ref="AssertAdminPersistentShoppingCartOptionsAvailableActionGroup" stepKey="assertOptions"/> + </test> +</tests> diff --git a/app/code/Magento/Config/Test/Mftf/Section/AdminPersistentShoppingCartSection.xml b/app/code/Magento/Config/Test/Mftf/Section/AdminPersistentShoppingCartSection.xml new file mode 100644 index 0000000000000..7dc0d16e39556 --- /dev/null +++ b/app/code/Magento/Config/Test/Mftf/Section/AdminPersistentShoppingCartSection.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminPersistentShoppingCartSection"> + <element name="DefaultLayoutsTab" type="button" selector=".entry-edit-head-link"/> + <element name="CheckIfTabExpand" type="button" selector=".entry-edit-head-link:not(.open)"/> + <element name="persistenceLifeTime" type="input" selector="#persistent_options_lifetime"/> + <element name="rememberMeEnable" type="input" selector="#persistent_options_remember_enabled"/> + <element name="rememberMeDefault" type="input" selector="#persistent_options_remember_default"/> + <element name="clearPersistenceOnLogout" type="input" selector="#persistent_options_logout_clear"/> + <element name="persistShoppingCart" type="input" selector="#persistent_options_shopping_cart"/> + </section> +</sections> From c0aef729db5e169ba9663901a5ff6a1bc57f82c4 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Fri, 13 Mar 2020 11:54:24 +0100 Subject: [PATCH 147/153] Annoying typo :-) --- .../Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml | 6 +++--- .../AdminCorrectnessInvoicedItemInBundleProductTest.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml index 24c60006a3504..f016af2144022 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml @@ -13,8 +13,8 @@ <annotations> <features value="ConfigurableProduct"/> <stories value="Cancel order"/> - <title value="Product qunatity return after order cancel"/> - <description value="Check Product qunatity return after order cancel"/> + <title value="Product quantity return after order cancel"/> + <description value="Check Product quantity return after order cancel"/> <severity value="CRITICAL"/> <testCaseId value="MAGETWO-97228"/> <useCaseId value="MAGETWO-82221"/> @@ -75,7 +75,7 @@ <click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/> <waitForPageLoad stepKey="waitForNewInvoicePageLoad"/> <fillField selector="{{AdminInvoiceItemsSection.qtyToInvoiceColumn}}" userInput="1" stepKey="ChangeQtyToInvoice"/> - <click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQunatity"/> + <click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQuantity"/> <waitForPageLoad stepKey="waitPageToBeLoaded"/> <click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/> <click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml index e55cdfeb284b4..d7d5036c45c8f 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml @@ -83,7 +83,7 @@ <waitForPageLoad stepKey="waitForCreatedOrderPageOpened"/> <actionGroup ref="GoToInvoiceIntoOrderActionGroup" stepKey="goToInvoiceIntoOrderPage"/> <fillField selector="{{AdminInvoiceItemsSection.qtyToInvoiceColumn}}" userInput="5" stepKey="ChangeQtyToInvoice"/> - <click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQunatity"/> + <click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQuantity"/> <waitForPageLoad stepKey="waitPageToBeLoaded"/> <actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/> From 6fc1e3cf00a028c55d89b9f6ac64d3e6e5679671 Mon Sep 17 00:00:00 2001 From: Nikita Shcherbatykh <nikita.shcherbatykh@transoftgroup.com> Date: Fri, 13 Mar 2020 15:54:57 +0200 Subject: [PATCH 148/153] MC-32273: Part of URL is missed after saving category image --- .../Catalog/Model/Category/DataProvider.php | 16 +- .../Catalog/Model/Category/FileInfo.php | 11 ++ .../Magento/Catalog/Model/Category/Image.php | 75 +++++++++ .../Unit/Model/Category/DataProviderTest.php | 18 ++- .../Test/Unit/Model/Category/ImageTest.php | 146 ++++++++++++++++++ .../Catalog/ViewModel/Category/Image.php | 46 ++++++ .../Catalog/ViewModel/Category/Output.php | 46 ++++++ .../frontend/layout/catalog_category_view.xml | 7 +- .../frontend/templates/category/image.phtml | 5 +- 9 files changed, 357 insertions(+), 13 deletions(-) create mode 100644 app/code/Magento/Catalog/Model/Category/Image.php create mode 100644 app/code/Magento/Catalog/Test/Unit/Model/Category/ImageTest.php create mode 100644 app/code/Magento/Catalog/ViewModel/Category/Image.php create mode 100644 app/code/Magento/Catalog/ViewModel/Category/Output.php diff --git a/app/code/Magento/Catalog/Model/Category/DataProvider.php b/app/code/Magento/Catalog/Model/Category/DataProvider.php index fe7258398d191..d8c79c485e3e5 100644 --- a/app/code/Magento/Catalog/Model/Category/DataProvider.php +++ b/app/code/Magento/Catalog/Model/Category/DataProvider.php @@ -41,6 +41,7 @@ * @api * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @since 101.0.0 */ class DataProvider extends ModifierPoolDataProvider @@ -176,6 +177,10 @@ class DataProvider extends ModifierPoolDataProvider * @var AuthorizationInterface */ private $auth; + /** + * @var Image + */ + private $categoryImage; /** * @param string $name @@ -196,6 +201,7 @@ class DataProvider extends ModifierPoolDataProvider * @param ScopeOverriddenValue|null $scopeOverriddenValue * @param ArrayManager|null $arrayManager * @param FileInfo|null $fileInfo + * @param Image|null $categoryImage * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -216,7 +222,8 @@ public function __construct( ?ArrayUtils $arrayUtils = null, ScopeOverriddenValue $scopeOverriddenValue = null, ArrayManager $arrayManager = null, - FileInfo $fileInfo = null + FileInfo $fileInfo = null, + ?Image $categoryImage = null ) { $this->eavValidationRules = $eavValidationRules; $this->collection = $categoryCollectionFactory->create(); @@ -232,6 +239,7 @@ public function __construct( ObjectManager::getInstance()->get(ScopeOverriddenValue::class); $this->arrayManager = $arrayManager ?: ObjectManager::getInstance()->get(ArrayManager::class); $this->fileInfo = $fileInfo ?: ObjectManager::getInstance()->get(FileInfo::class); + $this->categoryImage = $categoryImage ?? ObjectManager::getInstance()->get(Image::class); parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data, $pool); } @@ -601,11 +609,7 @@ private function convertValues($category, $categoryData): array // phpcs:ignore Magento2.Functions.DiscouragedFunction $categoryData[$attributeCode][0]['name'] = basename($fileName); - if ($this->fileInfo->isBeginsWithMediaDirectoryPath($fileName)) { - $categoryData[$attributeCode][0]['url'] = $fileName; - } else { - $categoryData[$attributeCode][0]['url'] = $category->getImageUrl($attributeCode); - } + $categoryData[$attributeCode][0]['url'] = $this->categoryImage->getUrl($category, $attributeCode); $categoryData[$attributeCode][0]['size'] = isset($stat) ? $stat['size'] : 0; $categoryData[$attributeCode][0]['type'] = $mime; diff --git a/app/code/Magento/Catalog/Model/Category/FileInfo.php b/app/code/Magento/Catalog/Model/Category/FileInfo.php index 76b6a2e75d0ea..7d679f2645be1 100644 --- a/app/code/Magento/Catalog/Model/Category/FileInfo.php +++ b/app/code/Magento/Catalog/Model/Category/FileInfo.php @@ -245,4 +245,15 @@ private function getMediaDirectoryPathRelativeToBaseDirectoryPath(string $filePa return $mediaDirectoryRelativeSubpath; } + + /** + * Get file relative path to media directory + * + * @param string $filename + * @return string + */ + public function getRelativePathToMediaDirectory(string $filename): string + { + return $this->getFilePath($filename); + } } diff --git a/app/code/Magento/Catalog/Model/Category/Image.php b/app/code/Magento/Catalog/Model/Category/Image.php new file mode 100644 index 0000000000000..ea5700cb386d0 --- /dev/null +++ b/app/code/Magento/Catalog/Model/Category/Image.php @@ -0,0 +1,75 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Model\Category; + +use Magento\Catalog\Model\Category; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\UrlInterface; +use Magento\Store\Model\StoreManagerInterface; + +/** + * Category Image Service + */ +class Image +{ + private const ATTRIBUTE_NAME = 'image'; + /** + * @var FileInfo + */ + private $fileInfo; + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * Initialize dependencies. + * + * @param FileInfo $fileInfo + * @param StoreManagerInterface $storeManager + */ + public function __construct( + FileInfo $fileInfo, + StoreManagerInterface $storeManager + ) { + $this->fileInfo = $fileInfo; + $this->storeManager = $storeManager; + } + /** + * Resolve category image URL + * + * @param Category $category + * @param string $attributeCode + * @return string + * @throws LocalizedException + */ + public function getUrl(Category $category, string $attributeCode = self::ATTRIBUTE_NAME): string + { + $url = ''; + $image = $category->getData($attributeCode); + if ($image) { + if (is_string($image)) { + $store = $this->storeManager->getStore(); + $mediaBaseUrl = $store->getBaseUrl(UrlInterface::URL_TYPE_MEDIA); + if ($this->fileInfo->isBeginsWithMediaDirectoryPath($image)) { + $relativePath = $this->fileInfo->getRelativePathToMediaDirectory($image); + $url = rtrim($mediaBaseUrl, '/') . '/' . ltrim($relativePath, '/'); + } elseif (substr($image, 0, 1) !== '/') { + $url = rtrim($mediaBaseUrl, '/') . '/' . ltrim(FileInfo::ENTITY_MEDIA_PATH, '/') . '/' . $image; + } else { + $url = $image; + } + } else { + throw new LocalizedException( + __('Something went wrong while getting the image url.') + ); + } + } + return $url; + } +} diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Category/DataProviderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Category/DataProviderTest.php index 4ce50537f27bd..ce131a1953bfd 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Category/DataProviderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Category/DataProviderTest.php @@ -10,6 +10,7 @@ use Magento\Catalog\Model\Category\Attribute\Backend\Image; use Magento\Catalog\Model\Category\DataProvider; use Magento\Catalog\Model\Category\FileInfo; +use Magento\Catalog\Model\Category\Image as CategoryImage; use Magento\Catalog\Model\CategoryFactory; use Magento\Catalog\Model\ResourceModel\Category\Collection; use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory; @@ -98,6 +99,11 @@ class DataProviderTest extends TestCase */ private $auth; + /** + * @var CategoryImage|MockObject + */ + private $categoryImage; + /** * @inheritDoc */ @@ -155,6 +161,11 @@ protected function setUp() $this->arrayUtils = $this->getMockBuilder(ArrayUtils::class) ->setMethods(['flatten']) ->disableOriginalConstructor()->getMock(); + + $this->categoryImage = $this->createPartialMock( + CategoryImage::class, + ['getUrl'] + ); } /** @@ -185,7 +196,8 @@ private function getModel() 'categoryFactory' => $this->categoryFactory, 'pool' => $this->modifierPool, 'auth' => $this->auth, - 'arrayUtils' => $this->arrayUtils + 'arrayUtils' => $this->arrayUtils, + 'categoryImage' => $this->categoryImage, ] ); @@ -324,8 +336,8 @@ public function testGetData() $categoryMock->expects($this->once()) ->method('getAttributes') ->willReturn(['image' => $attributeMock]); - $categoryMock->expects($this->once()) - ->method('getImageUrl') + $this->categoryImage->expects($this->once()) + ->method('getUrl') ->willReturn($categoryUrl); $this->registry->expects($this->once()) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Category/ImageTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Category/ImageTest.php new file mode 100644 index 0000000000000..7cf63a56283f2 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Unit/Model/Category/ImageTest.php @@ -0,0 +1,146 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\Test\Unit\Model\Category; + +use Magento\Catalog\Model\Category; +use Magento\Catalog\Model\Category\FileInfo; +use Magento\Catalog\Model\Category\Image; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Framework\UrlInterface; +use Magento\Store\Model\Store; +use Magento\Store\Model\StoreManager; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Test category image resolver + */ +class ImageTest extends TestCase +{ + /** + * @var Store|MockObject + */ + private $store; + /** + * @var Category + */ + private $category; + /** + * @var Image + */ + private $model; + + /** + * @inheritDoc + */ + protected function setUp() + { + $storeManager = $this->createPartialMock(StoreManager::class, ['getStore']); + $this->store = $this->createPartialMock(Store::class, ['getBaseUrl']); + $storeManager->method('getStore')->willReturn($this->store); + $objectManager = new ObjectManager($this); + $this->category = $objectManager->getObject(Category::class); + $this->model = $objectManager->getObject( + Image::class, + [ + 'storeManager' => $storeManager, + 'fileInfo' => $this->getFileInfo() + ] + ); + } + + /** + * Test that image URL resolver works correctly with different base URL format + * + * @param string $baseUrl + * @param string $imagePath + * @param string $url + * @dataProvider getUrlDataProvider + */ + public function testGetUrl(string $imagePath, string $baseUrl, string $url) + { + $this->store->method('getBaseUrl') + ->with(UrlInterface::URL_TYPE_MEDIA) + ->willReturn($baseUrl); + $this->category->setData('image_attr_code', $imagePath); + $this->assertEquals($url, $this->model->getUrl($this->category, 'image_attr_code')); + } + + /** + * @return array + */ + public function getUrlDataProvider() + { + return [ + [ + 'testimage', + 'http://www.example.com/', + 'http://www.example.com/catalog/category/testimage' + ], + [ + 'testimage', + 'http://www.example.com/pub/media/', + 'http://www.example.com/pub/media/catalog/category/testimage' + ], + [ + 'testimage', + 'http://www.example.com/base/path/pub/media/', + 'http://www.example.com/base/path/pub/media/catalog/category/testimage' + ], + [ + '/pub/media/catalog/category/testimage', + 'http://www.example.com/pub/media/', + 'http://www.example.com/pub/media/catalog/category/testimage' + ], + [ + '/pub/media/catalog/category/testimage', + 'http://www.example.com/base/path/pub/media/', + 'http://www.example.com/base/path/pub/media/catalog/category/testimage' + ], + [ + '/pub/media/posters/testimage', + 'http://www.example.com/pub/media/', + 'http://www.example.com/pub/media/posters/testimage' + ], + [ + '/pub/media/posters/testimage', + 'http://www.example.com/base/path/pub/media/', + 'http://www.example.com/base/path/pub/media/posters/testimage' + ], + [ + '', + 'http://www.example.com/', + '' + ] + ]; + } + + /** + * Get FileInfo mock + * + * @return MockObject + */ + private function getFileInfo(): MockObject + { + $mediaDir = 'pub/media'; + $fileInfo = $this->createMock(FileInfo::class); + $fileInfo->method('isBeginsWithMediaDirectoryPath') + ->willReturnCallback( + function ($path) use ($mediaDir) { + return strpos(ltrim($path, '/'), $mediaDir) === 0; + } + ); + $fileInfo->method('getRelativePathToMediaDirectory') + ->willReturnCallback( + function ($path) use ($mediaDir) { + return str_replace($mediaDir, '', $path); + } + ); + return $fileInfo; + } +} diff --git a/app/code/Magento/Catalog/ViewModel/Category/Image.php b/app/code/Magento/Catalog/ViewModel/Category/Image.php new file mode 100644 index 0000000000000..2982779bd2eb3 --- /dev/null +++ b/app/code/Magento/Catalog/ViewModel/Category/Image.php @@ -0,0 +1,46 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\ViewModel\Category; + +use Magento\Catalog\Model\Category; +use Magento\Catalog\Model\Category\Image as CategoryImage; +use Magento\Framework\View\Element\Block\ArgumentInterface; + +/** + * Category image view model + */ +class Image implements ArgumentInterface +{ + private const ATTRIBUTE_NAME = 'image'; + /** + * @var CategoryImage + */ + private $image; + + /** + * Initialize dependencies. + * + * @param CategoryImage $image + */ + public function __construct(CategoryImage $image) + { + $this->image = $image; + } + + /** + * Resolve category image URL + * + * @param Category $category + * @param string $attributeCode + * @return string + */ + public function getUrl(Category $category, string $attributeCode = self::ATTRIBUTE_NAME): string + { + return $this->image->getUrl($category, $attributeCode); + } +} diff --git a/app/code/Magento/Catalog/ViewModel/Category/Output.php b/app/code/Magento/Catalog/ViewModel/Category/Output.php new file mode 100644 index 0000000000000..367d59daea48e --- /dev/null +++ b/app/code/Magento/Catalog/ViewModel/Category/Output.php @@ -0,0 +1,46 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Catalog\ViewModel\Category; + +use Magento\Catalog\Helper\Output as OutputHelper; +use Magento\Catalog\Model\Category; +use Magento\Framework\View\Element\Block\ArgumentInterface; + +/** + * Category attribute output view model + */ +class Output implements ArgumentInterface +{ + /** + * @var OutputHelper + */ + private $outputHelper; + + /** + * Initialize dependencies. + * + * @param OutputHelper $outputHelper + */ + public function __construct(OutputHelper $outputHelper) + { + $this->outputHelper = $outputHelper; + } + + /** + * Prepare category attribute html output + * + * @param Category $category + * @param string $attributeHtml + * @param string $attributeName + * @return string + */ + public function categoryAttribute(Category $category, string $attributeHtml, string $attributeName): string + { + return $this->outputHelper->categoryAttribute($category, $attributeHtml, $attributeName); + } +} diff --git a/app/code/Magento/Catalog/view/frontend/layout/catalog_category_view.xml b/app/code/Magento/Catalog/view/frontend/layout/catalog_category_view.xml index 5fee1d8447e5a..c4adcaf785012 100644 --- a/app/code/Magento/Catalog/view/frontend/layout/catalog_category_view.xml +++ b/app/code/Magento/Catalog/view/frontend/layout/catalog_category_view.xml @@ -9,7 +9,12 @@ <body> <referenceContainer name="columns.top"> <container name="category.view.container" htmlTag="div" htmlClass="category-view" after="-"> - <block class="Magento\Catalog\Block\Category\View" name="category.image" template="Magento_Catalog::category/image.phtml"/> + <block class="Magento\Catalog\Block\Category\View" name="category.image" template="Magento_Catalog::category/image.phtml"> + <arguments> + <argument name="image" xsi:type="object">Magento\Catalog\ViewModel\Category\Image</argument> + <argument name="output" xsi:type="object">Magento\Catalog\ViewModel\Category\Output</argument> + </arguments> + </block> <block class="Magento\Catalog\Block\Category\View" name="category.description" template="Magento_Catalog::category/description.phtml"/> <block class="Magento\Catalog\Block\Category\View" name="category.cms" template="Magento_Catalog::category/cms.phtml"/> </container> diff --git a/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml index 02593d3b541a1..8f72e4713d22b 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/category/image.phtml @@ -16,10 +16,9 @@ // phpcs:disable Magento2.Security.LanguageConstruct.DirectOutput ?> <?php - $_helper = $this->helper(Magento\Catalog\Helper\Output::class); $_category = $block->getCurrentCategory(); $_imgHtml = ''; - if ($_imgUrl = $_category->getImageUrl()) { + if ($_imgUrl = $block->getImage()->getUrl($_category)) { $_imgHtml = '<div class="category-image"><img src="' . $block->escapeUrl($_imgUrl) . '" alt="' @@ -27,7 +26,7 @@ . '" title="' . $block->escapeHtmlAttr($_category->getName()) . '" class="image" /></div>'; - $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image'); + $_imgHtml = $block->getOutput()->categoryAttribute($_category, $_imgHtml, 'image'); /* @noEscape */ echo $_imgHtml; } ?> From aba3b37493b34a465565b3bb8be878408873f3db Mon Sep 17 00:00:00 2001 From: Ihor Sviziev <svizev.igor@gmail.com> Date: Fri, 13 Mar 2020 16:48:01 +0200 Subject: [PATCH 149/153] Fix static test failures for class annotaions These checks were moved to Magento Coding Standards --- .../ClassAnnotationStructureSniff.php | 125 ------------------ .../ClassAnnotationStructureSniffTest.php | 86 ------------ .../_files/AbstractClassAnnotationFixture.php | 13 -- .../_files/ClassAnnotationFixture.php | 20 --- ...assAnnotationNoShortDescriptionFixture.php | 16 --- ...AnnotationNoSpacingBetweenLinesFixture.php | 18 --- .../abstract_class_annotation_errors.txt | 10 -- .../_files/class_annotation_errors.txt | 11 -- ...s_annotation_noshortdescription_errors.txt | 14 -- ...nnotation_nospacingbetweenLines_errors.txt | 12 -- 10 files changed, 325 deletions(-) delete mode 100644 dev/tests/static/framework/Magento/Sniffs/Annotation/ClassAnnotationStructureSniff.php delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/ClassAnnotationStructureSniffTest.php delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/AbstractClassAnnotationFixture.php delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationFixture.php delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationNoShortDescriptionFixture.php delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationNoSpacingBetweenLinesFixture.php delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/abstract_class_annotation_errors.txt delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_errors.txt delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_noshortdescription_errors.txt delete mode 100644 dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_nospacingbetweenLines_errors.txt diff --git a/dev/tests/static/framework/Magento/Sniffs/Annotation/ClassAnnotationStructureSniff.php b/dev/tests/static/framework/Magento/Sniffs/Annotation/ClassAnnotationStructureSniff.php deleted file mode 100644 index 43df5658bbe0d..0000000000000 --- a/dev/tests/static/framework/Magento/Sniffs/Annotation/ClassAnnotationStructureSniff.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); -namespace Magento\Sniffs\Annotation; - -use PHP_CodeSniffer\Sniffs\Sniff; -use PHP_CodeSniffer\Files\File; - -/** - * Sniff to validate structure of class, interface annotations - */ -class ClassAnnotationStructureSniff implements Sniff -{ - /** - * @var AnnotationFormatValidator - */ - private $annotationFormatValidator; - - /** - * @inheritdoc - */ - public function register() - { - return [ - T_CLASS - ]; - } - - /** - * AnnotationStructureSniff constructor. - */ - public function __construct() - { - $this->annotationFormatValidator = new AnnotationFormatValidator(); - } - - /** - * Validates whether annotation block exists for interface, abstract or final classes - * - * @param File $phpcsFile - * @param int $previousCommentClosePtr - * @param int $stackPtr - */ - private function validateInterfaceOrAbstractOrFinalClassAnnotationBlockExists( - File $phpcsFile, - int $previousCommentClosePtr, - int $stackPtr - ) : void { - $tokens = $phpcsFile->getTokens(); - if ($tokens[$stackPtr]['type'] === 'T_CLASS') { - if ($tokens[$stackPtr - 2]['type'] === 'T_ABSTRACT' && - $tokens[$stackPtr - 4]['content'] != $tokens[$previousCommentClosePtr]['content'] - ) { - $error = 'Interface or abstract class is missing annotation block'; - $phpcsFile->addFixableError($error, $stackPtr, 'ClassAnnotation'); - } - if ($tokens[$stackPtr - 2]['type'] === 'T_FINAL' && - $tokens[$stackPtr - 4]['content'] != $tokens[$previousCommentClosePtr]['content'] - ) { - $error = 'Final class is missing annotation block'; - $phpcsFile->addFixableError($error, $stackPtr, 'ClassAnnotation'); - } - } - } - - /** - * Validates whether annotation block exists - * - * @param File $phpcsFile - * @param int $previousCommentClosePtr - * @param int $stackPtr - */ - private function validateAnnotationBlockExists(File $phpcsFile, int $previousCommentClosePtr, int $stackPtr) : void - { - $tokens = $phpcsFile->getTokens(); - $this->validateInterfaceOrAbstractOrFinalClassAnnotationBlockExists( - $phpcsFile, - $previousCommentClosePtr, - $stackPtr - ); - if ($tokens[$stackPtr - 2]['content'] != 'class' && $tokens[$stackPtr - 2]['content'] != 'abstract' - && $tokens[$stackPtr - 2]['content'] != 'final' - && $tokens[$stackPtr - 2]['content'] !== $tokens[$previousCommentClosePtr]['content'] - ) { - $error = 'Class is missing annotation block'; - $phpcsFile->addFixableError($error, $stackPtr, 'ClassAnnotation'); - } - } - - /** - * @inheritdoc - */ - public function process(File $phpcsFile, $stackPtr) - { - $tokens = $phpcsFile->getTokens(); - $previousCommentClosePtr = $phpcsFile->findPrevious(T_DOC_COMMENT_CLOSE_TAG, $stackPtr - 1, 0); - if (!$previousCommentClosePtr) { - $phpcsFile->addError('Comment block is missing', $stackPtr -1, 'MethodArguments'); - return; - } - $this->validateAnnotationBlockExists($phpcsFile, $previousCommentClosePtr, $stackPtr); - $commentStartPtr = $phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, $stackPtr - 1, 0); - $commentCloserPtr = $tokens[$commentStartPtr]['comment_closer']; - $emptyTypeTokens = [ - T_DOC_COMMENT_WHITESPACE, - T_DOC_COMMENT_STAR - ]; - $shortPtr = $phpcsFile->findNext($emptyTypeTokens, $commentStartPtr +1, $commentCloserPtr, true); - if ($shortPtr === false) { - $error = 'Annotation block is empty'; - $phpcsFile->addError($error, $commentStartPtr, 'MethodAnnotation'); - } else { - $this->annotationFormatValidator->validateDescriptionFormatStructure( - $phpcsFile, - $commentStartPtr, - (int) $shortPtr, - $previousCommentClosePtr, - $emptyTypeTokens - ); - } - } -} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/ClassAnnotationStructureSniffTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/ClassAnnotationStructureSniffTest.php deleted file mode 100644 index afe559fdd6759..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/ClassAnnotationStructureSniffTest.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Sniffs\Annotation; - -class ClassAnnotationStructureSniffTest extends \PHPUnit\Framework\TestCase -{ - /** - * @return array - */ - public function processDataProvider() - { - return [ - [ - 'ClassAnnotationFixture.php', - 'class_annotation_errors.txt', - ], - [ - 'AbstractClassAnnotationFixture.php', - 'abstract_class_annotation_errors.txt', - ], - [ - 'ClassAnnotationNoShortDescriptionFixture.php', - 'class_annotation_noshortdescription_errors.txt', - ], - [ - 'ClassAnnotationNoSpacingBetweenLinesFixture.php', - 'class_annotation_nospacingbetweenLines_errors.txt', - ] - ]; - } - - /** - * Copy a file - * - * @param string $source - * @param string $destination - */ - private function copyFile($source, $destination) : void - { - $sourcePath = $source; - $destinationPath = $destination; - $sourceDirectory = opendir($sourcePath); - while ($readFile = readdir($sourceDirectory)) { - if ($readFile != '.' && $readFile != '..') { - if (!file_exists($destinationPath . $readFile)) { - copy($sourcePath . $readFile, $destinationPath . $readFile); - } - } - } - closedir($sourceDirectory); - } - - /** - * @param string $fileUnderTest - * @param string $expectedReportFile - * @dataProvider processDataProvider - */ - public function testProcess($fileUnderTest, $expectedReportFile) - { - $reportFile = __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'phpcs_report.txt'; - $this->copyFile( - __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR, - TESTS_TEMP_DIR . DIRECTORY_SEPARATOR - ); - $codeSniffer = new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer( - 'Magento', - $reportFile, - new \Magento\TestFramework\CodingStandard\Tool\CodeSniffer\Wrapper() - ); - $result = $codeSniffer->run( - [TESTS_TEMP_DIR . DIRECTORY_SEPARATOR . $fileUnderTest] - ); - $actual = file_get_contents($reportFile); - $expected = file_get_contents( - TESTS_TEMP_DIR . DIRECTORY_SEPARATOR . $expectedReportFile - ); - unlink($reportFile); - $this->assertEquals(2, $result); - $this->assertEquals($expected, $actual); - } -} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/AbstractClassAnnotationFixture.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/AbstractClassAnnotationFixture.php deleted file mode 100644 index 43973b3083e56..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/AbstractClassAnnotationFixture.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -declare(strict_types=1); - -namespace Magento\Sniffs\Annotation; - -abstract class AbstractClassAnnotationFixture -{ -} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationFixture.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationFixture.php deleted file mode 100644 index f9a997dcfeb9d..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationFixture.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -declare(strict_types=1); - -namespace Magento\Sniffs\Annotation; - -class ClassAnnotationFixture -{ - /** - * - * @inheritdoc - */ - public function getProductListDefaultSortBy1() - { - } -} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationNoShortDescriptionFixture.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationNoShortDescriptionFixture.php deleted file mode 100644 index be49cc6c788e9..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationNoShortDescriptionFixture.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -declare(strict_types=1); - -namespace Magento\Sniffs\Annotation; - -/** - * @SuppressWarnings(PHPMD.NumberOfChildren) - */ -class ClassAnnotationNoShortDescriptionFixture -{ -} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationNoSpacingBetweenLinesFixture.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationNoSpacingBetweenLinesFixture.php deleted file mode 100644 index 382185734c281..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/ClassAnnotationNoSpacingBetweenLinesFixture.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -declare(strict_types=1); - -namespace Magento\Sniffs\Annotation; - -/** - * Class ClassAnnotationNoSpacingBetweenLinesFixture - * @see Magento\Sniffs\Annotation\_files - */ -class ClassAnnotationNoSpacingBetweenLinesFixture -{ - -} diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/abstract_class_annotation_errors.txt b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/abstract_class_annotation_errors.txt deleted file mode 100644 index 23698cfb72e27..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/abstract_class_annotation_errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -FILE: ...o/Sniffs/Annotation/_fixtures/AbstractClassAnnotationFixture.php ----------------------------------------------------------------------- -FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------- - 11 | ERROR | [x] Interface or abstract class is missing annotation - | | block ----------------------------------------------------------------------- -PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n - - diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_errors.txt b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_errors.txt deleted file mode 100644 index aca2721131608..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_errors.txt +++ /dev/null @@ -1,11 +0,0 @@ - -FILE: ...Magento/Sniffs/Annotation/_fixtures/class_annotation_fixture.php ----------------------------------------------------------------------- -FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------- - 11 | ERROR | [x] Class is missing annotation block ----------------------------------------------------------------------- -PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------- - - diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_noshortdescription_errors.txt b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_noshortdescription_errors.txt deleted file mode 100644 index ecc702c568934..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_noshortdescription_errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -'\n -FILE: ...nnotation/_fixtures/ClassAnnotationNoShortDescriptionFixture.php\n -----------------------------------------------------------------------\n -FOUND 1 ERROR AFFECTING 1 LINE\n -----------------------------------------------------------------------\n - 11 | ERROR | [x] Missing short description\n -----------------------------------------------------------------------\n -PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n -----------------------------------------------------------------------\n -\n -\n -' - - diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_nospacingbetweenLines_errors.txt b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_nospacingbetweenLines_errors.txt deleted file mode 100644 index 0102ca7f79a1f..0000000000000 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_nospacingbetweenLines_errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -'\n -FILE: ...tation/_fixtures/ClassAnnotationNoSpacingBetweenLinesFixture.php\n -----------------------------------------------------------------------\n -FOUND 1 ERROR AFFECTING 1 LINE\n -----------------------------------------------------------------------\n - 13 | ERROR | [x] There must be exactly one blank line between lines short and long descriptions\n -----------------------------------------------------------------------\n -PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n -----------------------------------------------------------------------\n -\n -\n -' From 9dfeccff6fac75ccc9239e8c65dabaa387577424 Mon Sep 17 00:00:00 2001 From: Burlacu Vasilii <v.burlacu@atwix.com> Date: Fri, 13 Mar 2020 19:57:46 +0200 Subject: [PATCH 150/153] Make the "Display Category Filter" field appear after after additional fields for "Price Navigation Step Calculation" --- app/code/Magento/Catalog/etc/adminhtml/system.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/etc/adminhtml/system.xml b/app/code/Magento/Catalog/etc/adminhtml/system.xml index 30a8ec8a81ec5..4e10453f542bb 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/system.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/system.xml @@ -139,7 +139,7 @@ </field> </group> <group id="layered_navigation"> - <field id="display_category" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <field id="display_category" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> <label>Display Category Filter</label> <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> </field> From 106e24426ac1c7437c43d801d2b437560114980a Mon Sep 17 00:00:00 2001 From: Dan Wallis <mrdanwallis@gmail.com> Date: Fri, 13 Mar 2020 18:43:37 +0000 Subject: [PATCH 151/153] Load view from indexer object --- .../Grid/Column/Renderer/ScheduleStatus.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php index 4d90d9c178c12..eba7591c17286 100644 --- a/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php +++ b/app/code/Magento/Indexer/Block/Backend/Grid/Column/Renderer/ScheduleStatus.php @@ -11,9 +11,8 @@ use Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer; use Magento\Framework\DataObject; use Magento\Framework\Escaper; -use Magento\Framework\Mview\View; -use Magento\Framework\Mview\ViewInterface; use Magento\Framework\Phrase; +use Magento\Indexer\Model\IndexerFactory; /** * Renderer for 'Schedule Status' column in indexer grid @@ -26,25 +25,25 @@ class ScheduleStatus extends AbstractRenderer private $escaper; /** - * @var ViewInterface + * @var IndexerFactory */ - private $viewModel; + private $indexerFactory; /** * @param Context $context * @param Escaper $escaper - * @param ViewInterface $viewModel + * @param IndexerFactory $indexerFactory * @param array $data */ public function __construct( Context $context, Escaper $escaper, - View $viewModel, + IndexerFactory $indexerFactory, array $data = [] ) { parent::__construct($context, $data); $this->escaper = $escaper; - $this->viewModel = $viewModel; + $this->indexerFactory = $indexerFactory; } /** @@ -61,7 +60,9 @@ public function render(DataObject $row) } try { - $view = $this->viewModel->load($row->getIndexerId()); + $indexer = $this->indexerFactory->create(); + $indexer->load($row->getIndexerId()); + $view = $indexer->getView(); } catch (\InvalidArgumentException $exception) { // No view for this index. return ''; From fff5ce9c09b3d0e9650d7754dff384aad74af7f1 Mon Sep 17 00:00:00 2001 From: AleksLi <aleksliwork@gmail.com> Date: Fri, 13 Mar 2020 20:35:55 +0100 Subject: [PATCH 152/153] MC-26683: Removed unused set_guest_email.php fixture for test --- .../Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php index 986de59ff7bd2..3ee27acfa2418 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AddSimpleProductToCartTest.php @@ -111,7 +111,6 @@ public function testAddDisabledProductToCart(): void * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php * @magentoApiDataFixture Magento/Catalog/_files/multiple_products.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/create_empty_cart.php - * @magentoApiDataFixture Magento/GraphQl/Quote/_files/guest/set_guest_email.php * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/set_simple_product_out_of_stock.php * @return void From a5cfbaa7f7446b3f74691f1a4124b9c7943b75f0 Mon Sep 17 00:00:00 2001 From: Cristian Partica <cpartica@magento.com> Date: Mon, 16 Mar 2020 12:51:19 -0500 Subject: [PATCH 153/153] MC-31987: Varnish graphql cache has to skip authenticated requests - fix static --- .../GraphQl/SendFriend/StoreConfigTest.php | 30 +++++++++++++++---- .../HTTP/PhpEnvironment/Response.php | 5 ---- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php index e1c475d2ea059..9d87afb2ddec9 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/SendFriend/StoreConfigTest.php @@ -76,12 +76,30 @@ public function testSendFriendEnabledGuestEnabled() */ private function assertResponse(array $expectedValues, array $response) { - $this->assertArrayNotHasKey('errors', $response); - $this->assertArrayHasKey('send_friend', $response['storeConfig']); - $this->assertArrayHasKey('enabled_for_customers', $response['storeConfig']['send_friend']); - $this->assertArrayHasKey('enabled_for_guests', $response['storeConfig']['send_friend']); - $this->assertEquals($expectedValues['enabled_for_customers'], $response['storeConfig']['send_friend']['enabled_for_customers']); - $this->assertEquals($expectedValues['enabled_for_guests'], $response['storeConfig']['send_friend']['enabled_for_guests']); + $this->assertArrayNotHasKey( + 'errors', + $response + ); + $this->assertArrayHasKey( + 'send_friend', + $response['storeConfig'] + ); + $this->assertArrayHasKey( + 'enabled_for_customers', + $response['storeConfig']['send_friend'] + ); + $this->assertArrayHasKey( + 'enabled_for_guests', + $response['storeConfig']['send_friend'] + ); + $this->assertEquals( + $expectedValues['enabled_for_customers'], + $response['storeConfig']['send_friend']['enabled_for_customers'] + ); + $this->assertEquals( + $expectedValues['enabled_for_guests'], + $response['storeConfig']['send_friend']['enabled_for_guests'] + ); } /** diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php index 42405256daa62..dfc68cf975d50 100644 --- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php +++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php @@ -19,11 +19,6 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr */ protected $isRedirect = false; - /** - * @var bool - */ - private $headersSent; - /** * @inheritdoc */