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/2.28.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ofrankowska committed Aug 23, 2022
2 parents b8992ed + eb11ced commit 351922c
Show file tree
Hide file tree
Showing 22 changed files with 113 additions and 94 deletions.
25 changes: 3 additions & 22 deletions Amasty_GdprCookie/templates/cookiebar.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ $confirmationModal = \Amasty\GdprCookie\Model\Config\Source\CookiePolicyBarStyle
$confirmationPopup = \Amasty\GdprCookie\Model\Config\Source\CookiePolicyBarStyle::CONFIRMATION_POPUP;
$confirmationClassic = \Amasty\GdprCookie\Model\Config\Source\CookiePolicyBarStyle::CONFIRMATION;

$cookiePrivacyTextJson = $block->getNotificationText();
$cookiePrivacyText = json_decode($cookiePrivacyTextJson, true);
$widget = $this->getLayout()->createBlock('Amasty\GdprCookie\Block\Widget\Settings');
$groupData = $widget->getGroupData()['groupData'];

Expand Down Expand Up @@ -41,8 +39,7 @@ $settingsTextColorHover = $block->getSettingsTextColorHover();
*/
?>
<?php if (!strpos($block->getRequest()->getRequestUri(), 'cookie-settings')): ?>
<?php if (($block->getNoticeType() === $confirmationModal ||
$block->getNoticeType() === $confirmationPopup) && $cookiePrivacyText): ?>
<?php if ($block->getNoticeType() === $confirmationModal): ?>
<div class="modals-wrapper">
<div
data-role="gdpr-cookie-container"
Expand Down Expand Up @@ -183,13 +180,6 @@ $settingsTextColorHover = $block->getSettingsTextColorHover();
</a>
</div>
<?php endforeach; ?>
<p
<?php if ($policyTextColor): ?>
style="color: <?= $escaper->escapeHtml($policyTextColor);?>"
<?php endif ?>
>
<?= /** @noEscape */ $cookiePrivacyText ?>
</p>
</div>

<div class="modal__bottom">
Expand Down Expand Up @@ -232,7 +222,7 @@ $settingsTextColorHover = $block->getSettingsTextColorHover();
</div>
</div>
</div>
<?php elseif ($block->getNoticeType() === $confirmationClassic && $cookiePrivacyText): ?>
<?php elseif ($block->getNoticeType() === $confirmationClassic): ?>
<div
data-role="gdpr-cookie-container"
class="amgdprcookie-bar-template display-none"
Expand Down Expand Up @@ -262,15 +252,6 @@ $settingsTextColorHover = $block->getSettingsTextColorHover();
class="cookie-message__container"
tabindex="0"
>
<p
class="cookie-message__text"
<?php if ($policyTextColor): ?>
style="color: <?= $escaper->escapeHtml($policyTextColor);?>"
<?php endif ?>
>
<?= /** @noEscape */ $cookiePrivacyText ?>
</p>

<div class="cookie-message__actions">
<div class="cookie-message__action">
<button
Expand Down Expand Up @@ -372,4 +353,4 @@ $settingsTextColorHover = $block->getSettingsTextColorHover();
}
<?php endif ?>
</style>
<?php endif ?>
<?php endif ?>
74 changes: 34 additions & 40 deletions Amasty_GiftCard/templates/product/price/final_price.phtml
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
<?php
/** @var \Amasty\GiftCard\Pricing\Render\FinalPriceBox $block */
$productId = $block->getSaleableItem()->getId();
/** @var $block \Amasty\GiftCard\Pricing\Render\FinalPriceBox */
/** @var $viewModel \Amasty\GiftCard\ViewModel\Price\Component\Price */
$viewModel = $block->getViewModel();
$productId = $viewModel->getSaleableItem()->getId();
?>

<?php if ($block->isProductForm() || ($block->getCanShowPrice() !== false && !$block->isProductForm())): ?>
<?php if ($block->getCanShowPrice() !== false && !$block->isProductForm()): ?>
<div class="price-box">
<?php if (!$viewModel->isSinglePrice()): ?>
<span class="price-label price__text">
<?= $escaper->escapeHtml(__('From')) ?>
</span>
<?php endif; ?>
<span
class="price__value"
id="product-price-<?= $escaper->escapeHtmlAttr($productId . $block->getIdSuffix()) ?>"
>
<?= $escaper->escapeHtml($viewModel->convertAndFormatCurrency($viewModel->getMinPrice(), false)) ?>
</span>
</div>
<?php endif; ?>

