diff --git a/.gitignore b/.gitignore
index 68d38d9ca7817..8ec1104f25535 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,6 +48,8 @@ atlassian*
/pub/media/import/*
!/pub/media/import/.htaccess
/pub/media/logo/*
+/pub/media/custom_options/*
+!/pub/media/custom_options/.htaccess
/pub/media/theme/*
/pub/media/theme_customization/*
!/pub/media/theme_customization/.htaccess
diff --git a/.htaccess b/.htaccess
index d22b5a1395cae..71a5cf708dbc5 100644
--- a/.htaccess
+++ b/.htaccess
@@ -27,6 +27,11 @@
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
+############################################
+## enable usage of methods arguments in backtrace
+
+ SetEnv MAGE_DEBUG_SHOW_ARGS 1
+
############################################
## default index file
@@ -364,6 +369,15 @@
Require all denied
+
= /* @escapeNotVerified */ __('Ordered') ?> | @@ -116,7 +125,7 @@
- canShowPriceInfo($_item)): ?>
+ canShowPriceInfo($_item) || $shipTogether): ?>
canEditQty()) : ?>
',
controlContainer: 'dd', // should be eliminated
priceFormat: {},
- isFixedPrice: false
+ isFixedPrice: false,
+ optionTierPricesBlocksSelector: '#option-tier-prices-{1} [data-role="selection-tier-prices"]'
};
$.widget('mage.priceBundle', {
@@ -91,6 +92,8 @@ define([
if (changes) {
priceBox.trigger('updatePrice', changes);
}
+
+ this._displayTierPriceBlock(bundleOption);
this.updateProductSummary();
},
@@ -207,6 +210,35 @@ define([
return this;
},
+ /**
+ * Show or hide option tier prices block
+ *
+ * @param {Object} optionElement
+ * @private
+ */
+ _displayTierPriceBlock: function (optionElement) {
+ var optionType = optionElement.prop('type'),
+ optionId,
+ optionValue,
+ optionTierPricesElements;
+
+ if (optionType === 'select-one') {
+ optionId = utils.findOptionId(optionElement[0]);
+ optionValue = optionElement.val() || null;
+ optionTierPricesElements = $(this.options.optionTierPricesBlocksSelector.replace('{1}', optionId));
+
+ _.each(optionTierPricesElements, function (tierPriceElement) {
+ var selectionId = $(tierPriceElement).data('selection-id') + '';
+
+ if (selectionId === optionValue) {
+ $(tierPriceElement).show();
+ } else {
+ $(tierPriceElement).hide();
+ }
+ });
+ }
+ },
+
/**
* Handler to update productSummary box
*/
@@ -374,8 +406,17 @@ define([
function applyTierPrice(oneItemPrice, qty, optionConfig) {
var tiers = optionConfig.tierPrice,
magicKey = _.keys(oneItemPrice)[0],
+ tiersFirstKey = _.keys(optionConfig)[0],
lowest = false;
+ if (!tiers) {//tiers is undefined when options has only one option
+ tiers = optionConfig[tiersFirstKey].tierPrice;
+ }
+
+ tiers.sort(function (a, b) {//sorting based on "price_qty"
+ return a['price_qty'] - b['price_qty'];
+ });
+
_.each(tiers, function (tier, index) {
if (tier['price_qty'] > qty) {
return;
diff --git a/app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml b/app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml
index 5b8c050e5af54..d12f2e8f6a952 100644
--- a/app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml
+++ b/app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml
@@ -29,10 +29,22 @@
showSingle()): ?>
= /* @escapeNotVerified */ $block->getSelectionTitlePrice($_selections[0]) ?>
+ = /* @noEscape */ $block->getTierPriceRenderer()->renderTierPrice($_selections[0]) ?>
+
+
+
+ = /* @noEscape */ $block->getTierPriceRenderer()->renderTierPrice($_selection) ?>
+
+
+
diff --git a/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml b/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml
index 063d66edb9e70..74e1c5f874954 100644
--- a/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/frontend/templates/sales/order/items/renderer.phtml
@@ -7,95 +7,111 @@
// @codingStandardsIgnoreFile
/** @var $block \Magento\Bundle\Block\Sales\Order\Items\Renderer */
+$parentItem = $block->getItem();
+$items = array_merge([$parentItem], $parentItem->getChildrenItems());
+$index = 0;
+$prevOptionId = '';
?>
-getItem() ?>
-getChildrenItems()); ?>
-
-
+
-
-
- getItemOptions() || $parentItem->getDescription() || $this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
-
+ getItemOptions()
+ || $parentItem->getDescription()
+ || $this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $parentItem)
+ && $parentItem->getGiftMessageId()): ?>
+
-
+
- getParentItem()): ?>
- getSelectionAttributes($_item) ?>
-
+ getParentItem()): ?>
+ getSelectionAttributes($item) ?>
+
= /* @escapeNotVerified */ $attributes['option_label'] ?> |
+ = $block->escapeHtml($attributes['option_label']); ?> |
- = $block->escapeHtml($_item->getName()) ?>
+ |
+ = $block->escapeHtml($item->getName()); ?>
|
- = $block->getValueHtml($_item) ?> |
+
+ = $block->getValueHtml($item); ?>
+ |
- = /* @escapeNotVerified */ $block->prepareSku($_item->getSku()) ?> |
-
- getParentItem()): ?>
- = $block->getItemPriceHtml() ?>
+ |
+ = /* @noEscape */ $block->prepareSku($item->getSku()); ?>
+ |
+
+ getParentItem()): ?>
+ = /* @noEscape */ $block->getItemPriceHtml(); ?>
|
-
+ |
getParentItem() && $block->isChildCalculated()) ||
- (!$_item->getParentItem() && !$block->isChildCalculated()) || ($_item->getQtyShipped() > 0 && $_item->getParentItem() && $block->isShipmentSeparately())):?>
+ ($item->getParentItem() && $block->isChildCalculated()) ||
+ (!$item->getParentItem() && !$block->isChildCalculated()) ||
+ ($item->getQtyShipped() > 0 && $item->getParentItem() && $block->isShipmentSeparately())): ?>
|
- getParentItem()): ?>
- = $block->getItemRowTotalHtml() ?>
+ getParentItem()): ?>
+ = /* @noEscape */ $block->getItemRowTotalHtml(); ?>
@@ -103,33 +119,38 @@
|
- getItemOptions()): ?>
+ getItemOptions()): ?>
|
- = $block->escapeHtml($_item->getDescription()) ?>
+ = $block->escapeHtml($item->getDescription()); ?>
getLevel() < 2) { + if ($isParent || $node->getLevel() < 1) { $item['expanded'] = true; } @@ -390,6 +414,8 @@ public function buildNodeName($node) } /** + * Is category movable + * * @param Node|array $node * @return bool */ @@ -403,6 +429,8 @@ protected function _isCategoryMoveable($node) } /** + * Is parent selected category + * * @param Node|array $node * @return bool */ diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php index ad6df27b89334..8f1d1dcf7eedf 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Form/Renderer/Fieldset/Element.php @@ -4,13 +4,13 @@ * See COPYING.txt for license details. */ +namespace Magento\Catalog\Block\Adminhtml\Form\Renderer\Fieldset; + /** * Catalog fieldset element renderer * * @author Magento Core Team ' . $element->getLegend() . ''; @@ -148,6 +151,8 @@ protected function _getHeaderHtml($element) } /** + * Get footer html for render + * * @param AbstractElement $element * @return string * @SuppressWarnings(PHPMD.UnusedFormalParameter) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php b/app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php index ac1fd8c692ed2..c296a5aa0dbbd 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php @@ -9,6 +9,7 @@ /** * Class NotifyStock + * * @package Magento\Catalog\Block\Adminhtml\Rss */ class NotifyStock extends \Magento\Backend\Block\AbstractBlock implements DataProviderInterface @@ -41,7 +42,7 @@ public function __construct( } /** - * @return void + * @inheritdoc */ protected function _construct() { @@ -50,12 +51,12 @@ protected function _construct() } /** - * {@inheritdoc} + * @inheritdoc */ public function getRssData() { - $newUrl = $this->rssUrlBuilder->getUrl(['_secure' => true, '_nosecret' => true, 'type' => 'notifystock']); - $title = __('Low Stock Products'); + $newUrl = $this->rssUrlBuilder->getUrl(['_secure' => true, '_nosecret' => true, 'type' => 'notifystock']); + $title = __('Low Stock Products')->render(); $data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8']; foreach ($this->rssModel->getProductsCollection() as $item) { @@ -65,7 +66,7 @@ public function getRssData() ['id' => $item->getId(), '_secure' => true, '_nosecret' => true] ); $qty = 1 * $item->getQty(); - $description = __('%1 has reached a quantity of %2.', $item->getName(), $qty); + $description = __('%1 has reached a quantity of %2.', $item->getName(), $qty)->render(); $data['entries'][] = ['title' => $item->getName(), 'link' => $url, 'description' => $description]; } @@ -73,7 +74,7 @@ public function getRssData() } /** - * {@inheritdoc} + * @inheritdoc */ public function getCacheLifetime() { @@ -81,7 +82,7 @@ public function getCacheLifetime() } /** - * {@inheritdoc} + * @inheritdoc */ public function isAllowed() { @@ -89,7 +90,7 @@ public function isAllowed() } /** - * {@inheritdoc} + * @inheritdoc */ public function getFeeds() { @@ -97,7 +98,7 @@ public function getFeeds() } /** - * {@inheritdoc} + * @inheritdoc */ public function isAuthRequired() { diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php index c1b255c762dbb..c1d79894162ae 100644 --- a/app/code/Magento/Catalog/Block/Product/ListProduct.php +++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php @@ -178,8 +178,9 @@ private function getDefaultListingMode() } /** - * Need use as _prepareLayout - but problem in declaring collection from - * another block (was problem with search result) + * Need use as _prepareLayout - but problem in declaring collection from another block. + * (was problem with search result) + * * @return $this */ protected function _beforeToHtml() @@ -188,7 +189,9 @@ protected function _beforeToHtml() $this->addToolbarBlock($collection); - $collection->load(); + if (!$collection->isLoaded()) { + $collection->load(); + } return parent::_beforeToHtml(); } @@ -262,6 +265,8 @@ public function getToolbarHtml() } /** + * Set collection. + * * @param AbstractCollection $collection * @return $this */ @@ -272,7 +277,9 @@ public function setCollection($collection) } /** - * @param array|string|integer| Element $code + * Add attribute. + * + * @param array|string|integer|Element $code * @return $this */ public function addAttribute($code) @@ -282,6 +289,8 @@ public function addAttribute($code) } /** + * Get price block template. + * * @return mixed */ public function getPriceBlockTemplate() @@ -371,6 +380,8 @@ public function getAddToCartPostParams(Product $product) } /** + * Get product price. + * * @param Product $product * @return string */ @@ -396,8 +407,8 @@ public function getProductPrice(Product $product) } /** - * Specifies that price rendering should be done for the list of products - * i.e. rendering happens in the scope of product list, but not single product + * Specifies that price rendering should be done for the list of products. + * (rendering happens in the scope of product list, but not single product) * * @return Render */ diff --git a/app/code/Magento/Catalog/Block/Product/View/Attributes.php b/app/code/Magento/Catalog/Block/Product/View/Attributes.php index cb59d86a74512..5b9777cbfd1e7 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Attributes.php +++ b/app/code/Magento/Catalog/Block/Product/View/Attributes.php @@ -16,6 +16,8 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; /** + * Attributes attributes block + * * @api * @since 100.0.2 */ @@ -56,6 +58,8 @@ public function __construct( } /** + * Returns a Product + * * @return Product */ public function getProduct() @@ -88,9 +92,9 @@ public function getAdditionalData(array $excludeAttr = []) $value = $this->priceCurrency->convertAndFormat($value); } - if (is_string($value) && strlen($value)) { + if (is_string($value) && strlen(trim($value))) { $data[$attribute->getAttributeCode()] = [ - 'label' => __($attribute->getStoreLabel()), + 'label' => $attribute->getStoreLabel(), 'value' => $value, 'code' => $attribute->getAttributeCode(), ]; diff --git a/app/code/Magento/Catalog/Block/Product/View/Details.php b/app/code/Magento/Catalog/Block/Product/View/Details.php new file mode 100644 index 0000000000000..e76c5bf201334 --- /dev/null +++ b/app/code/Magento/Catalog/Block/Product/View/Details.php @@ -0,0 +1,47 @@ +getGroupChildNames($groupName, $callback); + $layout = $this->getLayout(); + + $childNamesSortOrder = []; + + foreach ($groupChildNames as $childName) { + $alias = $layout->getElementAlias($childName); + $sortOrder = (int)$this->getChildData($alias, 'sort_order') ?? 0; + + $childNamesSortOrder[$sortOrder] = $childName; + } + + ksort($childNamesSortOrder, SORT_NUMERIC); + + return $childNamesSortOrder; + } +} diff --git a/app/code/Magento/Catalog/Block/Product/View/Gallery.php b/app/code/Magento/Catalog/Block/Product/View/Gallery.php index 706d9b83b9711..8b98fbdc8f7ef 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Gallery.php +++ b/app/code/Magento/Catalog/Block/Product/View/Gallery.php @@ -207,8 +207,8 @@ public function isMainImage($image) */ public function getImageAttribute($imageId, $attributeName, $default = null) { - $attributes = - $this->getConfigView()->getMediaAttributes('Magento_Catalog', Image::MEDIA_TYPE_CONFIG_NODE, $imageId); + $attributes = $this->getConfigView() + ->getMediaAttributes('Magento_Catalog', Image::MEDIA_TYPE_CONFIG_NODE, $imageId); return $attributes[$attributeName] ?? $default; } diff --git a/app/code/Magento/Catalog/Block/Product/View/GalleryOptions.php b/app/code/Magento/Catalog/Block/Product/View/GalleryOptions.php new file mode 100644 index 0000000000000..0384c9cd9acce --- /dev/null +++ b/app/code/Magento/Catalog/Block/Product/View/GalleryOptions.php @@ -0,0 +1,156 @@ +gallery = $gallery; + $this->jsonSerializer = $jsonSerializer; + parent::__construct($context, $arrayUtils, $data); + } + + /** + * Retrieve gallery options in JSON format + * + * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ElseExpression) + */ + public function getOptionsJson() + { + $optionItems = null; + + //Special case for gallery/nav which can be the string "thumbs/false/dots" + if (is_bool($this->getVar("gallery/nav"))) { + $optionItems['nav'] = $this->getVar("gallery/nav") ? 'true' : 'false'; + } else { + $optionItems['nav'] = $this->escapeHtml($this->getVar("gallery/nav")); + } + + $optionItems['loop'] = $this->getVar("gallery/loop"); + $optionItems['keyboard'] = $this->getVar("gallery/keyboard"); + $optionItems['arrows'] = $this->getVar("gallery/arrows"); + $optionItems['allowfullscreen'] = $this->getVar("gallery/allowfullscreen"); + $optionItems['showCaption'] = $this->getVar("gallery/caption"); + $optionItems['width'] = (int)$this->escapeHtml( + $this->gallery->getImageAttribute('product_page_image_medium', 'width') + ); + $optionItems['thumbwidth'] = (int)$this->escapeHtml( + $this->gallery->getImageAttribute('product_page_image_small', 'width') + ); + + if ($this->gallery->getImageAttribute('product_page_image_small', 'height') || + $this->gallery->getImageAttribute('product_page_image_small', 'width')) { + $optionItems['thumbheight'] = (int)$this->escapeHtml( + $this->gallery->getImageAttribute('product_page_image_small', 'height') ?: + $this->gallery->getImageAttribute('product_page_image_small', 'width') + ); + } + + if ($this->gallery->getImageAttribute('product_page_image_medium', 'height') || + $this->gallery->getImageAttribute('product_page_image_medium', 'width')) { + $optionItems['height'] = (int)$this->escapeHtml( + $this->gallery->getImageAttribute('product_page_image_medium', 'height') ?: + $this->gallery->getImageAttribute('product_page_image_medium', 'width') + ); + } + + if ($this->getVar("gallery/transition/duration")) { + $optionItems['transitionduration'] = + (int)$this->escapeHtml($this->getVar("gallery/transition/duration")); + } + + $optionItems['transition'] = $this->escapeHtml($this->getVar("gallery/transition/effect")); + $optionItems['navarrows'] = $this->getVar("gallery/navarrows"); + $optionItems['navtype'] = $this->escapeHtml($this->getVar("gallery/navtype")); + $optionItems['navdir'] = $this->escapeHtml($this->getVar("gallery/navdir")); + + if ($this->getVar("gallery/thumbmargin")) { + $optionItems['thumbmargin'] = (int)$this->escapeHtml($this->getVar("gallery/thumbmargin")); + } + + return $this->jsonSerializer->serialize($optionItems); + } + + /** + * Retrieve gallery fullscreen options in JSON format + * + * @return string + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ElseExpression) + */ + public function getFSOptionsJson() + { + $fsOptionItems = null; + + //Special case for gallery/nav which can be the string "thumbs/false/dots" + if (is_bool($this->getVar("gallery/fullscreen/nav"))) { + $fsOptionItems['nav'] = $this->getVar("gallery/fullscreen/nav") ? 'true' : 'false'; + } else { + $fsOptionItems['nav'] = $this->escapeHtml($this->getVar("gallery/fullscreen/nav")); + } + + $fsOptionItems['loop'] = $this->getVar("gallery/fullscreen/loop"); + $fsOptionItems['navdir'] = $this->escapeHtml($this->getVar("gallery/fullscreen/navdir")); + $fsOptionItems['navarrows'] = $this->getVar("gallery/fullscreen/navarrows"); + $fsOptionItems['navtype'] = $this->escapeHtml($this->getVar("gallery/fullscreen/navtype")); + $fsOptionItems['arrows'] = $this->getVar("gallery/fullscreen/arrows"); + $fsOptionItems['showCaption'] = $this->getVar("gallery/fullscreen/caption"); + + if ($this->getVar("gallery/fullscreen/transition/duration")) { + $fsOptionItems['transitionduration'] = (int)$this->escapeHtml( + $this->getVar("gallery/fullscreen/transition/duration") + ); + } + + $fsOptionItems['transition'] = $this->escapeHtml($this->getVar("gallery/fullscreen/transition/effect")); + + if ($this->getVar("gallery/fullscreen/keyboard")) { + $fsOptionItems['keyboard'] = $this->getVar("gallery/fullscreen/keyboard"); + } + + if ($this->getVar("gallery/fullscreen/thumbmargin")) { + $fsOptionItems['thumbmargin'] = + (int)$this->escapeHtml($this->getVar("gallery/fullscreen/thumbmargin")); + } + + return $this->jsonSerializer->serialize($fsOptionItems); + } +} diff --git a/app/code/Magento/Catalog/Block/Product/View/Options.php b/app/code/Magento/Catalog/Block/Product/View/Options.php index 0720c018f6a9b..c457b20cd0904 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Options.php +++ b/app/code/Magento/Catalog/Block/Product/View/Options.php @@ -4,16 +4,15 @@ * See COPYING.txt for license details. */ -/** - * Product options block - * - * @author Magento Core Team
@@ -132,7 +139,7 @@
diff --git a/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml b/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml
index 1a54db0d59f0f..90d6e0b48400e 100644
--- a/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml
+++ b/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml
@@ -77,6 +77,13 @@
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml
index f434402346087..ecc9700802d27 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml
@@ -169,7 +169,7 @@ switch ($type = $block->getType()) {
= /* @escapeNotVerified */ __('Check items to add to the cart or') ?>
-
+
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/addto/compare.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/addto/compare.phtml
index adf0f44d0c831..194a472d81d58 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/addto/compare.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/addto/compare.phtml
@@ -9,6 +9,10 @@
/** @var $block \Magento\Catalog\Block\Product\View\Addto\Compare */
?>
+getData('addToCompareViewModel'); ?>
+isAvailableForCompare($block->getProduct())): ?>
= /* @escapeNotVerified */ __('Add to Compare') ?>
+
+
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..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
@@ -20,6 +20,7 @@
+ id="product-addtocart-button" disabled>
= /* @escapeNotVerified */ $buttonTitle ?>
= $block->getChildHtml('', true) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml
index c930d2195a01b..1c4a37fedebe3 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml
@@ -23,8 +23,8 @@
= $block->escapeHtml(__($_data['label'])) ?> |
- = /* @escapeNotVerified */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?> |
+ = $block->escapeHtml($_data['label']) ?> |
+ = /* @escapeNotVerified */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?> |
getLayout(); ?>
@@ -21,17 +22,17 @@
$label = $block->getChildData($alias, 'title');
?>
-
+
= /* @escapeNotVerified */ $html ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml
index 1bfa30478df8a..1f06b90758d0b 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml
@@ -12,32 +12,32 @@
* @var $block \Magento\Catalog\Block\Product\View\Gallery
*/
?>
-
-
-
-
+ $helper = $block->getData('imageHelper');
+ $mainImageData = $mainImage ?
+ $mainImage->getData('medium_image_url') :
+ $helper->getDefaultPlaceholderUrl('image');
+
+?>
+
+
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/action/create-billing-address.js b/app/code/Magento/Checkout/view/frontend/web/js/action/create-billing-address.js
index 7db0dc5ce7473..c601bb8acf125 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/action/create-billing-address.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/action/create-billing-address.js
@@ -12,6 +12,17 @@ define([
'use strict';
return function (addressData) {
- return addressConverter.formAddressDataToQuoteAddress(addressData);
+ var address = addressConverter.formAddressDataToQuoteAddress(addressData);
+
+ /**
+ * Returns new customer billing address type.
+ *
+ * @returns {String}
+ */
+ address.getType = function () {
+ return 'new-customer-billing-address';
+ };
+
+ return address;
};
});
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 ce1527b3d72d6..1920bc4d7ac41 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
@@ -14,7 +14,8 @@ define([
$.widget('mage.updateShoppingCart', {
options: {
validationURL: '',
- eventName: 'updateCartItemQty'
+ eventName: 'updateCartItemQty',
+ updateCartActionContainer: ''
},
/** @inheritdoc */
@@ -31,7 +32,9 @@ define([
* @return {Boolean}
*/
onSubmit: function (event) {
- if (!this.options.validationURL) {
+ var action = this.element.find(this.options.updateCartActionContainer).val();
+
+ if (!this.options.validationURL || action === 'empty_cart') {
return true;
}
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/checkout-data.js b/app/code/Magento/Checkout/view/frontend/web/js/checkout-data.js
index 22b37b2da0b2f..1858ce946fb07 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/checkout-data.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/checkout-data.js
@@ -10,7 +10,8 @@
*/
define([
'jquery',
- 'Magento_Customer/js/customer-data'
+ 'Magento_Customer/js/customer-data',
+ 'jquery/jquery-storageapi'
], function ($, storage) {
'use strict';
@@ -23,6 +24,22 @@ define([
storage.set(cacheKey, data);
},
+ /**
+ * @return {*}
+ */
+ initData = function () {
+ return {
+ 'selectedShippingAddress': null, //Selected shipping address pulled from persistence storage
+ 'shippingAddressFromData': null, //Shipping address pulled from persistence storage
+ 'newCustomerShippingAddress': null, //Shipping address pulled from persistence storage for customer
+ 'selectedShippingRate': null, //Shipping rate pulled from persistence storage
+ 'selectedPaymentMethod': null, //Payment method pulled from persistence storage
+ 'selectedBillingAddress': null, //Selected billing address pulled from persistence storage
+ 'billingAddressFromData': null, //Billing address pulled from persistence storage
+ 'newCustomerBillingAddress': null //Billing address pulled from persistence storage for new customer
+ };
+ },
+
/**
* @return {*}
*/
@@ -30,17 +47,12 @@ define([
var data = storage.get(cacheKey)();
if ($.isEmptyObject(data)) {
- data = {
- 'selectedShippingAddress': null, //Selected shipping address pulled from persistence storage
- 'shippingAddressFromData': null, //Shipping address pulled from persistence storage
- 'newCustomerShippingAddress': null, //Shipping address pulled from persistence storage for customer
- 'selectedShippingRate': null, //Shipping rate pulled from persistence storage
- 'selectedPaymentMethod': null, //Payment method pulled from persistence storage
- 'selectedBillingAddress': null, //Selected billing address pulled from persistence storage
- 'billingAddressFromData': null, //Billing address pulled from persistence storage
- 'newCustomerBillingAddress': null //Billing address pulled from persistence storage for new customer
- };
- saveData(data);
+ data = $.initNamespaceStorage('mage-cache-storage').localStorage.get(cacheKey);
+
+ if ($.isEmptyObject(data)) {
+ data = initData();
+ saveData(data);
+ }
}
return data;
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js b/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js
new file mode 100644
index 0000000000000..4b30ad8075274
--- /dev/null
+++ b/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js
@@ -0,0 +1,16 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+define([
+ 'Magento_Customer/js/customer-data'
+], function (customerData) {
+ 'use strict';
+
+ var cartData = customerData.get('cart');
+
+ if (cartData().items && cartData().items.length !== 0) {
+ customerData.reload(['cart'], false);
+ }
+});
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/checkout-data-resolver.js b/app/code/Magento/Checkout/view/frontend/web/js/model/checkout-data-resolver.js
index 9cc60a3645d58..bc0ab59b622a2 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/model/checkout-data-resolver.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/model/checkout-data-resolver.js
@@ -216,11 +216,11 @@ define([
newCustomerBillingAddressData = checkoutData.getNewCustomerBillingAddress();
if (selectedBillingAddress) {
- if (selectedBillingAddress == 'new-customer-address' && newCustomerBillingAddressData) { //eslint-disable-line
+ if (selectedBillingAddress === 'new-customer-billing-address' && newCustomerBillingAddressData) {
selectBillingAddress(createBillingAddress(newCustomerBillingAddressData));
} else {
addressList.some(function (address) {
- if (selectedBillingAddress == address.getKey()) { //eslint-disable-line eqeqeq
+ if (selectedBillingAddress === address.getKey()) {
selectBillingAddress(address);
}
});
@@ -243,7 +243,7 @@ define([
return;
}
- if (quote.isVirtual()) {
+ if (quote.isVirtual() || !quote.billingAddress()) {
isBillingAddressInitialized = addressList.some(function (addrs) {
if (addrs.isDefaultBilling()) {
selectBillingAddress(addrs);
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/payment/additional-validators.js b/app/code/Magento/Checkout/view/frontend/web/js/model/payment/additional-validators.js
index 1cb35a4cee2db..1337e1affd3d3 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/model/payment/additional-validators.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/model/payment/additional-validators.js
@@ -35,15 +35,17 @@ define([], function () {
*
* @returns {Boolean}
*/
- validate: function () {
+ validate: function (hideError) {
var validationResult = true;
+ hideError = hideError || false;
+
if (validators.length <= 0) {
return validationResult;
}
validators.forEach(function (item) {
- if (item.validate() == false) { //eslint-disable-line eqeqeq
+ if (item.validate(hideError) == false) { //eslint-disable-line eqeqeq
validationResult = false;
return false;
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/place-order.js b/app/code/Magento/Checkout/view/frontend/web/js/model/place-order.js
index c3c5b9d68cec0..c07878fcaea92 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/model/place-order.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/model/place-order.js
@@ -9,9 +9,10 @@ define(
[
'mage/storage',
'Magento_Checkout/js/model/error-processor',
- 'Magento_Checkout/js/model/full-screen-loader'
+ 'Magento_Checkout/js/model/full-screen-loader',
+ 'Magento_Customer/js/customer-data'
],
- function (storage, errorProcessor, fullScreenLoader) {
+ function (storage, errorProcessor, fullScreenLoader, customerData) {
'use strict';
return function (serviceUrl, payload, messageContainer) {
@@ -23,6 +24,23 @@ define(
function (response) {
errorProcessor.process(response, messageContainer);
}
+ ).success(
+ function (response) {
+ var clearData = {
+ 'selectedShippingAddress': null,
+ 'shippingAddressFromData': null,
+ 'newCustomerShippingAddress': null,
+ 'selectedShippingRate': null,
+ 'selectedPaymentMethod': null,
+ 'selectedBillingAddress': null,
+ 'billingAddressFromData': null,
+ 'newCustomerBillingAddress': null
+ };
+
+ if (response.responseType !== 'error') {
+ customerData.set('checkout-data', clearData);
+ }
+ }
).always(
function () {
fullScreenLoader.stopLoader();
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/postcode-validator.js b/app/code/Magento/Checkout/view/frontend/web/js/model/postcode-validator.js
index a95471d90dab8..0a5334a42c7e5 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/model/postcode-validator.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/model/postcode-validator.js
@@ -14,11 +14,13 @@ define([
/**
* @param {*} postCode
* @param {*} countryId
+ * @param {Array} postCodesPatterns
* @return {Boolean}
*/
- validate: function (postCode, countryId) {
- var patterns = window.checkoutConfig.postCodes[countryId],
- pattern, regex;
+ validate: function (postCode, countryId, postCodesPatterns) {
+ var pattern, regex,
+ patterns = postCodesPatterns ? postCodesPatterns[countryId] :
+ window.checkoutConfig.postCodes[countryId];
this.validatedPostCodeExample = [];
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/quote.js b/app/code/Magento/Checkout/view/frontend/web/js/model/quote.js
index 2510d1aced3d3..3486a92736617 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/model/quote.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/model/quote.js
@@ -7,7 +7,8 @@
*/
define([
'ko',
- 'underscore'
+ 'underscore',
+ 'domReady!'
], function (ko, _) {
'use strict';
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rates-validator.js b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rates-validator.js
index fde88ebadb393..8b07c02e4d380 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rates-validator.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-rates-validator.js
@@ -42,6 +42,7 @@ define([
return {
validateAddressTimeout: 0,
+ validateZipCodeTimeout: 0,
validateDelay: 2000,
/**
@@ -133,16 +134,20 @@ define([
});
} else {
element.on('value', function () {
+ clearTimeout(self.validateZipCodeTimeout);
+ self.validateZipCodeTimeout = setTimeout(function () {
+ if (element.index === postcodeElementName) {
+ self.postcodeValidation(element);
+ } else {
+ $.each(postcodeElements, function (index, elem) {
+ self.postcodeValidation(elem);
+ });
+ }
+ }, delay);
+
if (!formPopUpState.isVisible()) {
clearTimeout(self.validateAddressTimeout);
self.validateAddressTimeout = setTimeout(function () {
- if (element.index === postcodeElementName) {
- self.postcodeValidation(element);
- } else {
- $.each(postcodeElements, function (index, elem) {
- self.postcodeValidation(elem);
- });
- }
self.validateFields();
}, delay);
}
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js b/app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js
index 3ea49cd981d90..eecfa65b189d1 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js
@@ -14,7 +14,11 @@ define([
_create: function () {
var items, i, reload;
- $(this.options.emptyCartButton).on('click', $.proxy(function () {
+ $(this.options.emptyCartButton).on('click', $.proxy(function (event) {
+ if (event.detail === 0) {
+ return;
+ }
+
$(this.options.emptyCartButton).attr('name', 'update_cart_action_temp');
$(this.options.updateCartActionContainer)
.attr('name', 'update_cart_action').attr('value', 'empty_cart');
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
index dde1ad72ba15e..e66c66006246c 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
@@ -25,6 +25,7 @@ define([
}
},
scrollHeight: 0,
+ shoppingCartUrl: window.checkout.shoppingCartUrl,
/**
* Create sidebar.
@@ -227,6 +228,10 @@ define([
if (!_.isUndefined(productData)) {
$(document).trigger('ajax:updateCartItemQty');
+
+ if (window.location.href === this.shoppingCartUrl) {
+ window.location.reload(false);
+ }
}
this._hideItemButton(elem);
},
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js
index 6f9a1a46826da..a552aa01da061 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js
@@ -40,30 +40,23 @@ function (
'use strict';
var lastSelectedBillingAddress = null,
- newAddressOption = {
- /**
- * Get new address label
- * @returns {String}
- */
- getAddressInline: function () {
- return $t('New Address');
- },
- customerAddressId: null
- },
countryData = customerData.get('directory-data'),
addressOptions = addressList().filter(function (address) {
- return address.getType() == 'customer-address'; //eslint-disable-line eqeqeq
+ return address.getType() === 'customer-address';
});
- addressOptions.push(newAddressOption);
-
return Component.extend({
defaults: {
- template: 'Magento_Checkout/billing-address'
+ template: 'Magento_Checkout/billing-address',
+ actionsTemplate: 'Magento_Checkout/billing-address/actions',
+ formTemplate: 'Magento_Checkout/billing-address/form',
+ detailsTemplate: 'Magento_Checkout/billing-address/details',
+ links: {
+ isAddressFormVisible: '${$.billingAddressListProvider}:isNewAddressSelected'
+ }
},
currentBillingAddress: quote.billingAddress,
- addressOptions: addressOptions,
- customerHasAddresses: addressOptions.length > 1,
+ customerHasAddresses: addressOptions.length > 0,
/**
* Init component
@@ -84,7 +77,7 @@ function (
.observe({
selectedAddress: null,
isAddressDetailsVisible: quote.billingAddress() != null,
- isAddressFormVisible: !customer.isLoggedIn() || addressOptions.length === 1,
+ isAddressFormVisible: !customer.isLoggedIn() || !addressOptions.length,
isAddressSameAsShipping: false,
saveInAddressBook: 1
});
@@ -147,7 +140,7 @@ function (
updateAddress: function () {
var addressData, newBillingAddress;
- if (this.selectedAddress() && this.selectedAddress() != newAddressOption) { //eslint-disable-line eqeqeq
+ if (this.selectedAddress() && !this.isAddressFormVisible()) {
selectBillingAddress(this.selectedAddress());
checkoutData.setSelectedBillingAddress(this.selectedAddress().getKey());
} else {
@@ -202,6 +195,13 @@ function (
}
},
+ /**
+ * Manage cancel button visibility
+ */
+ canUseCancelBillingAddress: ko.computed(function () {
+ return quote.billingAddress() || lastSelectedBillingAddress;
+ }),
+
/**
* Restore billing address
*/
@@ -211,13 +211,6 @@ function (
}
},
- /**
- * @param {Object} address
- */
- onAddressChange: function (address) {
- this.isAddressFormVisible(address == newAddressOption); //eslint-disable-line eqeqeq
- },
-
/**
* @param {Number} countryId
* @return {*}
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address/list.js b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address/list.js
new file mode 100644
index 0000000000000..ca3a267c01671
--- /dev/null
+++ b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address/list.js
@@ -0,0 +1,77 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+define([
+ 'uiComponent',
+ 'Magento_Customer/js/model/address-list',
+ 'mage/translate',
+ 'Magento_Customer/js/model/customer'
+], function (Component, addressList, $t, customer) {
+ 'use strict';
+
+ var newAddressOption = {
+ /**
+ * Get new address label
+ * @returns {String}
+ */
+ getAddressInline: function () {
+ return $t('New Address');
+ },
+ customerAddressId: null
+ },
+ addressOptions = addressList().filter(function (address) {
+ return address.getType() === 'customer-address';
+ });
+
+ return Component.extend({
+ defaults: {
+ template: 'Magento_Checkout/billing-address',
+ selectedAddress: null,
+ isNewAddressSelected: false,
+ addressOptions: addressOptions,
+ exports: {
+ selectedAddress: '${ $.parentName }:selectedAddress'
+ }
+ },
+
+ /**
+ * @returns {Object} Chainable.
+ */
+ initConfig: function () {
+ this._super();
+ this.addressOptions.push(newAddressOption);
+
+ return this;
+ },
+
+ /**
+ * @return {exports.initObservable}
+ */
+ initObservable: function () {
+ this._super()
+ .observe('selectedAddress isNewAddressSelected')
+ .observe({
+ isNewAddressSelected: !customer.isLoggedIn() || !addressOptions.length
+ });
+
+ return this;
+ },
+
+ /**
+ * @param {Object} address
+ * @return {*}
+ */
+ addressOptionsText: function (address) {
+ return address.getAddressInline();
+ },
+
+ /**
+ * @param {Object} address
+ */
+ onAddressChange: function (address) {
+ this.isNewAddressSelected(address === newAddressOption);
+ }
+ });
+});
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js b/app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js
index a2f8c8c56ff33..5e29fa209a641 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js
@@ -81,6 +81,7 @@ define([
maxItemsToDisplay: window.checkout.maxItemsToDisplay,
cart: {},
+ // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
/**
* @override
*/
@@ -101,12 +102,16 @@ define([
self.isLoading(true);
});
- if (cartData()['website_id'] !== window.checkout.websiteId) {
+ if (cartData().website_id !== window.checkout.websiteId ||
+ cartData().store_id !== window.checkout.storeId
+ ) {
customerData.reload(['cart'], false);
}
return this._super();
},
+ //jscs:enable requireCamelCaseOrUpperCaseIdentifiers
+
isLoading: ko.observable(false),
initSidebar: initSidebar,
diff --git a/app/code/Magento/Checkout/view/frontend/web/template/authentication.html b/app/code/Magento/Checkout/view/frontend/web/template/authentication.html
index 406a7d899b67a..5b8dde81dd93e 100644
--- a/app/code/Magento/Checkout/view/frontend/web/template/authentication.html
+++ b/app/code/Magento/Checkout/view/frontend/web/template/authentication.html
@@ -31,15 +31,15 @@
-
+
-
+ |
---|
diff --git a/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_new_guest.html b/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_new_guest.html
index 68f1886986c5b..385110f8f037e 100644
--- a/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_new_guest.html
+++ b/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_new_guest.html
@@ -49,7 +49,7 @@ {{trans "Your Shipment #%shipment_id for Order #%order_id" shipment_id=$ship |
diff --git a/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_update.html b/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_update.html
index 37bf92b866c74..4f9b7286f3ae4 100644
--- a/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_update.html
+++ b/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_update.html
@@ -10,7 +10,7 @@
"var order.getCustomerName()":"Customer Name",
"var comment":"Order Comment",
"var order.increment_id":"Order Id",
-"var order.getStatusLabel()":"Order Status",
+"var order.getFrontendStatusLabel()":"Order Status",
"var shipment.increment_id":"Shipment Id"
} @-->
{{template config_path="design/email/header_template"}}
@@ -24,7 +24,7 @@
"Your order #%increment_id has been updated with a status of %order_status."
increment_id=$order.increment_id
- order_status=$order.getStatusLabel()
+ order_status=$order.getFrontendStatusLabel()
|raw}}
{{trans 'You can check the status of your order by logging into your account.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}
diff --git a/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_update_guest.html b/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_update_guest.html
index 954819949860b..3ef26463ea755 100644
--- a/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_update_guest.html
+++ b/app/design/frontend/Magento/luma/Magento_Sales/email/shipment_update_guest.html
@@ -9,7 +9,7 @@
"var billing.getName()":"Guest Customer Name",
"var comment":"Order Comment",
"var order.increment_id":"Order Id",
-"var order.getStatusLabel()":"Order Status",
+"var order.getFrontendStatusLabel()":"Order Status",
"var shipment.increment_id":"Shipment Id"
} @-->
{{template config_path="design/email/header_template"}}
@@ -23,7 +23,7 @@
"Your order #%increment_id has been updated with a status of %order_status."
increment_id=$order.increment_id
- order_status=$order.getStatusLabel()
+ order_status=$order.getFrontendStatusLabel()
|raw}}
diff --git a/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_email.less b/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_email.less
index 3f19d1020bab9..31c128e07e3a6 100644
--- a/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_email.less
+++ b/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_email.less
@@ -76,8 +76,10 @@
}
// Remove address and phone number link color on iOS
-.address-details a {
- &:extend(.no-link a);
+.email-non-inline() {
+ .address-details a {
+ &:extend(.no-link a);
+ }
}
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__xs) {
diff --git a/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less
index 1e4a92fa0701f..1be46c8239ee2 100644
--- a/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less
+++ b/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less
@@ -343,16 +343,22 @@
}
.product-item-name {
- display: inline-block;
+ float: left;
+ width: calc(100% - 20px);
+ }
+ .product-item::after {
+ clear: both;
+ content: '';
+ display: table;
}
-
.product-item {
.label {
&:extend(.abs-visually-hidden all);
}
.field.item {
- display: inline-block;
+ float: left;
+ width: 20px;
}
}
}
@@ -392,6 +398,17 @@
&.orders-recent {
&:extend(.abs-account-table-margin-mobile all);
&:extend(.abs-no-border-top all);
+ .table-order-items {
+ &.table {
+ tbody {
+ > tr {
+ > td.col {
+ padding-left: 0;
+ }
+ }
+ }
+ }
+ }
}
}
@@ -555,13 +572,13 @@
margin: 0 @tab-control__margin-right 0 0;
a {
- padding: @tab-control__padding-top @tab-control__padding-right;
+ padding: @tab-control__padding-top @indent__base;
}
strong {
border-bottom: 0;
margin-bottom: -1px;
- padding: @tab-control__padding-top @tab-control__padding-right @tab-control__padding-bottom + 1 @tab-control__padding-left;
+ padding: @tab-control__padding-top @indent__base @tab-control__padding-bottom + 1 @indent__base;
}
}
}
@@ -687,3 +704,19 @@
}
}
}
+
+.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
+ .order-links {
+ .item {
+ margin: 0 @tab-control__margin-right 0 0;
+
+ a {
+ padding: @tab-control__padding-top @tab-control__padding-right;
+ }
+
+ strong {
+ padding: @tab-control__padding-top @tab-control__padding-right @tab-control__padding-bottom + 1 @tab-control__padding-left;
+ }
+ }
+ }
+}
diff --git a/app/design/frontend/Magento/luma/Magento_SendFriend/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_SendFriend/web/css/source/_module.less
index baf5468b18485..3435736a54a6a 100644
--- a/app/design/frontend/Magento/luma/Magento_SendFriend/web/css/source/_module.less
+++ b/app/design/frontend/Magento/luma/Magento_SendFriend/web/css/source/_module.less
@@ -10,6 +10,14 @@
& when (@media-common = true) {
.form.send.friend {
&:extend(.abs-add-fields all);
+
+ .fieldset {
+ .field {
+ .control {
+ width: 100%;
+ }
+ }
+ }
}
.product-social-links .action.mailto.friend {
@@ -44,3 +52,18 @@
}
}
}
+.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
+ .form.send.friend {
+ .fieldset {
+ padding-bottom: @indent__xs;
+ }
+
+ .action {
+ &.remove {
+ margin-left: 0;
+ right: 0;
+ top: 100%;
+ }
+ }
+ }
+}
diff --git a/app/design/frontend/Magento/luma/Magento_Theme/layout/default_head_blocks.xml b/app/design/frontend/Magento/luma/Magento_Theme/layout/default_head_blocks.xml
index 2dfb1d3ee6bf0..7e64e5f3f01cd 100644
--- a/app/design/frontend/Magento/luma/Magento_Theme/layout/default_head_blocks.xml
+++ b/app/design/frontend/Magento/luma/Magento_Theme/layout/default_head_blocks.xml
@@ -7,6 +7,6 @@
-->
|