Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aekal committed Mar 4, 2019
2 parents a15eed5 + c2ac8a2 commit ab70058
Show file tree
Hide file tree
Showing 56 changed files with 1,304 additions and 2,028 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [1.2.0] - 2019-03-04
### Added
- Support for escape key in dropdown script
- Quickorder page styles

### Changed
- Refactor filters and accessibility improvements
- Connect footer links with module-menu
- Price rendering for simple and configurable products

### Fixed
- Duplicated `email` id on company users view
- Duplicated `My wishlist` section in sidebar
- Login form for disabled 'Guest Checkout'
- Swatches in catalog and product page for magento 2.3.0
- Details dropdown in minicart
- Price updating in configurable products
- Related products slider in product page

## [1.1.0] - 2019-01-07
### Added
- Reset password styles
Expand Down
5 changes: 5 additions & 0 deletions Magento_Catalog/layout/catalog_category_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<!-- Restored blocks -->
<referenceBlock name="sale.reorder.sidebar" remove="false"/>
<referenceBlock name="wishlist_sidebar" remove="false"/>
<referenceBlock name="multiple-wishlist_sidebar" remove="true"/>
<referenceBlock name="catalog.compare.sidebar" remove="false"/>
<referenceBlock name="category.product.addto.requisition" remove="true"/>

<!-- Moved blocks -->
<move element="div.sidebar.main" destination="columns" before="main"/>
</body>
</page>
2 changes: 1 addition & 1 deletion Magento_Catalog/layout/catalog_product_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<referenceContainer name="page.messages" htmlClass="page messages container" />