<?php if ($block->isProductForm()): ?>
<?php
$currency = $block->getCurrencyShortName();
$product = $block->getSaleableItem();
$product = $viewModel->getSaleableItem();
?>
<div
class="amgiftcard-price-container"
data-bind="scope: 'price'"
data-amcard-js="price-container"
data-bind="scope: 'price_<?= $escaper->escapeHtmlAttr($productId) ?>'"
>
<div
class="
Expand All @@ -21,7 +40,7 @@ $productId = $block->getSaleableItem()->getId();
data-bind="
visible: $data.showCustomPrice,
css: {
'opacity-0': !$data.isLoaded()
'opacity-0': $data.isLoaded() === false
}
"
>
Expand All @@ -38,12 +57,12 @@ $productId = $block->getSaleableItem()->getId();
<?= $escaper->escapeHtml(__('From')) ?>
</span>
<span
data-price-amount="<?= $block->convertCurrency($block->getMinPrice()) ?>"
data-price-amount="<?= /* @noEscape */ $viewModel->convertCurrency($block->getMinPrice()) ?>"
data-price-type="minPrice"
class="price-wrapper"
>
<span class="price__value">
<?= $escaper->escapeHtml($block->convertAndFormatCurrency($block->getMinPrice(), false)) ?>
<?= $escaper->escapeHtml(/* @noEscape */ $viewModel->convertAndFormatCurrency(/* @noEscape */ $viewModel->getMinPrice(), false)) ?>
</span>
</span>
</div>
Expand All @@ -63,12 +82,12 @@ $productId = $block->getSaleableItem()->getId();
<?= $escaper->escapeHtml(__('To')) ?>
</span>
<span
data-price-amount="<?= $block->convertCurrency($block->getMaxPrice()) ?>"
data-price-amount="<?= /* @noEscape */ $viewModel->convertCurrency($block->getMaxPrice()) ?>"
data-price-type="maxPrice"
class="price-wrapper"
>
<span class="price__value">
<?= $escaper->escapeHtml($block->convertAndFormatCurrency($block->getMaxPrice(), false)) ?>
<?= $escaper->escapeHtml(/* @noEscape */ $viewModel->convertAndFormatCurrency(/* @noEscape */ $viewModel->getMaxPrice(), false)) ?>
</span>
</span>
</span>
Expand All @@ -90,43 +109,18 @@ $productId = $block->getSaleableItem()->getId();
<span
class="price-wrapper price__value"
data-price-amount="
<?= $block->isSinglePrice()
? $escaper->escapeHtmlAttr($block->convertCurrency($block->getFinalPrice($product)))
<?= $viewModel->isSinglePrice()
? $escaper->escapeHtmlAttr(/* @noEscape */ $viewModel->convertCurrency(/* @noEscape */ $viewModel->getFinalPrice($product)))
: '0';
?>
"
data-price-type="finalPrice"
id="product-price-<?= $escaper->escapeHtmlAttr($productId . $block->getIdSuffix()) ?>"
>
<?= $escaper->escapeHtml($block->convertAndFormatCurrency($block->getMinPrice(), false)) ?>
<?= $escaper->escapeHtml(/* @noEscape */ $viewModel->convertAndFormatCurrency(/* @noEscape */ $viewModel->getMinPrice(), false)) ?>
</span>
</span>
</div>
<script type="text/x-magento-init">
{
"*": {
"Magento_Ui/js/core/app": {
"components": {
"price": {
"component": "Amasty_GiftCard/js/price",
"template": "Amasty_GiftCard/price",
"prices": <?= /** @noEscape */ $block->getPredefinedAmounts() ?>,
"currencyCode": "<?= $escaper->escapeHtmlAttr($block->getCurrencyCode()) ?>",
"feeType": "<?= $escaper->escapeHtmlAttr($product->getAmGiftcardFeeType()) ?>",
"feeValue": "<?= $escaper->escapeHtmlAttr($product->getAmGiftcardFeeValue()) ?>",
"feeStatus": "<?= $escaper->escapeHtmlAttr($product->getAmGiftcardFeeEnable()) ?>",
"feeValueConverted": "<?= $escaper->escapeHtmlAttr($this->convertCurrency($product->getAmGiftcardFeeValue())) ?>",
"productId": "<?= $escaper->escapeHtmlAttr($product->getId()); ?>",
"customMinAmountCurrency": "<?= /** @noEscape */ $block->convertAndFormatCurrency($block->getOpenAmountMin(), false) ?>",
"customMaxAmountCurrency": "<?= /** @noEscape */ $block->convertAndFormatCurrency($block->getOpenAmountMax(), false) ?>",
"customMinAmount": "<?= $escaper->escapeHtmlAttr($this->convertCurrency($block->getOpenAmountMin())) ?>",
"customMaxAmount": "<?= $escaper->escapeHtmlAttr($this->convertCurrency($block->getOpenAmountMax())) ?>",
"isOpenAmount": "<?= $escaper->escapeHtmlAttr($block->isOpenAmount()) ?>",
"isSinglePrice": "<?= $escaper->escapeHtmlAttr($block->isSinglePrice()) ?>"
}
}
}
}
}
</script>

