From f0032eef4ddebeec30caafac764c1c5262ee4ec3 Mon Sep 17 00:00:00 2001 From: Parag Chavare Date: Wed, 23 Jan 2019 17:55:52 +0530 Subject: [PATCH 01/12] bundle-product-radio-button-misalign --- .../Magento/luma/Magento_Bundle/web/css/source/_module.less | 1 + 1 file changed, 1 insertion(+) 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 43ae23bab7895..99c8aa1ad2bae 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,7 @@ .field.choice { input { float: left; + margin-top: 4px; } .label { From f4bec9aec5a22af59021b937fc09555823d3598e Mon Sep 17 00:00:00 2001 From: amol 2jcommerce Date: Mon, 4 Feb 2019 20:20:11 +0530 Subject: [PATCH 02/12] admin-store-view-label-not-alignment-2 --- .../web/css/source/module/main/actions-bar/_store-switcher.less | 1 + 1 file changed, 1 insertion(+) 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 80bebb22a9043..8daa7d5808d06 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 @@ -235,6 +235,7 @@ .store-view { &:not(.store-switcher) { float: left; + margin-top: 13px; } .store-switcher-label { From 85cdc9d41bb027aca3ce5b4412f67e8af634c141 Mon Sep 17 00:00:00 2001 From: milindsingh Date: Sat, 29 Dec 2018 00:08:12 +0530 Subject: [PATCH 03/12] Issue fix #20010 Wrong price amount in opengraph Issue fix #20010 Wrong price amount in opengraph --- .../frontend/templates/product/view/opengraph/general.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()):?> getChildHtml('meta.currency') ?> From 79d5de06262da335e0762ad6f0e47e85c0199fe1 Mon Sep 17 00:00:00 2001 From: Sunil Patel Date: Wed, 6 Feb 2019 12:08:57 +0530 Subject: [PATCH 04/12] disable add to cart until page load --- .../view/frontend/templates/product/view/addtocart.phtml | 2 +- .../Magento/Catalog/view/frontend/web/js/validate-product.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 9c18a18ff5837..fc578c7652419 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 @@ -32,7 +32,7 @@ getChildHtml('', true) ?> 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..ab848aa442f81 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); } }); From 410dc5101e1e6e78f9976af13f07966a1bbc8d1f Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Mon, 11 Feb 2019 15:14:09 +0200 Subject: [PATCH 05/12] ENGCOM-4178: Static test fix. --- .../Magento/Catalog/view/frontend/web/js/validate-product.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ab848aa442f81..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 @@ -42,7 +42,7 @@ define([ return false; } }); - $(this.options.addToCartButtonSelector).attr('disabled',false); + $(this.options.addToCartButtonSelector).attr('disabled', false); } }); From 180db3301dedcc50a1098c3b97ca715dd6f978e1 Mon Sep 17 00:00:00 2001 From: amol 2jcommerce Date: Thu, 14 Feb 2019 10:51:02 +0530 Subject: [PATCH 06/12] focus-not-proper-on-configurable-product-swatches-2.2 --- .../Magento/Swatches/view/frontend/web/css/swatches.css | 8 ++++++++ .../luma/Magento_Catalog/web/css/source/_module.less | 5 +++++ 2 files changed, 13 insertions(+) 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/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less index 228c6947c938b..365b7736b7e14 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); From 1a05beb053d2f36f9df194834d655d68787629d4 Mon Sep 17 00:00:00 2001 From: amol 2jcommerce Date: Mon, 18 Feb 2019 10:38:57 +0530 Subject: [PATCH 07/12] update branch 2.2-develop-PR-port-20519 --- .../Magento/luma/Magento_Bundle/web/css/source/_module.less | 4 ++++ 1 file changed, 4 insertions(+) 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 99c8aa1ad2bae..262e2d68d1ea3 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 @@ -61,6 +61,10 @@ margin-top: 4px; } + input[type="checkbox"] { + margin-top: 2px; + } + .label { &:extend(.abs-add-clearfix all); display: block; From 9dccad1672b750908268b2577104e94a8857886a Mon Sep 17 00:00:00 2001 From: mageprince Date: Tue, 19 Feb 2019 11:03:37 +0530 Subject: [PATCH 08/12] Minimum Qty Allowed in Shopping Cart not working on related product --- app/code/Magento/Checkout/Model/Cart.php | 40 +++++++++++++++--------- 1 file changed, 26 insertions(+), 14 deletions(-) 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; + } } From eaf914bfdf964b434f8a575e9141a566a0d96a72 Mon Sep 17 00:00:00 2001 From: Yogesh Suhagiya Date: Wed, 13 Feb 2019 11:03:55 +0530 Subject: [PATCH 09/12] Added translation for comment tag --- app/code/Magento/Msrp/etc/adminhtml/system.xml | 2 +- app/code/Magento/Msrp/i18n/en_US.csv | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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" From f5df1a8e4e4a97ee5ce6b7f1fdd0e5f90a41c679 Mon Sep 17 00:00:00 2001 From: Jaimin Sutariya Date: Sun, 27 Jan 2019 14:06:01 +0530 Subject: [PATCH 10/12] Removed direct use of SessionManager class, used SessionManagerInterface instead --- .../Customer/CustomerData/Plugin/SessionChecker.php | 8 ++++---- app/code/Magento/Customer/etc/frontend/di.xml | 4 ++-- .../Controller/Transparent/RequestSecureToken.php | 11 +++++++---- lib/internal/Magento/Framework/View/Context.php | 7 +++++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php b/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php index aa73e275ee0ca..6497b039c7790 100644 --- a/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php +++ b/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php @@ -5,7 +5,7 @@ */ 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; @@ -36,10 +36,10 @@ public function __construct( /** * Delete frontend session cookie if customer session is expired * - * @param SessionManager $sessionManager + * @param SessionManagerInterface $sessionManager * @return void */ - public function beforeStart(SessionManager $sessionManager) + public function beforeStart(SessionManagerInterface $sessionManager) { if (!$this->cookieManager->getCookie($sessionManager->getName()) && $this->cookieManager->getCookie('mage-cache-sessid') @@ -49,4 +49,4 @@ public function beforeStart(SessionManager $sessionManager) $this->cookieManager->deleteCookie('mage-cache-sessid', $metadata); } } -} +} \ No newline at end of file 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/Paypal/Controller/Transparent/RequestSecureToken.php b/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php index 3738a479816b3..68e5e888364b2 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 $sessionManagerInterface */ 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); } @@ -120,4 +123,4 @@ private function getErrorResponse() ] ); } -} +} \ No newline at end of file diff --git a/lib/internal/Magento/Framework/View/Context.php b/lib/internal/Magento/Framework/View/Context.php index c3f1c3e691c84..c3876b8ca74de 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; From 737a79eb5aae8b7b3bb7065707f7e643aa750ede Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Sat, 16 Feb 2019 17:56:34 +0000 Subject: [PATCH 11/12] magento/magento2#19359: Fixed static tests --- .../Customer/CustomerData/Plugin/SessionChecker.php | 7 ++++++- .../Paypal/Controller/Transparent/RequestSecureToken.php | 4 ++-- lib/internal/Magento/Framework/View/Context.php | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php b/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php index 6497b039c7790..f82a4d15ae8bf 100644 --- a/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php +++ b/app/code/Magento/Customer/CustomerData/Plugin/SessionChecker.php @@ -9,6 +9,9 @@ use Magento\Framework\Stdlib\Cookie\CookieMetadataFactory; use Magento\Framework\Stdlib\Cookie\PhpCookieManager; +/** + * Class SessionChecker + */ class SessionChecker { /** @@ -38,6 +41,8 @@ public function __construct( * * @param SessionManagerInterface $sessionManager * @return void + * @throws \Magento\Framework\Exception\InputException + * @throws \Magento\Framework\Stdlib\Cookie\FailureToSendException */ public function beforeStart(SessionManagerInterface $sessionManager) { @@ -49,4 +54,4 @@ public function beforeStart(SessionManagerInterface $sessionManager) $this->cookieManager->deleteCookie('mage-cache-sessid', $metadata); } } -} \ No newline at end of file +} diff --git a/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php b/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php index 68e5e888364b2..497e32157de05 100644 --- a/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php +++ b/app/code/Magento/Paypal/Controller/Transparent/RequestSecureToken.php @@ -56,7 +56,7 @@ class RequestSecureToken extends \Magento\Framework\App\Action\Action * @param SecureToken $secureTokenService * @param SessionManager $sessionManager * @param Transparent $transparent - * @param SessionManagerInterface|null $sessionManagerInterface + * @param SessionManagerInterface|null $sessionInterface */ public function __construct( Context $context, @@ -123,4 +123,4 @@ private function getErrorResponse() ] ); } -} \ No newline at end of file +} diff --git a/lib/internal/Magento/Framework/View/Context.php b/lib/internal/Magento/Framework/View/Context.php index c3876b8ca74de..508d63d158bd7 100644 --- a/lib/internal/Magento/Framework/View/Context.php +++ b/lib/internal/Magento/Framework/View/Context.php @@ -335,6 +335,8 @@ public function getModuleName() } /** + * Get Front Name + * * @see getModuleName */ public function getFrontName() From 927408d63aa9612cf0c9a9932a9cf5c40f9a4ce8 Mon Sep 17 00:00:00 2001 From: nmalevanec Date: Thu, 21 Feb 2019 13:04:57 +0200 Subject: [PATCH 12/12] Fix static tests. --- .../Magento/luma/Magento_Bundle/web/css/source/_module.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 262e2d68d1ea3..544414e447bed 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 @@ -61,7 +61,7 @@ margin-top: 4px; } - input[type="checkbox"] { + input[type='checkbox'] { margin-top: 2px; }