From 516566ac2d8b08b4e95003463362af457847ff93 Mon Sep 17 00:00:00 2001 From: Arnoud Beekman Date: Thu, 5 Jul 2018 21:36:49 +0200 Subject: [PATCH] Make it possible to disable cross-sell on cart page To be able to select whether to have the cross-sell active on the cart page an admin configuration is created under Stores > Configuration > Sales > Checkout > Shopping Cart. The default for this setting is set to Yes (Show cross-sell items). This is for backwards compatibility and not have webshop owners accidentally not showing these items. Because this is now sorted as the 3rd configuration in this section/group the extra configurations for the grouped product image and the configurable product image are now also increased. This feature will make it possible to have this cross-sell turned off during special sales, A/B testing or in a specific store view. --- app/code/Magento/Checkout/etc/adminhtml/system.xml | 4 ++++ app/code/Magento/Checkout/etc/config.xml | 1 + app/code/Magento/Checkout/i18n/en_US.csv | 3 ++- .../Checkout/view/frontend/layout/checkout_cart_index.xml | 2 +- app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml | 2 +- app/code/Magento/GroupedProduct/etc/adminhtml/system.xml | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index 6947e1162600a..11e3ba5f3ed9a 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -41,6 +41,10 @@ + + + Magento\Config\Model\Config\Source\Yesno + diff --git a/app/code/Magento/Checkout/etc/config.xml b/app/code/Magento/Checkout/etc/config.xml index 3c24c38ecf85b..e1ba4381f2230 100644 --- a/app/code/Magento/Checkout/etc/config.xml +++ b/app/code/Magento/Checkout/etc/config.xml @@ -17,6 +17,7 @@ 30 0 20 + 1 1 diff --git a/app/code/Magento/Checkout/i18n/en_US.csv b/app/code/Magento/Checkout/i18n/en_US.csv index 53fdebb8a2995..c6bb23fecac18 100644 --- a/app/code/Magento/Checkout/i18n/en_US.csv +++ b/app/code/Magento/Checkout/i18n/en_US.csv @@ -176,4 +176,5 @@ Payment,Payment "Not yet calculated","Not yet calculated" "We received your order!","We received your order!" "Thank you for your purchase!","Thank you for your purchase!" -"Password", "Password" +Password,Password +"Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart" diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml index ff4c6dbd35ff2..69d2523d88dfb 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml @@ -186,7 +186,7 @@ - + crosssell diff --git a/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml b/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml index ba52b51d6b077..86baea3c0d296 100644 --- a/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml +++ b/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml @@ -9,7 +9,7 @@
- + Magento\Catalog\Model\Config\Source\Product\Thumbnail diff --git a/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml b/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml index bbb2054abb14f..5854928afc2fd 100644 --- a/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml +++ b/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml @@ -9,7 +9,7 @@
- + Magento\Catalog\Model\Config\Source\Product\Thumbnail