<?= $block->getPriceComponentHtml() ?>
<?php endif; ?>
23 changes: 15 additions & 8 deletions Amasty_GiftCard/templates/product/view/type/giftcard.phtml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<?php
/** @var $block \Amasty\GiftCard\Block\Product\View\Type\GiftCard */
/**
* @var $block Amasty\GiftCard\Block\Product\View\Type\GiftCard
* @var $escaper Magento\Framework\Escaper
*/

$product = $block->getProduct();
$productId = $product->getId();
?>
<!-- ko scope: 'giftCard' -->

<!-- ko scope: 'giftCard_<?= $escaper->escapeHtml($productId) ?>' -->
<div
class="
amcard-general-container
Expand Down Expand Up @@ -167,7 +173,7 @@ $product = $block->getProduct();
<!-- ko if: isShowPrices -->
<div
class="amcard-form-container"
data-bind="scope: 'price'"
data-bind="scope: 'price_<?= $escaper->escapeHtmlAttr($productId) ?>'"
>
<!-- ko template: getTemplate() --><!-- /ko -->
</div>
Expand All @@ -177,7 +183,7 @@ $product = $block->getProduct();
amcard-form-container
-interior
"
data-bind="scope: 'images'"
data-bind="scope: 'images_<?= $escaper->escapeHtmlAttr($productId) ?>'"
>
<!-- ko template: getTemplate() --><!-- /ko -->
</div>
Expand Down Expand Up @@ -332,33 +338,34 @@ $product = $block->getProduct();
<!-- ko if: isShowField('am_giftcard_date_delivery') -->
<div
class="amcard-form-container"
data-bind="scope: 'datepicker'"
data-bind="scope: 'datepicker_<?= $escaper->escapeHtmlAttr($productId) ?>'"
>
<!-- ko template: getTemplate() --><!-- /ko -->
</div>
<!-- /ko -->
</div>
<!-- /ko -->
<?= $block->getChildHtml('amgc.component.price') ?>