<container name="product.container" htmlClass="product-view container" htmlTag="div">
<container name="product.wrapper" htmlClass="product-view__wrapper" htmlTag="section">
<container name="product.wrapper" htmlClass="product-view__wrapper product-info-main" htmlTag="section">
<container name="product.column.left" htmlClass="product-view__gallery" htmlTag="div">
<referenceContainer name="product.info.media" htmlClass="gallery galler--vertical" />
</container>
Expand Down
2 changes: 1 addition & 1 deletion Magento_Catalog/templates/product/image_with_borders.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="lazyload-wrapper">
<img
class="image lazyload product-image-photo"
class="image product-image-photo catalog-grid-item__image lazyload"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-src="<?= $block->getImageUrl() ?>"
alt="<?= $block->stripTags($block->getLabel(), null, true) ?>"
Expand Down
8 changes: 6 additions & 2 deletions Magento_Catalog/templates/product/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use Magento\Framework\App\Action\Action;
class="
catalog-list-item
catalog-list__item
product-item
product-item-details
product-item-info
"
>
Expand Down Expand Up @@ -145,7 +145,11 @@ use Magento\Framework\App\Action\Action;
<?php foreach ($_productCollection as $_product): ?>
<?php $productImage = $block->getImage($_product, $imageDisplayArea) ?>
<li
class="catalog-grid-item product-item product-item-info"
class="
catalog-grid-item
product-item-details
product-item-info
"
data-container="product-grid"
>
<a
Expand Down
119 changes: 53 additions & 66 deletions Magento_Catalog/templates/product/list/items.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -196,90 +196,77 @@ switch ($type = $block->getType()) {
</div>
</a>

<section
class="
catalog-grid-item__flex-wrapper
catalog-grid-item__main
"
>
<section class="catalog-grid-item__details">
<h2 class="catalog-grid-item__name">
<a
href="<?= $block->getProductUrl($_item) ?>"
class="catalog-grid-item__link"
class="catalog-grid-item__link catalog-grid-item__link--name"
title="<?= $block->escapeHtml($_item->getName()) ?>"
>
<?= $block->escapeHtml($_item->getName()) ?>
</a>
</h2>

<div class="catalog-grid-item__price">
<?= $block->getProductPrice($_item) ?>
</div>
</section>


<section class="catalog-grid-item__details">
<?php if ($templateType): ?>
<?= $block->getReviewsSummaryHtml($_item, $templateType) ?>
<?php endif; ?>

<div class="catalog-grid-item__flex-wrapper">
<div class="catalog-grid-item__name catalog-grid-item__name--one-line">
<a
href="<?= $block->getProductUrl($_item) ?>"
class="catalog-grid-item__link"
title="<?= $block->escapeHtml($_item->getName()) ?>"
>
<?= $block->escapeHtml($_item->getName()) ?>
</a>
</div>

<div class="catalog-grid-item__price">
<?= $block->getProductPrice($_item) ?>
</div>
</div>

<?php if ($showAddTo || $showCart): ?>
<div class="catalog-grid-item__actions">
<?php if ($showCart): ?>
<?php if ($_item->isSaleable()): ?>
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
<button
class="
button
button--secondary
catalog-grid-item__primary-action
tocart
"
data-mage-init='{
"redirectUrl": {
"url": "<?= $block->getAddToCartUrl($_item) ?>"
}
}'
type="button"
title="<?= __('Add to Cart') ?>"
>
<?= __('Add to Cart') ?>
</button>
<?php else: ?>
<?php
$postDataHelper = $this->helper('Magento\Framework\Data\Helper\PostHelper');
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
?>
<button
class="
button
button--secondary
catalog-grid-item__primary-action
tocart
"
data-post='<?= $postData ?>'
type="button"
title="<?= __('Add to Cart') ?>"
>
<?= __('Add to Cart') ?>
</button>
<?php endif; ?>
<div class="catalog-grid-item__primary-form">
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
<button
class="
button
button--secondary
catalog-grid-item__primary-action
tocart
"
data-mage-init='{
"redirectUrl": {
"url": "<?= $block->getAddToCartUrl($_item) ?>"
}
}'
type="button"
title="<?= __('Add to Cart') ?>"
>
<span class="catalog-grid-item__cart-text">
<?= __('Add to Cart') ?>
</span>
<svg class="icon catalog-grid-item__cart-icon">
<title><?= __('Add to Cart') ?></title>
<use xlink:href="<?= $block->getViewFileUrl('/images/icons-sprite.svg#shopping-cart') ?>"></use>
</svg>
</button>
<?php else: ?>
<?php
$postDataHelper = $this->helper('Magento\Framework\Data\Helper\PostHelper');
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
?>
<button
class="
button
button--secondary
catalog-grid-item__primary-action
tocart
"
data-post='<?= $postData ?>'
type="button"
title="<?= __('Add to Cart') ?>"
>
<span class="catalog-grid-item__cart-text">
<?= __('Add to Cart') ?>
</span>
<svg class="icon catalog-grid-item__cart-icon">
<title><?= __('Add to Cart') ?></title>
<use xlink:href="<?= $block->getViewFileUrl('/images/icons-sprite.svg#shopping-cart') ?>"></use>
</svg>
</button>
<?php endif; ?>
</div>
<?php else: ?>
<?php if ($_item->getIsSalable()): ?>
<div class="stock available">
Expand Down
61 changes: 61 additions & 0 deletions Magento_Catalog/templates/product/price/final_price.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/** @var \Magento\Catalog\Pricing\Render\FinalPriceBox $block */

/** ex: \Magento\Catalog\Pricing\Price\RegularPrice */
/** @var \Magento\Framework\Pricing\Price\PriceInterface $priceModel */
$priceModel = $block->getPriceType('regular_price');

/** ex: \Magento\Catalog\Pricing\Price\FinalPrice */
/** @var \Magento\Framework\Pricing\Price\PriceInterface $finalPriceModel */
$finalPriceModel = $block->getPriceType('final_price');

$idSuffix = $block->getIdSuffix() ? $block->getIdSuffix() : '';
$schema = ($block->getZone() == 'item_view') ? true : false;
?>

<div class="price">
<?php if ($block->hasSpecialPrice()): ?>
<span class="price__value price__value--old">
<?= $block->renderAmount($priceModel->getAmount(), [
'display_label' => false,
'price_id' => $block->getPriceId('old-price-' . $idSuffix),
'price_type' => 'oldPrice',
'include_container' => false,
'skip_adjustments' => true
]); ?>
</span>
<span class="price__value price__value--special">
<?= $block->renderAmount($finalPriceModel->getAmount(), [
'display_label' => false,
'price_id' => $block->getPriceId('product-price-' . $idSuffix),
'price_type' => 'finalPrice',
'include_container' => false,
'schema' => $schema
]); ?>
</span>
<?php else: ?>
<span class="price__value">
<?= $block->renderAmount($finalPriceModel->getAmount(), [
'price_id' => $block->getPriceId('product-price-' . $idSuffix),
'price_type' => 'finalPrice',
'include_container' => true,
'schema' => $schema
]); ?>
</span>
<?php endif; ?>
</div>

