-Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results.
+Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
The installation instructions that used to be here are now published on our GitHub site. Use the information on this page to get started or go directly to the guide.
diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php
index 68de06c1c22bd..f74a2907b318f 100644
--- a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php
+++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php
@@ -61,8 +61,10 @@ public function execute()
if (empty($result)) {
$result[] = [
'severity' => (string)\Magento\Framework\Notification\MessageInterface::SEVERITY_NOTICE,
- 'text' => 'You have viewed and resolved all recent system notices. '
- . 'Please refresh the web page to clear the notice alert.',
+ 'text' => __(
+ 'You have viewed and resolved all recent system notices. '
+ . 'Please refresh the web page to clear the notice alert.'
+ )
];
}
$this->getResponse()->representJson($this->jsonHelper->jsonEncode($result));
diff --git a/app/code/Magento/AdminNotification/i18n/en_US.csv b/app/code/Magento/AdminNotification/i18n/en_US.csv
index 7b55e96976cad..8f780efa6c184 100644
--- a/app/code/Magento/AdminNotification/i18n/en_US.csv
+++ b/app/code/Magento/AdminNotification/i18n/en_US.csv
@@ -49,3 +49,4 @@ Severity,Severity
"Date Added","Date Added"
Message,Message
Actions,Actions
+"You have viewed and resolved all recent system notices. Please refresh the web page to clear the notice alert.","You have viewed and resolved all recent system notices. Please refresh the web page to clear the notice alert."
diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php
index ba90bc0c3e210..ffcbf3028b060 100644
--- a/app/code/Magento/Backend/App/AbstractAction.php
+++ b/app/code/Magento/Backend/App/AbstractAction.php
@@ -214,6 +214,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
$this->_view->loadLayout(['default', 'adminhtml_denied'], true, true, false);
$this->_view->renderLayout();
$this->_request->setDispatched(true);
+
return $this->_response;
}
@@ -223,6 +224,11 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
$this->_processLocaleSettings();
+ // Need to preload isFirstPageAfterLogin (see https://github.com/magento/magento2/issues/15510)
+ if ($this->_auth->isLoggedIn()) {
+ $this->_auth->getAuthStorage()->isFirstPageAfterLogin();
+ }
+
return parent::dispatch($request);
}
diff --git a/app/code/Magento/Backend/Block/Dashboard.php b/app/code/Magento/Backend/Block/Dashboard.php
index c8bfb9fdf3110..86dcbe2a625fe 100644
--- a/app/code/Magento/Backend/Block/Dashboard.php
+++ b/app/code/Magento/Backend/Block/Dashboard.php
@@ -18,7 +18,7 @@ class Dashboard extends \Magento\Backend\Block\Template
/**
* @var string
*/
- protected $_template = 'dashboard/index.phtml';
+ protected $_template = 'Magento_Backend::dashboard/index.phtml';
/**
* @return void
diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php
index 301dffbdc4987..8e238ccab44cb 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Graph.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php
@@ -90,7 +90,7 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard
/**
* @var string
*/
- protected $_template = 'dashboard/graph.phtml';
+ protected $_template = 'Magento_Backend::dashboard/graph.phtml';
/**
* Adminhtml dashboard data
diff --git a/app/code/Magento/Backend/Block/Dashboard/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Grid.php
index ac28dcd390ee6..ef812382c4b03 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Grid.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Grid.php
@@ -15,7 +15,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
/**
* @var string
*/
- protected $_template = 'dashboard/grid.phtml';
+ protected $_template = 'Magento_Backend::dashboard/grid.phtml';
/**
* Setting default for every grid on dashboard
diff --git a/app/code/Magento/Backend/Block/Dashboard/Sales.php b/app/code/Magento/Backend/Block/Dashboard/Sales.php
index c82d402d12ec6..891247a385cdf 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Sales.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Sales.php
@@ -16,7 +16,7 @@ class Sales extends \Magento\Backend\Block\Dashboard\Bar
/**
* @var string
*/
- protected $_template = 'dashboard/salebar.phtml';
+ protected $_template = 'Magento_Backend::dashboard/salebar.phtml';
/**
* @var \Magento\Framework\Module\Manager
diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php
index 2f07a88dcccbe..cf383c1e82d03 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Totals.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php
@@ -17,7 +17,7 @@ class Totals extends \Magento\Backend\Block\Dashboard\Bar
/**
* @var string
*/
- protected $_template = 'dashboard/totalbar.phtml';
+ protected $_template = 'Magento_Backend::dashboard/totalbar.phtml';
/**
* @var \Magento\Framework\Module\Manager
diff --git a/app/code/Magento/Backend/Block/Page/Copyright.php b/app/code/Magento/Backend/Block/Page/Copyright.php
index afb3859de450d..613d00e95dc29 100644
--- a/app/code/Magento/Backend/Block/Page/Copyright.php
+++ b/app/code/Magento/Backend/Block/Page/Copyright.php
@@ -15,5 +15,5 @@ class Copyright extends \Magento\Backend\Block\Template
*
* @var string
*/
- protected $_template = 'page/copyright.phtml';
+ protected $_template = 'Magento_Backend::page/copyright.phtml';
}
diff --git a/app/code/Magento/Backend/Block/Page/Footer.php b/app/code/Magento/Backend/Block/Page/Footer.php
index 6f6c9750ca15e..3448113ac2060 100644
--- a/app/code/Magento/Backend/Block/Page/Footer.php
+++ b/app/code/Magento/Backend/Block/Page/Footer.php
@@ -15,7 +15,7 @@ class Footer extends \Magento\Backend\Block\Template
/**
* @var string
*/
- protected $_template = 'page/footer.phtml';
+ protected $_template = 'Magento_Backend::page/footer.phtml';
/**
* @var \Magento\Framework\App\ProductMetadataInterface
diff --git a/app/code/Magento/Backend/Block/Page/Header.php b/app/code/Magento/Backend/Block/Page/Header.php
index 3dc781dab581d..4e1918f4465d9 100644
--- a/app/code/Magento/Backend/Block/Page/Header.php
+++ b/app/code/Magento/Backend/Block/Page/Header.php
@@ -18,7 +18,7 @@ class Header extends \Magento\Backend\Block\Template
/**
* @var string
*/
- protected $_template = 'page/header.phtml';
+ protected $_template = 'Magento_Backend::page/header.phtml';
/**
* Backend data
diff --git a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php
index 6c5d160ee7652..46ce129f5018a 100644
--- a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php
+++ b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php
@@ -23,7 +23,7 @@ class Fieldset extends \Magento\Backend\Block\Template implements \Magento\Frame
/**
* @var string
*/
- protected $_template = 'store/switcher/form/renderer/fieldset.phtml';
+ protected $_template = 'Magento_Backend::store/switcher/form/renderer/fieldset.phtml';
/**
* Retrieve an element
diff --git a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php
index d3c0195fe98b4..a3f896b6ce70c 100644
--- a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php
+++ b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php
@@ -21,7 +21,7 @@ class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Eleme
/**
* @var string
*/
- protected $_template = 'store/switcher/form/renderer/fieldset/element.phtml';
+ protected $_template = 'Magento_Backend::store/switcher/form/renderer/fieldset/element.phtml';
/**
* Retrieve an element
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php
index 2cbe264c5f396..479a2b6b20293 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php
@@ -31,8 +31,7 @@ public function getCondition()
{
if ($this->getValue()) {
return $this->getColumn()->getValue();
- } else {
- return [['neq' => $this->getColumn()->getValue()], ['is' => new \Zend_Db_Expr('NULL')]];
}
+ return [['neq' => $this->getColumn()->getValue()], ['is' => new \Zend_Db_Expr('NULL')]];
}
}
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
index 9ff5b4cab1953..d40e77f7f0580 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php
@@ -205,9 +205,8 @@ public function getSelectedJson()
if ($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) {
$selected = explode(',', $selected);
return join(',', $selected);
- } else {
- return '';
}
+ return '';
}
/**
@@ -220,9 +219,8 @@ public function getSelected()
if ($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) {
$selected = explode(',', $selected);
return $selected;
- } else {
- return [];
}
+ return [];
}
/**
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
index e4590410fc1e5..378368d9b92df 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php
@@ -215,9 +215,8 @@ public function getSelectedJson()
if ($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) {
$selected = explode(',', $selected);
return join(',', $selected);
- } else {
- return '';
}
+ return '';
}
/**
@@ -230,9 +229,8 @@ public function getSelected()
if ($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) {
$selected = explode(',', $selected);
return $selected;
- } else {
- return [];
}
+ return [];
}
/**
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php b/app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php
index 8b934e6760f63..588f3d1a8b827 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php
@@ -46,9 +46,8 @@ public function execute()
// redirect according to rewrite rule
if ($requestUrl != $backendUrl) {
return $this->getRedirect($backendUrl);
- } else {
- return $this->resultPageFactory->create();
}
+ return $this->resultPageFactory->create();
}
/**
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php
index 3ff6ab635e2bc..ac73d3629083a 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php
@@ -29,9 +29,8 @@ private function getSecurityCookie()
{
if (!($this->securityCookie instanceof SecurityCookie)) {
return \Magento\Framework\App\ObjectManager::getInstance()->get(SecurityCookie::class);
- } else {
- return $this->securityCookie;
}
+ return $this->securityCookie;
}
/**
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
index 02e5145e569ff..585ae4b1ed4d6 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
@@ -41,11 +41,11 @@
-
+
diff --git a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
index 40a275ed6a98e..0b785aa9984aa 100644
--- a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
+++ b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
@@ -85,7 +85,7 @@
+ translate="'Search strings are either normal strings or regular expressions (PCRE). They are matched in the same order as entered.'">
:
diff --git a/app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php b/app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php
index 5c28b94ac9811..372415d3530c0 100644
--- a/app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php
+++ b/app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php
@@ -34,10 +34,9 @@ public function __get($name)
{
if (array_key_exists($name, $this->_attributes)) {
return $this->_attributes[$name];
- } else {
- trigger_error('Undefined property on ' . get_class($this) . ': ' . $name, E_USER_NOTICE);
- return null;
}
+ trigger_error('Undefined property on ' . get_class($this) . ': ' . $name, E_USER_NOTICE);
+ return null;
}
/**
diff --git a/app/code/Magento/Braintree/i18n/en_US.csv b/app/code/Magento/Braintree/i18n/en_US.csv
index f5e2d36e1e9bb..bce38100b9e33 100644
--- a/app/code/Magento/Braintree/i18n/en_US.csv
+++ b/app/code/Magento/Braintree/i18n/en_US.csv
@@ -165,4 +165,5 @@ Debug,Debug
"credit_card","Credit card"
"apple_pay_card","Apple pay card"
"android_pay_card","Android pay card"
-"Accept credit/debit cards and PayPal in your Magento store. No setup or monthly fees and your customers never leave your store to complete the purchase.","Accept credit/debit cards and PayPal in your Magento store. No setup or monthly fees and your customers never leave your store to complete the purchase."
\ No newline at end of file
+"Accept credit/debit cards and PayPal in your Magento store. No setup or monthly fees and your customers never leave your store to complete the purchase.","Accept credit/debit cards and PayPal in your Magento store. No setup or monthly fees and your customers never leave your store to complete the purchase."
+"Save for later use.","Save for later use."
diff --git a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
index b039d4287a2e8..76a4a28307e26 100644
--- a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
+++ b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
@@ -84,7 +84,7 @@ $ccType = $block->getInfoData('cc_type');
name="payment[is_active_payment_token_enabler]"
class="admin__control-checkbox"/>
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
index e8efb593c441b..218814de99078 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
@@ -62,9 +62,8 @@ public function getChildren($item)
if (isset($itemsArray[$item->getOrderItem()->getId()])) {
return $itemsArray[$item->getOrderItem()->getId()];
- } else {
- return null;
}
+ return null;
}
/**
@@ -186,9 +185,8 @@ public function getOrderItem()
{
if ($this->getItem() instanceof \Magento\Sales\Model\Order\Item) {
return $this->getItem();
- } else {
- return $this->getItem()->getOrderItem();
}
+ return $this->getItem()->getOrderItem();
}
/**
diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php
index d7f6f34b79b2f..b2ec246427afe 100644
--- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php
+++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php
@@ -174,9 +174,8 @@ public function isSelected($selection)
return in_array($selection->getSelectionId(), $selectedOptions);
} elseif ($selectedOptions == 'None') {
return false;
- } else {
- return $selection->getIsDefault() && $selection->isSaleable();
}
+ return $selection->getIsDefault() && $selection->isSaleable();
}
/**
diff --git a/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php
index 144115bee48d7..7932e41ef8d7e 100644
--- a/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php
@@ -114,9 +114,8 @@ public function getValueHtml($item)
if ($attributes = $this->getSelectionAttributes($item)) {
return sprintf('%d', $attributes['qty']) . ' x ' . $this->escapeHtml($item->getName()) . " "
. $this->getOrder()->formatPrice($attributes['price']);
- } else {
- return $this->escapeHtml($item->getName());
}
+ return $this->escapeHtml($item->getName());
}
/**
@@ -151,9 +150,8 @@ public function getChildren($item)
if (isset($itemsArray[$item->getOrderItem()->getId()])) {
return $itemsArray[$item->getOrderItem()->getId()];
- } else {
- return null;
}
+ return null;
}
/**
diff --git a/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php b/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php
index f3c0548f76e5d..1914d5b5146c3 100644
--- a/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php
+++ b/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php
@@ -29,8 +29,7 @@ public function aroundValidate(
&& $object->getPriceType() == \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC
) {
return true;
- } else {
- return $proceed($object);
}
+ return $proceed($object);
}
}
diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php
index 58a0418ec3ebd..affabcb7be4f3 100644
--- a/app/code/Magento/Bundle/Model/Product/Type.php
+++ b/app/code/Magento/Bundle/Model/Product/Type.php
@@ -948,9 +948,8 @@ public function shakeSelections($firstItem, $secondItem)
];
if ($aPosition == $bPosition) {
return 0;
- } else {
- return $aPosition < $bPosition ? -1 : 1;
}
+ return $aPosition < $bPosition ? -1 : 1;
}
/**
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php
index dd126b874745d..6741f62fad884 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php
@@ -44,9 +44,8 @@ public function getChildren($item)
if (isset($itemsArray[$item->getOrderItem()->getId()])) {
return $itemsArray[$item->getOrderItem()->getId()];
- } else {
- return null;
}
+ return null;
}
/**
@@ -196,9 +195,8 @@ public function getOrderItem()
{
if ($this->getItem() instanceof \Magento\Sales\Model\Order\Item) {
return $this->getItem();
- } else {
- return $this->getItem()->getOrderItem();
}
+ return $this->getItem()->getOrderItem();
}
/**
diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php
index 52d7f3a652f82..6d8b2105e9cf0 100644
--- a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php
+++ b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php
@@ -267,9 +267,8 @@ public function calculateBundleAmount($basePriceValue, $bundleProduct, $selectio
{
if ($bundleProduct->getPriceType() == Price::PRICE_TYPE_FIXED) {
return $this->calculateFixedBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude);
- } else {
- return $this->calculateDynamicBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude);
}
+ return $this->calculateDynamicBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude);
}
/**
diff --git a/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php b/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php
index cdfe31358cc15..60245bef722c6 100644
--- a/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php
+++ b/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php
@@ -163,8 +163,7 @@ public function getProduct()
{
if ($this->bundleProduct->getPriceType() == Price::PRICE_TYPE_DYNAMIC) {
return parent::getProduct();
- } else {
- return $this->bundleProduct;
}
+ return $this->bundleProduct;
}
}
diff --git a/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php b/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php
index df63c9c03cbf6..4f2f35b076d82 100644
--- a/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php
+++ b/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php
@@ -124,9 +124,8 @@ public function getValue()
$this->priceInfo
->getPrice(BundleDiscountPrice::PRICE_CODE)
->calculateDiscount($configuredOptionsAmount);
- } else {
- return parent::getValue();
}
+ return parent::getValue();
}
/**
diff --git a/app/code/Magento/Captcha/i18n/en_US.csv b/app/code/Magento/Captcha/i18n/en_US.csv
index 2de4ab5345c88..e9ab30df6a0ca 100644
--- a/app/code/Magento/Captcha/i18n/en_US.csv
+++ b/app/code/Magento/Captcha/i18n/en_US.csv
@@ -20,11 +20,7 @@ Forms,Forms
"Number of Symbols","Number of Symbols"
"Please specify 8 symbols at the most. Range allowed (e.g. 3-5)","Please specify 8 symbols at the most. Range allowed (e.g. 3-5)"
"Symbols Used in CAPTCHA","Symbols Used in CAPTCHA"
-"
- Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed. Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.
- ","
- Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed. Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.
- "
+"Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed. Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.","Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed. Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer."
"Case Sensitive","Case Sensitive"
"Enable CAPTCHA on Storefront","Enable CAPTCHA on Storefront"
"CAPTCHA for ""Create user"" and ""Forgot password"" forms is always enabled if chosen.","CAPTCHA for ""Create user"" and ""Forgot password"" forms is always enabled if chosen."
diff --git a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
index eb5203626e6e1..4f8840b31b577 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
@@ -238,7 +238,7 @@ public function getChildrenIds($parentId, $required = true)
}
/**
- * Retrieve parent ids array by requered child
+ * Retrieve parent ids array by required child
*
* @param int|array $childId
* @return array
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
index 325d8ceee0d39..38831ed9138f1 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
@@ -311,7 +311,7 @@ public function joinUrlRewrite()
['request_path'],
sprintf(
'{{table}}.is_autogenerated = 1 AND {{table}}.store_id = %d AND {{table}}.entity_type = \'%s\'',
- $this->_storeManager->getStore()->getId(),
+ $this->getStoreId(),
CategoryUrlRewriteGenerator::ENTITY_TYPE
),
'left'
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php
index d329ca6f51572..188167b7c609f 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php
@@ -137,7 +137,7 @@ public function getDefaultStoreId()
*
* @param string $table
* @param array|int $attributeIds
- * @return \Magento\Eav\Model\Entity\Collection\AbstractCollection
+ * @return \Magento\Framework\DB\Select
*/
protected function _getLoadAttributesSelect($table, $attributeIds = [])
{
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
index 406bd595401ca..886466c3ffd09 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
@@ -1535,7 +1535,7 @@ protected function getEntityPkName(\Magento\Eav\Model\Entity\AbstractEntity $ent
}
/**
- * Add requere tax percent flag for product collection
+ * Add require tax percent flag for product collection
*
* @return $this
*/
diff --git a/app/code/Magento/Catalog/Setup/InstallSchema.php b/app/code/Magento/Catalog/Setup/InstallSchema.php
index d82f595600ce2..2307e848f00b4 100644
--- a/app/code/Magento/Catalog/Setup/InstallSchema.php
+++ b/app/code/Magento/Catalog/Setup/InstallSchema.php
@@ -674,7 +674,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
- 'Attriute Set ID'
+ 'Attribute Set ID'
)
->addColumn(
'parent_id',
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Category/Collection/UrlRewriteTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Category/Collection/UrlRewriteTest.php
new file mode 100644
index 0000000000000..d3b3ce05ee4b8
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Category/Collection/UrlRewriteTest.php
@@ -0,0 +1,39 @@
+_model = $this->getMockBuilder(\Magento\Catalog\Model\ResourceModel\Category\Collection::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['joinTable'])
+ ->getMock();
+ }
+
+ public function testStoreIdUsedByUrlRewrite()
+ {
+ $cond = '{{table}}.is_autogenerated = 1 AND {{table}}.store_id = 100 AND {{table}}.entity_type = \'category\'';
+ $this->_model->expects($this->once())
+ ->method('joinTable')
+ ->with(
+ $this->anything(),
+ $this->anything(),
+ $this->anything(),
+ $this->equalTo($cond),
+ $this->anything()
+ );
+ $this->_model->setStoreId(100);
+ $this->_model->joinUrlRewrite();
+ }
+}
diff --git a/app/code/Magento/Catalog/view/base/web/js/price-utils.js b/app/code/Magento/Catalog/view/base/web/js/price-utils.js
index 36269ab1d241b..4d3747a108068 100644
--- a/app/code/Magento/Catalog/view/base/web/js/price-utils.js
+++ b/app/code/Magento/Catalog/view/base/web/js/price-utils.js
@@ -70,7 +70,7 @@ define([
am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision));
r = (j ? i.substr(0, j) + groupSymbol : '') +
i.substr(j).replace(re, '$1' + groupSymbol) +
- (precision ? decimalSymbol + am.toFixed(2).replace(/-/, 0).slice(2) : '');
+ (precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : '');
return pattern.replace('%s', r).replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
index 5c8ca18fc5bc3..f79a2430fcab1 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
@@ -47,7 +47,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
' : '
' ?>
-
+
getImage($_product, $image);
if ($pos != null) {
diff --git a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js
index a819e4248fea7..3c969fc784bd5 100644
--- a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js
+++ b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js
@@ -33,6 +33,10 @@ define([
_bindSubmit: function() {
var self = this;
+ if (this.element.data('catalog-addtocart-initialized')) {
+ return;
+ }
+ this.element.data('catalog-addtocart-initialized', 1);
this.element.on('submit', function(e) {
e.preventDefault();
self.submitForm($(this));
diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml
index 7b435db200f19..26c601a4e9f38 100644
--- a/app/code/Magento/Checkout/etc/webapi.xml
+++ b/app/code/Magento/Checkout/etc/webapi.xml
@@ -104,7 +104,7 @@
-
+
diff --git a/app/code/Magento/Config/Block/System/Config/Form.php b/app/code/Magento/Config/Block/System/Config/Form.php
index 7498ae8fbc267..668744d147917 100644
--- a/app/code/Magento/Config/Block/System/Config/Form.php
+++ b/app/code/Magento/Config/Block/System/Config/Form.php
@@ -366,15 +366,6 @@ protected function _initElement(
$data = $this->getConfigValue($path);
}
}
- $fieldRendererClass = $field->getFrontendModel();
- if ($fieldRendererClass) {
- $fieldRenderer = $this->_layout->getBlockSingleton($fieldRendererClass);
- } else {
- $fieldRenderer = $this->_fieldRenderer;
- }
-
- $fieldRenderer->setForm($this);
- $fieldRenderer->setConfigData($this->_configData);
$elementName = $this->_generateElementName($field->getPath(), $fieldPrefix);
$elementId = $this->_generateElementId($field->getPath($fieldPrefix));
@@ -420,7 +411,7 @@ protected function _initElement(
if ($field->hasOptions()) {
$formField->setValues($field->getOptions());
}
- $formField->setRenderer($fieldRenderer);
+ $formField->setRenderer($this->resolveFieldRenderer($field));
}
/**
@@ -684,7 +675,7 @@ protected function _getAdditionalElementTypes()
}
/**
- * Temporary moved those $this->getRequest()->getParam('blabla') from the code accross this block
+ * Temporary moved those $this->getRequest()->getParam('blabla') from the code across this block
* to getBlala() methods to be later set from controller with setters
*/
@@ -791,4 +782,23 @@ private function getAppConfigDataValue($path)
}
return $data->getData($path);
}
+
+ /**
+ * @param \Magento\Config\Model\Config\Structure\Element\Field $field
+ * @return Form\Field|\Magento\Framework\View\Element\BlockInterface
+ * @throws \Magento\Framework\Exception\LocalizedException
+ */
+ private function resolveFieldRenderer(\Magento\Config\Model\Config\Structure\Element\Field $field)
+ {
+ $fieldRendererClass = $field->getFrontendModel();
+ if ($fieldRendererClass) {
+ $fieldRenderer = $this->_layout->getBlockSingleton($fieldRendererClass);
+ } else {
+ $fieldRenderer = $this->_fieldRenderer;
+ }
+
+ $fieldRenderer->setForm($this);
+ $fieldRenderer->setConfigData($this->_configData);
+ return $fieldRenderer;
+ }
}
diff --git a/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php b/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php
index 38cca1bee6a6a..2aac25ef1be63 100644
--- a/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php
+++ b/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php
@@ -246,9 +246,8 @@ protected function _getSuperAttributeId($productId, $attributeId)
{
if (isset($this->_productSuperAttrs["{$productId}_{$attributeId}"])) {
return $this->_productSuperAttrs["{$productId}_{$attributeId}"];
- } else {
- return null;
}
+ return null;
}
/**
@@ -605,7 +604,7 @@ protected function _insertData()
}
/**
- * Get new supper attribute id.
+ * Get new super attribute id.
*
* @return int
*/
diff --git a/app/code/Magento/Customer/Controller/Section/Load.php b/app/code/Magento/Customer/Controller/Section/Load.php
index e99dcdb2cf96a..dbe640ef2a365 100644
--- a/app/code/Magento/Customer/Controller/Section/Load.php
+++ b/app/code/Magento/Customer/Controller/Section/Load.php
@@ -61,6 +61,8 @@ public function execute()
{
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
$resultJson = $this->resultJsonFactory->create();
+ $resultJson->setHeader('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store', true);
+ $resultJson->setHeader('Pragma', 'no-cache', true);
try {
$sectionNames = $this->getRequest()->getParam('sections');
$sectionNames = $sectionNames ? array_unique(\explode(',', $sectionNames)) : null;
diff --git a/app/code/Magento/Customer/Model/Session.php b/app/code/Magento/Customer/Model/Session.php
index adff23cea698e..d951cad90558d 100644
--- a/app/code/Magento/Customer/Model/Session.php
+++ b/app/code/Magento/Customer/Model/Session.php
@@ -552,7 +552,7 @@ public function setAfterAuthUrl($url)
}
/**
- * Reset core session hosts after reseting session ID
+ * Reset core session hosts after resetting session ID
*
* @return $this
*/
diff --git a/app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml b/app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml
index 6c011330b9798..e020b9a95b55c 100644
--- a/app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml
+++ b/app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml
@@ -11,7 +11,7 @@
$partners = $block->getPartners();
?>
- getPartners() as $partner) : ?>
+
*/
diff --git a/app/code/Magento/Multishipping/Block/Checkout/Shipping.php b/app/code/Magento/Multishipping/Block/Checkout/Shipping.php
index c254c9c8e9981..4041e7da7bdd8 100644
--- a/app/code/Magento/Multishipping/Block/Checkout/Shipping.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Shipping.php
@@ -9,7 +9,7 @@
use Magento\Quote\Model\Quote\Address;
/**
- * Mustishipping checkout shipping
+ * Multishipping checkout shipping
*
* @author Magento Core Team
*/
diff --git a/app/code/Magento/Paypal/Model/Api/Nvp.php b/app/code/Magento/Paypal/Model/Api/Nvp.php
index b4417a33ffc46..dcc450a29fd47 100644
--- a/app/code/Magento/Paypal/Model/Api/Nvp.php
+++ b/app/code/Magento/Paypal/Model/Api/Nvp.php
@@ -1027,7 +1027,7 @@ public function callGetPalDetails()
}
/**
- * Set Customer BillingA greement call
+ * Set Customer BillingAgreement call
*
* @return void
* @link https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_SetCustomerBillingAgreement
@@ -1418,7 +1418,7 @@ protected function _deformatNVP($nvpstr)
$nvpstr = strpos($nvpstr, "\r\n\r\n") !== false ? substr($nvpstr, strpos($nvpstr, "\r\n\r\n") + 4) : $nvpstr;
while (strlen($nvpstr)) {
- //postion of Key
+ //position of Key
$keypos = strpos($nvpstr, '=');
//position of value
$valuepos = strpos($nvpstr, '&') ? strpos($nvpstr, '&') : strlen($nvpstr);
@@ -1426,7 +1426,7 @@ protected function _deformatNVP($nvpstr)
/*getting the Key and Value values and storing in a Associative Array*/
$keyval = substr($nvpstr, $intial, $keypos);
$valval = substr($nvpstr, $keypos + 1, $valuepos - $keypos - 1);
- //decoding the respose
+ //decoding the response
$nvpArray[urldecode($keyval)] = urldecode($valval);
$nvpstr = substr($nvpstr, $valuepos + 1, strlen($nvpstr));
}
diff --git a/app/code/Magento/Paypal/i18n/en_US.csv b/app/code/Magento/Paypal/i18n/en_US.csv
index 56ec49f4eb0d4..02eb325a808d0 100644
--- a/app/code/Magento/Paypal/i18n/en_US.csv
+++ b/app/code/Magento/Paypal/i18n/en_US.csv
@@ -348,7 +348,7 @@ expires,expires
here,here
" to learn more."," to learn more."
"Important: ","Important: "
-"To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.","To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website."
+"To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.","To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website."
"Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below","Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below"
"To use PayPal Payflow Link, you must configure your PayPal Payflow Link account on the PayPal website.","To use PayPal Payflow Link, you must configure your PayPal Payflow Link account on the PayPal website."
"Once you log into your PayPal Payflow Link account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below","Once you log into your PayPal Payflow Link account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below"
@@ -680,3 +680,4 @@ User,User
"payflowpro","Payflow Pro"
"Payments Pro","Payments Pro"
"Website Payments Pro","Website Payments Pro"
+"Save for later use.","Save for later use."
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml
index 6442ce7c81921..00f9b5e969634 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml
@@ -12,7 +12,7 @@
escapeHtml(__('Important: ')); ?>
- escapeHtml(__('To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.')); ?>
+ escapeHtml(__('To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.')); ?>
escapeHtml(__('Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below')); ?>