<script type="text/x-magento-init">
{
"*": {
"Magento_Ui/js/core/app": {
"components": {
"datepicker": {
"datepicker_<?= $escaper->escapeHtml($productId) ?>": {
"component": "Amasty_GiftCard/js/datepicker",
"template": "Amasty_GiftCard/datepicker",
"timezones": <?= /* @noEscape */ $block->getListTimezones() ?>
},
"images": {
"images_<?= $escaper->escapeHtml($productId) ?>": {
"component": "Amasty_GiftCard/js/images",
"template": "Amasty_GiftCard/images",
"images": <?= /* @noEscape */ $block->getImages() ?>,
"isCustomImageAllowed": <?= /* @noEscape */ (int)$block->getAllowUsersUploadImages() ?>,
"tooltip": "<?= $escaper->escapeHtml($block->getTooltipContent()) ?>",
"customImageUrl": "<?= $escaper->escapeUrl($block->getCustomImageUrl()) ?>"
},
"giftCard": {
"giftCard_<?= $escaper->escapeHtml($productId) ?>": {
"component": "Amasty_GiftCard/js/giftcard",
"giftCardType": "<?= /* @noEscape */ $product->getAmGiftcardType() ?>",
"previewUrl": "<?= $escaper->escapeUrl($block->getUrl('amgcard/preview/getPreviewContent')) ?>",
Expand Down
3 changes: 1 addition & 2 deletions Amasty_Storelocator/web/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ define([
'mage/translate',
'noUiSlider',
'Amasty_Storelocator/vendor/jquery.ui.touch-punch.min',
'Magento_Ui/js/lib/knockout/bindings/range',
'Magento_Ui/js/modal/modal'
'Magento_Ui/js/lib/knockout/bindings/range'
], function ($, $t, noUiSlider) {

$.widget('mage.amLocator', {
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ USE GITHUB ISSUE/PULL REQUEST NUMBERS, NOT INTERNAL ONE
### Updated

## [Released]
## [2.28.0] - 2022-08-23
### Added
- some component variables (#567)
### Changed
### Fixed
- syntax error, `unexpected ','` in `Magento_Catalog/templates/product/widget/viewed/list.phtml` (#560)
- missing Forgot password link in Login/Create account modal (#564)
- CLS issue caused by scrollbar appearing when non-critical styles are loaded (#566)
- small component issues (#566)
### Removed
### Updated
- amasty/module-gdpr => 2.8.3 (#562)
- amasty/module-gift-card => 2.8.4 (#562)
- amasty/module-store-locator => 2.5.3 (#562)
- amasty/shiprules => 2.8.3 (#562)
## [2.27.0] - 2022-06-14
### Added
- New config options for Modal (closeOnEsc, closeOnBackdrop)
Expand Down
2 changes: 1 addition & 1 deletion Magento_Catalog/templates/product/widget/viewed/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

<?php $sliderBlockAfter = $this->getLayout()
->createBlock("Magento\Framework\View\Element\Template")
->setTemplate("Magento_Theme::html/slider.phtml"),
->setTemplate("Magento_Theme::html/slider.phtml");
$sliderBlockAfter->setData([
'slider_html' => 'after-slides'
])
Expand Down
4 changes: 2 additions & 2 deletions Magento_Customer/web/template/authentication-popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class="block-authentication display-none"
data-bind="
afterRender: setModalElement,
blockLoader:
blockLoader: isLoading
"
>
<h2
Expand Down Expand Up @@ -162,7 +162,7 @@

<a
data-bind="
attr: { href: forgotPasswordUrl }
attr: { href: forgotPasswordUrl },
i18n: 'Forgot Your Password?'
"
class="account-form__forgot-password"
Expand Down
4 changes: 3 additions & 1 deletion Magento_Theme/templates/html/picture.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@
<?php endif ?>
/>
</picture>
<!-- styles are rendered only if values for image ratio for mq are provided. Content Type (picture.phtml) id is required -->
<?php
// styles are rendered only if values for image ratio for mq are provided. Content Type (picture.phtml) id is required
?>
<?php if ($pictureAspectRatio && $isAspectratioMq && $pictureId): ?>
<style>
.picture-<?= $pictureId ?> {
Expand Down
1 change: 1 addition & 0 deletions Snowdog_Components/components/Atoms/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ body {
body {
display: $body-display;
flex-direction: $body-flex-direction;
overflow-y: scroll;
}

.page-wrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ $link__decoration-hover : underline !default;
$link__color : $color-primary !default;
$link__color-hover : $color-info !default;
$link__color--invert : $color-info !default;
$link__decoration--invert : none !default;
$link__color-hover--invert : $color-primary !default;
$link__color--secondary : $color-secondary !default;
$link__decoration--secondary : none !default;
$link__color-hover--secondary: $color-primary !default;
$link__transition : $transition-base !default;

Expand All @@ -32,6 +34,7 @@ $link__transition : $transition-base !default;

&--invert {
color: $link__color--invert;
text-decoration: $link__decoration--invert;

&:hover {
color: $link__color-hover--invert;
Expand All @@ -40,6 +43,7 @@ $link__transition : $transition-base !default;

&--secondary {
color: $link__color--secondary;
text-decoration: $link__decoration--secondary;

&:hover {
color: $link__color-hover--secondary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ $breadcrumbs__link-padding : 0 !default;

$breadcrumbs__text-decoration : none !default;
$breadcrumbs__text-decoration--active: none !default;

$breadcrumbs__link-text-decoration : $breadcrumbs__text-decoration !default;
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
font-family: $breadcrumbs__font-family;
line-height: $breadcrumbs__line-height;
color: $breadcrumbs__color;
text-decoration: $breadcrumbs__text-decoration;
text-decoration: $breadcrumbs__link-text-decoration;
background-clip: content-box;
}
}
Loading

2 comments on commit 351922c

@vercel
Copy link

@vercel vercel bot commented on 351922c Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 351922c Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

alpaca-docs – ./docs

alpaca-docs-git-master-snowdog1.vercel.app
alpaca-docs-snowdog1.vercel.app
magento2-alpaca-docs.vercel.app

Please sign in to comment.