<?php if ($block->showMinimalPrice()): ?>
<?php if ($block->getUseLinkForAsLowAs()): ?>
<a
href="<?= $block->getSaleableItem()->getProductUrl() ?>"
class="minimal-price-link"
>
<?= $block->renderAmountMinimal() ?>
</a>
<?php else: ?>
<span class="minimal-price-link">
<?= $block->renderAmountMinimal() ?>
</span>
<?php endif ?>
<?php endif; ?>
3 changes: 3 additions & 0 deletions Magento_CatalogSearch/layout/catalogsearch_result_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
<referenceBlock name="sale.reorder.sidebar" remove="false"/>
<referenceBlock name="wishlist_sidebar" remove="false"/>
<referenceBlock name="catalog.compare.sidebar" remove="false"/>

<!-- Moved blocks -->
<move element="div.sidebar.main" destination="columns" before="main"/>
</body>
</page>
6 changes: 2 additions & 4 deletions Magento_Checkout/web/template/minicart/item/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,21 @@ <h3 class="minicart-product__name">
minicart-product__attributes-button
"
aria-expanded="false"
aria-controls="see-details"
data-bind="attr: {'aria-controls': 'details-' + product_sku }"
>
<!-- ko i18n: 'See Details' --><!-- /ko -->
<svg class="icon dropdown-list__icon" role="img">
<title><!-- ko i18n: 'See Details' --><!-- /ko --></title>
<use data-bind="attr: { 'xlink:href': require.toUrl('images/icons-sprite.svg#angle-down') }" xlink:href=''></use>
</svg>
</button>

<div
id="see-details"
class="
dropdown-list__content
minicart-product__attributes-button
"
data-content="see-details"
aria-hidden="true"
data-bind="attr: {id: 'details-' + product_sku }"
>
<dl
class="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@
>
</div>
<div class="field input email required">
<label class="label" for="email">
<label class="label" for="add-user-email">
<?= $block->escapeHtml(__('Email')) ?>
</label>
<input
type="email"
name="email"
id="email"
id="add-user-email"
value=""
title="<?= $block->escapeHtml(__('Email')) ?>"
data-role="email"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,31 @@ $priceModel = $block->getPriceType('regular_price');

/** @var \Magento\Framework\Pricing\Price\PriceInterface $finalPriceModel */
$finalPriceModel = $block->getPriceType('final_price');

$idSuffix = $block->getIdSuffix() ? $block->getIdSuffix() : '';
$schema = ($block->getZone() == 'item_view') ? true : false;
?>

<?php if (!$block->isProductList() && $block->hasSpecialPrice()): ?>
<span class="price__value price__value--old ">
<span class="sly-old-price price__value price__value--old">
<?= $block->renderAmount($priceModel->getAmount(), [
'display_label' => false,
'price_id' => $block->getPriceId('old-price-' . $idSuffix),
'price_type' => 'oldPrice',
'include_container' => true,
'skip_adjustments' => true
]); ?>
</span>
<span class="price__value price__value--special">
<?= $block->renderAmount($finalPriceModel->getAmount(), [
'display_label' => false,
'price_id' => $block->getPriceId('product-price-' . $idSuffix),
'price_type' => 'finalPrice',
'price_id' => $block->getPriceId('old-price-' . $idSuffix),
'price_type' => 'oldPrice',
'include_container' => true,
'schema' => $schema
'skip_adjustments' => true
]); ?>
</span>
<?php else: ?>
<?php endif; ?>

<span class="normal-price">
<?= $block->renderAmount($finalPriceModel->getAmount(), [
'price_id' => $block->getPriceId('product-price-' . $idSuffix),
'price_type' => 'finalPrice',
'display_label' => __('From'),
'price_id' => $block->getPriceId('product-price-' . $idSuffix),
'price_type' => 'finalPrice',
'include_container' => true,
'schema' => $schema
]); ?>
<?php endif; ?>
</span>

<?php if ($block->showMinimalPrice()): ?>
<?php if ($block->getUseLinkForAsLowAs()):?>
Expand Down
Loading

0 comments on commit ab70058

Please sign in to comment.