diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml
index baed8c1ce04de..71452a2d65e97 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/addtocart.phtml
@@ -33,7 +33,7 @@
= $block->getChildHtml('', true) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml
index a2b91a5eeb99f..40f86c7e68d6c 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml
@@ -14,7 +14,7 @@
-getProduct()->getFinalPrice()):?>
+getProduct()->getPriceInfo()->getPrice(\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE)->getAmount()):?>
= $block->getChildHtml('meta.currency') ?>
diff --git a/app/code/Magento/Catalog/view/frontend/web/js/validate-product.js b/app/code/Magento/Catalog/view/frontend/web/js/validate-product.js
index c0637cb672dc6..755e777a01f77 100644
--- a/app/code/Magento/Catalog/view/frontend/web/js/validate-product.js
+++ b/app/code/Magento/Catalog/view/frontend/web/js/validate-product.js
@@ -13,7 +13,8 @@ define([
$.widget('mage.productValidate', {
options: {
bindSubmit: false,
- radioCheckboxClosest: '.nested'
+ radioCheckboxClosest: '.nested',
+ addToCartButtonSelector: '.action.tocart'
},
/**
@@ -41,6 +42,7 @@ define([
return false;
}
});
+ $(this.options.addToCartButtonSelector).attr('disabled', false);
}
});
diff --git a/app/code/Magento/Checkout/Model/Cart.php b/app/code/Magento/Checkout/Model/Cart.php
index c0ba9616754bb..0eb59fc70d92f 100644
--- a/app/code/Magento/Checkout/Model/Cart.php
+++ b/app/code/Magento/Checkout/Model/Cart.php
@@ -15,6 +15,7 @@
* Shopping cart model
*
* @api
+ * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @deprecated 100.1.0 Use \Magento\Quote\Model\Quote instead
*/
@@ -354,22 +355,10 @@ protected function _getProductRequest($requestInfo)
public function addProduct($productInfo, $requestInfo = null)
{
$product = $this->_getProduct($productInfo);
- $request = $this->_getProductRequest($requestInfo);
$productId = $product->getId();
if ($productId) {
- $stockItem = $this->stockRegistry->getStockItem($productId, $product->getStore()->getWebsiteId());
- $minimumQty = $stockItem->getMinSaleQty();
- //If product quantity is not specified in request and there is set minimal qty for it
- if ($minimumQty
- && $minimumQty > 0
- && !$request->getQty()
- ) {
- $request->setQty($minimumQty);
- }
- }
-
- if ($productId) {
+ $request = $this->getQtyRequest($product, $requestInfo);
try {
$result = $this->getQuote()->addProduct($product, $request);
} catch (\Magento\Framework\Exception\LocalizedException $e) {
@@ -425,8 +414,9 @@ public function addProductsByIds($productIds)
}
$product = $this->_getProduct($productId);
if ($product->getId() && $product->isVisibleInCatalog()) {
+ $request = $this->getQtyRequest($product);
try {
- $this->getQuote()->addProduct($product);
+ $this->getQuote()->addProduct($product, $request);
} catch (\Exception $e) {
$allAdded = false;
}
@@ -747,4 +737,26 @@ private function getRequestInfoFilter()
}
return $this->requestInfoFilter;
}
+
+ /**
+ * Get request quantity
+ *
+ * @param Product $product
+ * @param \Magento\Framework\DataObject|int|array $request
+ * @return int|DataObject
+ */
+ private function getQtyRequest($product, $request = 0)
+ {
+ $request = $this->_getProductRequest($request);
+ $stockItem = $this->stockRegistry->getStockItem($product->getId(), $product->getStore()->getWebsiteId());
+ $minimumQty = $stockItem->getMinSaleQty();
+ //If product quantity is not specified in request and there is set minimal qty for it
+ if ($minimumQty
+ && $minimumQty > 0
+ && !$request->getQty()
+ ) {
+ $request->setQty($minimumQty);
+ }
+ return $request;
+ }
}
diff --git a/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php b/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php
index aa73e275ee0ca..f82a4d15ae8bf 100644
--- a/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php
+++ b/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php
@@ -5,10 +5,13 @@
*/
namespace Magento\Customer\CustomerData\Plugin;
-use Magento\Framework\Session\SessionManager;
+use Magento\Framework\Session\SessionManagerInterface;
use Magento\Framework\Stdlib\Cookie\CookieMetadataFactory;
use Magento\Framework\Stdlib\Cookie\PhpCookieManager;
+/**
+ * Class SessionChecker
+ */
class SessionChecker
{
/**
@@ -36,10 +39,12 @@ public function __construct(
/**
* Delete frontend session cookie if customer session is expired
*
- * @param SessionManager $sessionManager
+ * @param SessionManagerInterface $sessionManager
* @return void
+ * @throws \Magento\Framework\Exception\InputException
+ * @throws \Magento\Framework\Stdlib\Cookie\FailureToSendException
*/
- public function beforeStart(SessionManager $sessionManager)
+ public function beforeStart(SessionManagerInterface $sessionManager)
{
if (!$this->cookieManager->getCookie($sessionManager->getName())
&& $this->cookieManager->getCookie('mage-cache-sessid')
diff --git a/app/code/Magento/Customer/etc/frontend/di.xml b/app/code/Magento/Customer/etc/frontend/di.xml
index 4a45c4ad48d19..c31742519e581 100644
--- a/app/code/Magento/Customer/etc/frontend/di.xml
+++ b/app/code/Magento/Customer/etc/frontend/di.xml
@@ -57,7 +57,7 @@
-
+
@@ -77,4 +77,4 @@
-
+
\ No newline at end of file
diff --git a/app/code/Magento/Msrp/etc/adminhtml/system.xml b/app/code/Magento/Msrp/etc/adminhtml/system.xml
index 8ce0ea67343f8..c20d753a2e794 100644
--- a/app/code/Magento/Msrp/etc/adminhtml/system.xml
+++ b/app/code/Magento/Msrp/etc/adminhtml/system.xml
@@ -10,7 +10,7 @@
-
+
Magento\Config\Model\Config\Source\Yesno
diff --git a/app/code/Magento/Msrp/i18n/en_US.csv b/app/code/Magento/Msrp/i18n/en_US.csv
index d647f8527ec15..d47d72b2bdc9a 100644
--- a/app/code/Magento/Msrp/i18n/en_US.csv
+++ b/app/code/Magento/Msrp/i18n/en_US.csv
@@ -13,6 +13,7 @@ Price,Price
"Add to Cart","Add to Cart"
"Minimum Advertised Price","Minimum Advertised Price"
"Enable MAP","Enable MAP"
+"Warning! Enabling MAP by default will hide all product prices on Storefront.","Warning! Enabling MAP by default will hide all product prices on Storefront."
"Display Actual Price","Display Actual Price"
"Default Popup Text Message","Default Popup Text Message"
"Default ""What's This"" Text Message","Default ""What's This"" Text Message"
diff --git a/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php b/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php
index 3738a479816b3..497e32157de05 100644
--- a/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php
+++ b/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php
@@ -11,6 +11,7 @@
use Magento\Framework\Controller\ResultInterface;
use Magento\Framework\Session\Generic;
use Magento\Framework\Session\SessionManager;
+use Magento\Framework\Session\SessionManagerInterface;
use Magento\Paypal\Model\Payflow\Service\Request\SecureToken;
use Magento\Paypal\Model\Payflow\Transparent;
use Magento\Quote\Model\Quote;
@@ -39,7 +40,7 @@ class RequestSecureToken extends \Magento\Framework\App\Action\Action
private $secureTokenService;
/**
- * @var SessionManager
+ * @var SessionManager|SessionManagerInterface
*/
private $sessionManager;
@@ -55,6 +56,7 @@ class RequestSecureToken extends \Magento\Framework\App\Action\Action
* @param SecureToken $secureTokenService
* @param SessionManager $sessionManager
* @param Transparent $transparent
+ * @param SessionManagerInterface|null $sessionInterface
*/
public function __construct(
Context $context,
@@ -62,12 +64,13 @@ public function __construct(
Generic $sessionTransparent,
SecureToken $secureTokenService,
SessionManager $sessionManager,
- Transparent $transparent
+ Transparent $transparent,
+ SessionManagerInterface $sessionInterface = null
) {
$this->resultJsonFactory = $resultJsonFactory;
$this->sessionTransparent = $sessionTransparent;
$this->secureTokenService = $secureTokenService;
- $this->sessionManager = $sessionManager;
+ $this->sessionManager = $sessionInterface ?: $sessionManager;
$this->transparent = $transparent;
parent::__construct($context);
}
diff --git a/app/code/Magento/Swatches/view/frontend/web/css/swatches.css b/app/code/Magento/Swatches/view/frontend/web/css/swatches.css
index 67b9fffcf1282..fb1dcff2ecfb0 100644
--- a/app/code/Magento/Swatches/view/frontend/web/css/swatches.css
+++ b/app/code/Magento/Swatches/view/frontend/web/css/swatches.css
@@ -31,6 +31,10 @@
margin-top: 10px;
}
+.swatch-attribute-options:focus {
+ box-shadow: none;
+}
+
.swatch-option {
/*width: 30px;*/
padding: 1px 2px;
@@ -47,6 +51,10 @@
text-overflow: ellipsis;
}
+.swatch-option:focus {
+ box-shadow: 0 0 3px 1px #68a8e0;
+}
+
.swatch-option.text {
background: #F0F0F0;
color: #686868;
diff --git a/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/actions-bar/_store-switcher.less b/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/actions-bar/_store-switcher.less
index 0bd6cc62bd509..1bf1c51f54976 100644
--- a/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/actions-bar/_store-switcher.less
+++ b/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/actions-bar/_store-switcher.less
@@ -236,6 +236,7 @@
.store-view {
&:not(.store-switcher) {
float: left;
+ margin-top: 13px;
}
.store-switcher-label {
diff --git a/app/design/frontend/Magento/luma/Magento_Bundle/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Bundle/web/css/source/_module.less
index eeb17653c877b..ac415f007f86e 100644
--- a/app/design/frontend/Magento/luma/Magento_Bundle/web/css/source/_module.less
+++ b/app/design/frontend/Magento/luma/Magento_Bundle/web/css/source/_module.less
@@ -58,6 +58,11 @@
.field.choice {
input {
float: left;
+ margin-top: 4px;
+ }
+
+ input[type='checkbox'] {
+ margin-top: 2px;
}
.label {
diff --git a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less
index 4bf41343919d0..fca906d432790 100644
--- a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less
+++ b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less
@@ -294,6 +294,11 @@
}
.product-options-wrapper {
+ .fieldset {
+ &:focus {
+ box-shadow: none;
+ }
+ }
.fieldset-product-options-inner {
.legend {
.lib-css(font-weight, @font-weight__semibold);
diff --git a/lib/internal/Magento/Framework/View/Context.php b/lib/internal/Magento/Framework/View/Context.php
index c3f1c3e691c84..508d63d158bd7 100644
--- a/lib/internal/Magento/Framework/View/Context.php
+++ b/lib/internal/Magento/Framework/View/Context.php
@@ -14,6 +14,7 @@
use Magento\Framework\Event\ManagerInterface;
use Psr\Log\LoggerInterface as Logger;
use Magento\Framework\Session\SessionManager;
+use Magento\Framework\Session\SessionManagerInterface;
use Magento\Framework\TranslateInterface;
use Magento\Framework\UrlInterface;
use Magento\Framework\View\ConfigInterface as ViewConfig;
@@ -144,6 +145,7 @@ class Context
* @param Logger $logger
* @param AppState $appState
* @param LayoutInterface $layout
+ * @param SessionManagerInterface|null $sessionManager
*
* @todo reduce parameter number
*
@@ -163,7 +165,8 @@ public function __construct(
CacheState $cacheState,
Logger $logger,
AppState $appState,
- LayoutInterface $layout
+ LayoutInterface $layout,
+ SessionManagerInterface $sessionManager = null
) {
$this->request = $request;
$this->eventManager = $eventManager;
@@ -171,7 +174,7 @@ public function __construct(
$this->translator = $translator;
$this->cache = $cache;
$this->design = $design;
- $this->session = $session;
+ $this->session = $sessionManager ?: $session;
$this->scopeConfig = $scopeConfig;
$this->frontController = $frontController;
$this->viewConfig = $viewConfig;
@@ -332,6 +335,8 @@ public function getModuleName()
}
/**
+ * Get Front Name
+ *
* @see getModuleName
*/
public function getFrontName()