From a1bd4d9e0619703d27274d14c75e4c161e2cdb7e Mon Sep 17 00:00:00 2001 From: Ievgen Kolesov Date: Mon, 13 May 2019 19:52:59 -0500 Subject: [PATCH 01/10] MAGETWO-99488: Eliminate @escapeNotVerified in Tax-related Modules --- .../adminhtml/templates/items/price/row.phtml | 11 ++--- .../templates/items/price/total.phtml | 5 +-- .../templates/items/price/unit.phtml | 11 ++--- .../order/create/items/price/row.phtml | 11 ++--- .../order/create/items/price/total.phtml | 11 ++--- .../order/create/items/price/unit.phtml | 11 ++--- .../view/adminhtml/templates/rate/form.phtml | 3 -- .../view/adminhtml/templates/rate/js.phtml | 5 +-- .../view/adminhtml/templates/rate/title.phtml | 15 +++---- .../view/adminhtml/templates/rule/edit.phtml | 32 +++++++------- .../adminhtml/templates/rule/rate/form.phtml | 3 +- .../templates/toolbar/class/add.phtml | 11 ----- .../templates/toolbar/class/save.phtml | 24 ----------- .../templates/toolbar/rate/add.phtml | 3 -- .../templates/toolbar/rate/save.phtml | 5 +-- .../templates/toolbar/rule/add.phtml | 11 ----- .../templates/toolbar/rule/save.phtml | 25 ----------- .../base/templates/pricing/adjustment.phtml | 9 ++-- .../templates/pricing/adjustment/bundle.phtml | 11 ++--- .../checkout/cart/item/price/sidebar.phtml | 10 ++--- .../templates/checkout/grandtotal.phtml | 28 ++++++------ .../templates/checkout/shipping.phtml | 32 +++++++------- .../templates/checkout/shipping/price.phtml | 11 ++--- .../templates/checkout/subtotal.phtml | 26 ++++++----- .../frontend/templates/checkout/tax.phtml | 22 +++++----- .../templates/email/items/price/row.phtml | 11 ++--- .../frontend/templates/item/price/row.phtml | 6 +-- .../item/price/total_after_discount.phtml | 4 +- .../frontend/templates/item/price/unit.phtml | 6 +-- .../view/frontend/templates/order/tax.phtml | 21 ++++----- .../adminhtml/templates/items/price/row.phtml | 15 +++---- .../templates/items/price/total.phtml | 5 +-- .../templates/items/price/unit.phtml | 15 +++---- .../order/create/items/price/row.phtml | 23 +++++----- .../order/create/items/price/total.phtml | 23 +++++----- .../order/create/items/price/unit.phtml | 23 +++++----- .../adminhtml/templates/renderer/tax.phtml | 43 +++++++++---------- .../base/templates/pricing/adjustment.phtml | 23 +++++----- .../checkout/cart/item/price/sidebar.phtml | 18 ++++---- .../review/item/price/row_excl_tax.phtml | 16 +++---- .../review/item/price/row_incl_tax.phtml | 16 +++---- .../review/item/price/unit_excl_tax.phtml | 16 +++---- .../review/item/price/unit_incl_tax.phtml | 16 +++---- .../templates/email/items/price/row.phtml | 19 ++++---- .../frontend/templates/item/price/row.phtml | 30 ++++++------- .../item/price/total_after_discount.phtml | 4 +- .../frontend/templates/item/price/unit.phtml | 30 ++++++------- 47 files changed, 275 insertions(+), 454 deletions(-) delete mode 100644 app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml delete mode 100644 app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml delete mode 100644 app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml delete mode 100644 app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml diff --git a/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml b/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml index 5e914fdc5a558..890e876cf02fc 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayBothPrices() || $block->displayPriceExclTax()): ?>
displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - displayPrices($_item->getBaseRowTotal(), $_item->getRowTotal()) ?> + displayPrices($_item->getBaseRowTotal(), $_item->getRowTotal()) ?>
displayBothPrices() || $block->displayPriceInclTax()): ?>
displayBothPrices()): ?> - : + escapeHtml(('Incl. Tax')) ?>: helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> helper('Magento\Checkout\Helper\Data')->getBaseSubtotalInclTax($_item); ?> - displayPrices($_baseIncl, $_incl) ?> + displayPrices($_baseIncl, $_incl) ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/items/price/total.phtml b/app/code/Magento/Tax/view/adminhtml/templates/items/price/total.phtml index 501ec61d34815..f8a32492a566d 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/items/price/total.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/items/price/total.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); ?> -displayPrices($block->getBaseTotalAmount($_item), $block->getTotalAmount($_item)) ?> +displayPrices($block->getBaseTotalAmount($_item), $block->getTotalAmount($_item)) ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/items/price/unit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/items/price/unit.phtml index 82d82192d45e4..35ca03ffbd5af 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/items/price/unit.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/items/price/unit.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceExclTax()): ?>
helper('Magento\Tax\Helper\Data')->displaySalesBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - displayPrices($_item->getBasePrice(), $_item->getPrice()) ?> + displayPrices($_item->getBasePrice(), $_item->getPrice()) ?>
helper('Magento\Tax\Helper\Data')->displaySalesBothPrices() || $this->helper('Magento\Tax\Helper\Data')->displaySalesPriceInclTax()): ?>
helper('Magento\Tax\Helper\Data')->displaySalesBothPrices()): ?> - : + escapeHtml(__('Incl. Tax')) ?>: helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> helper('Magento\Checkout\Helper\Data')->getBasePriceInclTax($_item); ?> - displayPrices($_baseIncl, $_incl) ?> + displayPrices($_baseIncl, $_incl) ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/row.phtml b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/row.phtml index 17f7f39529a74..63c55526e2417 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/row.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/row.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayPriceExclTax() || $block->displayBothPrices()): ?> displayBothPrices($block->getStore())): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - formatPrice($_item->getRowTotal()) ?> + formatPrice($_item->getRowTotal()) ?> displayPriceInclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> -
: +
escapeHtml(__('Incl. Tax')) ?>: helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> - formatPrice($_incl) ?> + formatPrice($_incl) ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/total.phtml b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/total.phtml index 860b4662fd369..480fb84feb8cc 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/total.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/total.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayPriceExclTax() || $block->displayBothPrices()): ?> getRowTotal() - $_item->getTotalDiscountAmount(); ?> displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - formatPrice(max(0, $_rowTotalWithoutDiscount)) ?> + formatPrice(max(0, $_rowTotalWithoutDiscount)) ?> displayPriceInclTax() || $block->displayBothPrices()): ?> displayBothPrices($block->getStore())): ?> -
: +
escapeHtml(__('Incl. Tax')) ?>: getTotalAmount($_item); ?> - formatPrice($_incl) ?> + formatPrice($_incl) ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/unit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/unit.phtml index 2846307979df0..a229c0bba8340 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/unit.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/order/create/items/price/unit.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayPriceExclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - formatPrice($_item->getCalculationPrice()) ?> + formatPrice($_item->getCalculationPrice()) ?> displayPriceInclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> -
: +
escapeHtml(__('Incl. Tax')) ?>: helper('Magento\Checkout\Helper\Data')->getPriceInclTax($_item); ?> - formatPrice($_incl) ?> + formatPrice($_incl) ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml index 30b5e954da5d2..304020c3af279 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?>
getFormHtml() ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml index 16c23624c38e6..4a3d20d4394f1 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> - diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml index 902c6932f0ae1..c0928f4723b50 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/add.phtml @@ -3,8 +3,5 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getChildHtml('grid') ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml index 3128b82b69e60..eb446ecb092ac 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> toHtml() ?> @@ -16,7 +13,7 @@ require([ "mage/mage" ], function($){ - $('#getForm()->getId() ?>').mage('form').mage('validation'); + $('#escapeHtml($form->getForm()->getId()) ?>').mage('form').mage('validation'); $(document).ready(function () { 'use strict'; diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml deleted file mode 100644 index b3d8a01e1eff1..0000000000000 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml +++ /dev/null @@ -1,11 +0,0 @@ - -
- -
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml deleted file mode 100644 index 10c0e796ea4f1..0000000000000 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml +++ /dev/null @@ -1,25 +0,0 @@ - -
- getBackButtonHtml() ?> - getResetButtonHtml() ?> - getSaveButtonHtml() ?> - getDeleteButtonHtml() ?> -
- -toHtml() ?> - - diff --git a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml index c6d3d51ff22a8..775c35d6a0d4a 100644 --- a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml @@ -3,18 +3,15 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> displayBothPrices()): ?> - - getDisplayAmountExclTax() ?> + getDisplayAmountExclTax() ?> diff --git a/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml index 999af81186fae..72f0bcd297d84 100644 --- a/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml @@ -3,19 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> displayPriceIncludingTax()): ?> - getDisplayAmount() ?> + getDisplayAmount() ?> displayPriceExcludingTax()): ?> - getDisplayAmountExclTax() ?> + getDisplayAmountExclTax() ?> displayBothPrices()): ?> - getDisplayAmount() ?> + getDisplayAmount() ?> getDisplayAmountExclTax() !== $block->getDisplayAmount()): ?> - (+getDisplayAmountExclTax() ?> Excl. Tax) + (+getDisplayAmountExclTax() ?> escapeHtml(__('Excl. Tax'))?>) diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml index 9395bd47ca3e7..dfa829aac7119 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml @@ -4,19 +4,17 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** @var $block \Magento\Tax\Block\Item\Price\Renderer */ ?> getItem() ?> displayPriceInclTax() || $block->displayBothPrices()): ?> - + getPriceInclTax(); ?> - helper('Magento\Checkout\Helper\Data')->formatPrice($_incl) ?> + helper('Magento\Checkout\Helper\Data')->formatPrice($_incl) ?> displayPriceExclTax() || $block->displayBothPrices()): ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml index 5bcbde0e24c4e..967b6c33d537f 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml @@ -4,37 +4,35 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * @var $block \Magento\Tax\Block\Checkout\Grandtotal */ ?> includeTax() && $block->getTotalExclTax() >= 0):?> - - + + escapeHtml(__('Grand Total Excl. Tax')) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotalExclTax()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotalExclTax()) ?> -renderTotals('taxes', $block->getColspan()) ?> +renderTotals('taxes', $block->getColspan()) ?> - - + + escapeHtml(__('Grand Total Incl. Tax')) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> - - getTotal()->getTitle() ?> + + escapeHtml($block->getTotal()->getTitle()) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml index 203dd72041296..c0321543b001f 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * @var $block \Magento\Tax\Block\Checkout\Shipping * @see \Magento\Tax\Block\Checkout\Shipping @@ -14,37 +12,37 @@ displayShipping()):?> displayBoth()):?> - - getExcludeTaxLabel() ?> + + escapeHtml($block->getExcludeTaxLabel()) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingExcludeTax()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingExcludeTax()) ?> - - getIncludeTaxLabel() ?> + + escapeHtml($block->getIncludeTaxLabel()) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingIncludeTax()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingIncludeTax()) ?> displayIncludeTax()) : ?> - - getTotal()->getTitle() ?> + + escapeHtml($block->getTotal()->getTitle()) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingIncludeTax()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingIncludeTax()) ?> - + escapeHtml($block->getTotal()->getTitle()) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingExcludeTax()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingExcludeTax()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml index 2aedc85221344..5b1be558d4206 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml @@ -3,25 +3,22 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getShippingPriceExclTax(); ?> getShippingPriceInclTax(); ?> displayShippingPriceExclTax()): ?> - + displayShippingBothPrices() && $_incl != $_excl): ?> - + - + displayShippingBothPrices() && $_incl != $_excl): ?> displayShippingBothPrices() && $_incl != $_excl): ?> - + diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml index d295ba7bc7bbc..b7d6729215f94 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * @var $block \Magento\Tax\Block\Checkout\Subtotal * @see \Magento\Tax\Block\Checkout\Subtotal @@ -13,28 +11,28 @@ ?> displayBoth()):?> - - + + escapeHtml(__('Subtotal (Excl. Tax)')) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValueExclTax()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValueExclTax()) ?> - - + + escapeHtml(__('Subtotal (Incl. Tax)')) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValueInclTax()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValueInclTax()) ?> - - getTotal()->getTitle() ?> + + escapeHtml($block->getTotal()->getTitle()) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml index 50fa6c425c223..7f9a9c71604c9 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** * @var $block \Magento\Tax\Block\Checkout\Tax * @see \Magento\Tax\Block\Checkout\Tax @@ -24,16 +22,16 @@ } ?> -> - +> + helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?> - getTotal()->getTitle() ?> + escapeHtml($block->getTotal()->getTitle()) ?> - getTotal()->getTitle() ?> + escapeHtml($block->getTotal()->getTitle()) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($_value) ?> + + helper('Magento\Checkout\Helper\Data')->formatPrice($_value) ?> @@ -48,17 +46,17 @@ - - + + escapeHtml($rate['title']) ?> (%) - - helper('Magento\Checkout\Helper\Data')->formatPrice($amount) ?> + helper('Magento\Checkout\Helper\Data')->formatPrice($amount) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml b/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml index bd6841268d509..88088ed5b503d 100644 --- a/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getOrder(); displayPriceExclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - formatPrice($_item->getRowTotal()) ?> + formatPrice($_item->getRowTotal()) ?> displayPriceInclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> -
: +
escapeHtml(__('Incl. Tax')) ?>: helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> - formatPrice($_incl) ?> + formatPrice($_incl) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml b/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml index 856909cbb4240..a667e3b48bfae 100644 --- a/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** @var $block \Magento\Tax\Block\Item\Price\Renderer */ $_item = $block->getItem(); @@ -13,7 +11,7 @@ $_item = $block->getItem(); displayPriceInclTax() || $block->displayBothPrices()) && !$_item->getNoSubtotal()): ?> - formatPrice($_item->getRowTotalInclTax()) ?> + formatPrice($_item->getRowTotalInclTax()) ?> @@ -21,7 +19,7 @@ $_item = $block->getItem(); displayPriceExclTax() || $block->displayBothPrices()) && !$_item->getNoSubtotal()): ?> - formatPrice($_item->getRowTotal()) ?> + formatPrice($_item->getRowTotal()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/item/price/total_after_discount.phtml b/app/code/Magento/Tax/view/frontend/templates/item/price/total_after_discount.phtml index f0066d9024139..3356c2514c20f 100644 --- a/app/code/Magento/Tax/view/frontend/templates/item/price/total_after_discount.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/item/price/total_after_discount.phtml @@ -4,10 +4,8 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** @var \Magento\Tax\Block\Item\Price\Renderer $block */ $_item = $block->getItem(); ?> getItem()->getOrderItem()->getOrder() ?> -formatPrice($block->getTotalAmount($_item)) ?> +formatPrice($block->getTotalAmount($_item)) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml b/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml index 5fd1fed49c33c..9b6aedab15267 100644 --- a/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - /** @var $block \Magento\Tax\Block\Item\Price\Renderer */ $_item = $block->getItem(); @@ -15,7 +13,7 @@ $_item = $block->getItem(); getPriceInclTax(); ?> - formatPrice($_incl) ?> + formatPrice($_incl) ?> @@ -23,7 +21,7 @@ $_item = $block->getItem(); displayPriceExclTax() || $block->displayBothPrices()): ?> - formatPrice($block->getItemDisplayPriceExclTax()) ?> + formatPrice($block->getItemDisplayPriceExclTax()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml index b329f00973b5a..e1965905556ab 100644 --- a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getOrder(); @@ -22,16 +19,16 @@ $baseAmount = $info['base_tax_amount']; $title = $info['title']; ?> - - getLabelProperties() ?>> + + getLabelProperties() ?>> escapeHtml($title) ?> (%)
- getValueProperties() ?> rowspan="1"> - formatPrice($amount) ?> + getValueProperties() ?> rowspan="1"> + formatPrice($amount) ?> @@ -44,14 +41,14 @@ - getLabelProperties() ?> scope="row"> + getLabelProperties() ?> scope="row"> displayFullSummary()): ?> -
+
escapeHtml(__('Tax')) ?>
- + escapeHtml(__('Tax')) ?> - getValueProperties() ?> data-th="escapeHtml(__('Tax')) ?>"> - formatPrice($_source->getTaxAmount()) ?> + getValueProperties() ?> data-th="escapeHtml(__('Tax')) ?>"> + formatPrice($_source->getTaxAmount()) ?> diff --git a/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml b/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml index ea35eff438c0d..6e968a47306c8 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayBothPrices() || $block->displayPriceExclTax()): ?>
displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: getRowPriceExclTaxHtml() ?> @@ -28,14 +25,14 @@ $_item = $block->getItem(); displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : displayPrices($tax['base_row_amount'], $tax['row_amount']) ?> + escapeHtml($tax['title']) ?>: displayPrices($tax['base_row_amount'], $tax['row_amount']) ?> displayFinalPrice()): ?>
- :
+ escapeHtml(__('Total')) ?>:
getFinalRowPriceExclTaxHtml() ?>
@@ -45,7 +42,7 @@ $_item = $block->getItem(); displayBothPrices() || $block->displayPriceInclTax()): ?>
displayBothPrices()): ?> - : + escapeHtml(__('Incl. Tax')) ?>: getRowPriceInclTaxHtml() ?> @@ -54,14 +51,14 @@ $_item = $block->getItem(); displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']) ?> + escapeHtml($tax['title']) ?>: displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']) ?> displayFinalPrice()): ?>
- :
+ escapeHtml(__('Total')) ?>:
getFinalRowPriceInclTaxHtml() ?>
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/items/price/total.phtml b/app/code/Magento/Weee/view/adminhtml/templates/items/price/total.phtml index fa55009fb5b6f..b0f29e2f03def 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/items/price/total.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/items/price/total.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); ?> -displayPrices($block->getBaseTotalAmount($_item), $block->getTotalAmount($_item)) ?> +displayPrices($block->getBaseTotalAmount($_item), $block->getTotalAmount($_item)) ?> diff --git a/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml b/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml index 13eca4afd2e8e..7802028860502 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayBothPrices() || $block->displayPriceExclTax()): ?>
displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: getUnitPriceExclTaxHtml() ?> @@ -29,14 +26,14 @@ $_item = $block->getItem(); displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : displayPrices($tax['base_amount'], $tax['amount']) ?> + escapeHtml($tax['title']) ?>: displayPrices($tax['base_amount'], $tax['amount']) ?> displayFinalPrice()): ?>
- :
+ escapeHtml(__('Total')) ?>:
getFinalUnitPriceExclTaxHtml() ?>
@@ -46,7 +43,7 @@ $_item = $block->getItem(); displayBothPrices() || $block->displayPriceInclTax()): ?>
displayBothPrices()): ?> - : + escapeHtml(__('Incl. Tax')) ?>: getUnitPriceInclTaxHtml() ?> @@ -55,14 +52,14 @@ $_item = $block->getItem(); displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']) ?> + escapeHtml($tax['title']) ?>: displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']) ?> displayFinalPrice()): ?>
- :
+ escapeHtml(__('Total')) ?>:
getFinalUnitPriceInclTaxHtml() ?>
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml index d9bd79e65a153..f3222ae68e79d 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayPriceExclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - formatPrice($block->getRowDisplayPriceExclTax()) ?> + formatPrice($block->getRowDisplayPriceExclTax()) ?> helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> @@ -25,15 +22,15 @@ $_item = $block->getItem(); displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'], true, true) ?>
+ escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount'], true, true) ?>
displayFinalPrice()): ?>
- :
- formatPrice($block->getFinalRowDisplayPriceExclTax()) ?> + escapeHtml(__('Total')) ?>:
+ formatPrice($block->getFinalRowDisplayPriceExclTax()) ?>
@@ -41,22 +38,22 @@ $_item = $block->getItem(); displayPriceInclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> -
: +
escapeHtml(__('Incl. Tax')) ?>: - formatPrice($block->getRowDisplayPriceInclTax()) ?> + formatPrice($block->getRowDisplayPriceInclTax()) ?> helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?>
displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'], true, true) ?>
+ escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount_incl_tax'], true, true) ?>
displayFinalPrice()): ?> - :
- formatPrice($block->getFinalRowDisplayPriceInclTax()) ?> + escapeHtml(__('Total Incl. Tax')) ?>:
+ formatPrice($block->getFinalRowDisplayPriceInclTax()) ?>
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml index bda7b807c6094..c3c8547510ee7 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayPriceExclTax() || $block->displayBothPrices()): ?> getRowDisplayPriceExclTax() - $_item->getTotalDiscountAmount(); ?> displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - formatPrice(max(0, $_rowTotalWithoutDiscount)) ?> + formatPrice(max(0, $_rowTotalWithoutDiscount)) ?> helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> @@ -27,15 +24,15 @@ $_item = $block->getItem(); displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'], true, true) ?>
+ escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount'], true, true) ?>
displayFinalPrice()): ?>
- :
- formatPrice($block->getFinalRowDisplayPriceExclTax() - $_item->getTotalDiscountAmount()) ?> + escapeHtml(__('Total')) ?>:
+ formatPrice($block->getFinalRowDisplayPriceExclTax() - $_item->getTotalDiscountAmount()) ?>
@@ -44,23 +41,23 @@ $_item = $block->getItem(); displayPriceInclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> -
: +
escapeHtml(__('Incl. Tax')) ?>: getTotalAmount($_item); ?> - formatPrice(max(0, $_incl)) ?> + formatPrice(max(0, $_incl)) ?> helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?>
displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'], true, true) ?>
+ escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount_incl_tax'], true, true) ?>
displayFinalPrice()): ?> - :
- formatPrice($block->getFinalRowDisplayPriceInclTax() - $_item->getTotalDiscountAmount()) ?> + escapeHtml(__('Total Incl. Tax')) ?>:
+ formatPrice($block->getFinalRowDisplayPriceInclTax() - $_item->getTotalDiscountAmount()) ?>
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml index d56e0fc3ebb3f..6b0cc43af95f5 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> getItem(); displayPriceExclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> - : + escapeHtml(__('Excl. Tax')) ?>: - formatPrice($block->getUnitDisplayPriceExclTax()) ?> + formatPrice($block->getUnitDisplayPriceExclTax()) ?> helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?>
displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : formatPrice($tax['amount'], true, true) ?>
+ escapeHtml($tax['title']) ?>: formatPrice($tax['amount'], true, true) ?>
displayFinalPrice()): ?>
- :
- formatPrice($block->getFinalUnitDisplayPriceExclTax()) ?> + escapeHtml(__('Total')) ?>:
+ formatPrice($block->getFinalUnitDisplayPriceExclTax()) ?>
@@ -41,23 +38,23 @@ $_item = $block->getItem(); displayPriceInclTax() || $block->displayBothPrices()): ?> displayBothPrices()): ?> -
: +
escapeHtml(__('Incl. Tax')) ?>: - formatPrice($block->getUnitDisplayPriceInclTax()) ?> + formatPrice($block->getUnitDisplayPriceInclTax()) ?> helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?>
displayPriceWithWeeeDetails()): ?> helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'], true, true) ?>
+ escapeHtml($tax['title']) ?>: formatPrice($tax['amount_incl_tax'], true, true) ?>
displayFinalPrice()): ?> - :
- formatPrice($block->getFinalUnitDisplayPriceInclTax()) ?> + escapeHtml(__('Total Incl. Tax')) ?>:
+ formatPrice($block->getFinalUnitDisplayPriceInclTax()) ?>
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml index 01ecaca435d15..f3b02fba936a3 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml @@ -3,9 +3,6 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - ?> [
- +
- - - - + + + + @@ -44,41 +41,41 @@ $data = ['fptAttribute' => [ Hidden field below with attribute code id is necessary for jQuery validation plugin. Validation message will be displayed after this field. --> - + + }); + diff --git a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml index c49cd989ddd88..3eba15da887a4 100644 --- a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml @@ -7,7 +7,7 @@ -displayBothPrices()): ?> +displayBothPrices()) : ?> -displayPriceIncludingTax()): ?> +displayPriceIncludingTax()) : ?> getDisplayAmount() ?> -displayPriceExcludingTax()): ?> +displayPriceExcludingTax()) : ?> getDisplayAmountExclTax() ?> -displayBothPrices()): ?> +displayBothPrices()) : ?> getDisplayAmount() ?> - getDisplayAmountExclTax() !== $block->getDisplayAmount()): ?> + getDisplayAmountExclTax() !== $block->getDisplayAmount()) : ?> (+getDisplayAmountExclTax() ?> escapeHtml(__('Excl. Tax'))?>) diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml index a4181e7918b40..74db5c24aecd0 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/cart/item/price/sidebar.phtml @@ -4,17 +4,19 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** @var $block \Magento\Tax\Block\Item\Price\Renderer */ ?> getItem() ?> - displayPriceInclTax() || $block->displayBothPrices()): ?> + displayPriceInclTax() || $block->displayBothPrices()) : ?> getPriceInclTax(); ?> - helper('Magento\Checkout\Helper\Data')->formatPrice($_incl) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($_incl) ?> - displayPriceExclTax() || $block->displayBothPrices()): ?> + displayPriceExclTax() || $block->displayBothPrices()) : ?> - helper('Magento\Checkout\Helper\Data')->formatPrice($_item->getCalculationPrice()) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($_item->getCalculationPrice()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml index 3106ef4f4693b..94814c5156610 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml @@ -4,39 +4,41 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** * @var $block \Magento\Tax\Block\Checkout\Grandtotal */ ?> -includeTax() && $block->getTotalExclTax() >= 0):?> -escapeHtmlAttr($block->getStyle()); - $colspan = (int)$block->getColspan(); -?> - - - - -renderTotals('taxes', $colspan) ?> - - - - - - - - - +includeTax() && $block->getTotalExclTax() >= 0) : ?> + escapeHtmlAttr($block->getStyle()); + $colspan = (int)$block->getColspan(); + ?> + + + + + renderTotals('taxes', $colspan) ?> + + + + + + + + + diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml index b0cdec6d4643a..ffbb33487136d 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml @@ -4,23 +4,25 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** * @var $block \Magento\Tax\Block\Checkout\Shipping * @see \Magento\Tax\Block\Checkout\Shipping */ ?> -displayShipping()):?> -escapeHtmlAttr($block->getStyle()); - $colspan = (int)$block->getColspan(); -?> - displayBoth()):?> +displayShipping()) : ?> + escapeHtmlAttr($block->getStyle()); + $colspan = (int)$block->getColspan(); + ?> + displayBoth()) : ?> @@ -28,7 +30,7 @@ escapeHtml($block->getIncludeTaxLabel()) ?> displayIncludeTax()) : ?> @@ -37,16 +39,16 @@ escapeHtml($block->getTotal()->getTitle()) ?> - + diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml index af9cf4cf6db45..6c91f8cec2dce 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping/price.phtml @@ -8,17 +8,17 @@ getShippingPriceExclTax(); ?> getShippingPriceInclTax(); ?> -displayShippingPriceExclTax()): ?> +displayShippingPriceExclTax()) : ?> - -displayShippingBothPrices() && $_incl != $_excl): ?> - - + + displayShippingBothPrices() && $_incl != $_excl) : ?> + + -displayShippingBothPrices() && $_incl != $_excl): ?> - - + displayShippingBothPrices() && $_incl != $_excl) : ?> + + -displayShippingBothPrices() && $_incl != $_excl): ?> +displayShippingBothPrices() && $_incl != $_excl) : ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml index 1e25ff1aec6a6..1dd3570f1c6f2 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml @@ -4,22 +4,24 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** * @var $block \Magento\Tax\Block\Checkout\Subtotal * @see \Magento\Tax\Block\Checkout\Subtotal */ ?> -displayBoth()) :?> -escapeHtmlAttr($block->getStyle()); - $colspan = (int)$block->getColspan(); -?> +displayBoth()) : ?> + escapeHtmlAttr($block->getStyle()); + $colspan = (int)$block->getColspan(); + ?> @@ -27,7 +29,7 @@ escapeHtml(__('Subtotal (Incl. Tax)')) ?> @@ -36,7 +38,7 @@ escapeHtml($block->getTotal()->getTitle()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml index 88d083cf0a563..01dbeb68a0344 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml @@ -4,6 +4,8 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** * @var $block \Magento\Tax\Block\Checkout\Tax * @see \Magento\Tax\Block\Checkout\Tax @@ -12,51 +14,47 @@ getTotal()->getValue(); $_style = $block->escapeHtmlAttr($block->getTotal()->getStyle()); -?> - -helper('Magento\Tax\Helper\Data')->displayFullSummary() && $_value != 0) { - $attributes = 'class="totals-tax-summary" data-mage-init=\'{"toggleAdvanced": {"selectorsToggleClass": "shown", "baseToggleClass": "expanded", "toggleContainers": ".totals-tax-details"}}\''; - } + +if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_value != 0) { + $attributes = 'class="totals-tax-summary" data-mage-init=\'{"toggleAdvanced": {"selectorsToggleClass": "shown", "baseToggleClass": "expanded", "toggleContainers": ".totals-tax-details"}}\''; +} ?> > -helper('Magento\Tax\Helper\Data')->displayFullSummary() && $_value != 0): ?> - getTotal()->getFullInfo() as $info): ?> - +helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_value != 0) : ?> + getTotal()->getFullInfo() as $info) : ?> + - - + + - + diff --git a/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml b/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml index 88088ed5b503d..991fbf9c5c81f 100644 --- a/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/email/items/price/row.phtml @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> getItem(); $_order = $_item->getOrder(); ?> -displayPriceExclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?> escapeHtml(__('Excl. Tax')) ?>:formatPrice($_item->getRowTotal()) ?> -displayPriceInclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceInclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?>
escapeHtml(__('Incl. Tax')) ?>: - helper('Magento\Checkout\Helper\Data')->getSubtotalInclTax($_item); ?> + helper(\Magento\Checkout\Helper\Data::class)->getSubtotalInclTax($_item); ?> formatPrice($_incl) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml b/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml index f9444d025d56a..12aa494f74e7a 100644 --- a/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/item/price/row.phtml @@ -8,7 +8,7 @@ $_item = $block->getItem(); ?> -displayPriceInclTax() || $block->displayBothPrices()) && !$_item->getNoSubtotal()): ?> +displayPriceInclTax() || $block->displayBothPrices()) && !$_item->getNoSubtotal()) : ?> formatPrice($_item->getRowTotalInclTax()) ?> @@ -16,7 +16,7 @@ $_item = $block->getItem(); -displayPriceExclTax() || $block->displayBothPrices()) && !$_item->getNoSubtotal()): ?> +displayPriceExclTax() || $block->displayBothPrices()) && !$_item->getNoSubtotal()) : ?> formatPrice($_item->getRowTotal()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml b/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml index e672ad64ba874..e5fd756e2f373 100644 --- a/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/item/price/unit.phtml @@ -8,7 +8,7 @@ $_item = $block->getItem(); ?> -displayPriceInclTax() || $block->displayBothPrices()): ?> +displayPriceInclTax() || $block->displayBothPrices()) : ?> getPriceInclTax(); ?> @@ -17,7 +17,7 @@ $_item = $block->getItem(); -displayPriceExclTax() || $block->displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> formatPrice($block->getItemDisplayPriceExclTax()) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml index da3f7a9f9134c..d1346b499975c 100644 --- a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml @@ -3,26 +3,27 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> getOrder(); $_source = $block->getSource(); - $_fullInfo = $this->helper('Magento\Tax\Helper\Data')->getCalculatedTaxes($_source); - global $taxIter; $taxIter++; + $_fullInfo = $this->helper(\Magento\Tax\Helper\Data::class)->getCalculatedTaxes($_source); ?> -displayFullSummary()): ?> - +displayFullSummary()) : ?> + - + -displayFullSummary() && $_fullInfo && $block->getIsPlaneMode()): ?> +displayFullSummary() && $_fullInfo && $block->getIsPlaneMode()) : ?> - + diff --git a/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml b/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml index 6e968a47306c8..0d8365ff4bd85 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/items/price/row.phtml @@ -3,34 +3,36 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> helper('Magento\Weee\Helper\Data'); +$_weeeHelper = $this->helper(\Magento\Weee\Helper\Data::class); $_item = $block->getItem(); ?> -displayBothPrices() || $block->displayPriceExclTax()): ?> +displayBothPrices() || $block->displayPriceExclTax()) : ?>
- displayBothPrices()): ?> + displayBothPrices()) : ?> escapeHtml(__('Excl. Tax')) ?>: getRowPriceExclTaxHtml() ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> - displayPriceWithWeeeDetails()): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: displayPrices($tax['base_row_amount'], $tax['row_amount']) ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?>
escapeHtml(__('Total')) ?>:
getFinalRowPriceExclTaxHtml() ?> @@ -39,24 +41,24 @@ $_item = $block->getItem();
-displayBothPrices() || $block->displayPriceInclTax()): ?> +displayBothPrices() || $block->displayPriceInclTax()) : ?>
- displayBothPrices()): ?> + displayBothPrices()) : ?> escapeHtml(__('Incl. Tax')) ?>: getRowPriceInclTaxHtml() ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']) ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?>
escapeHtml(__('Total')) ?>:
getFinalRowPriceInclTaxHtml() ?> diff --git a/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml b/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml index 7802028860502..8dbaff2e2a6b1 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/items/price/unit.phtml @@ -3,35 +3,37 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> helper('Magento\Weee\Helper\Data'); +$_weeeHelper = $this->helper(\Magento\Weee\Helper\Data::class); $_item = $block->getItem(); ?> -displayBothPrices() || $block->displayPriceExclTax()): ?> +displayBothPrices() || $block->displayPriceExclTax()) : ?>
- displayBothPrices()): ?> + displayBothPrices()) : ?> escapeHtml(__('Excl. Tax')) ?>: getUnitPriceExclTaxHtml() ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: displayPrices($tax['base_amount'], $tax['amount']) ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?>
escapeHtml(__('Total')) ?>:
getFinalUnitPriceExclTaxHtml() ?> @@ -40,24 +42,24 @@ $_item = $block->getItem();
-displayBothPrices() || $block->displayPriceInclTax()): ?> +displayBothPrices() || $block->displayPriceInclTax()) : ?>
- displayBothPrices()): ?> + displayBothPrices()) : ?> escapeHtml(__('Incl. Tax')) ?>: getUnitPriceInclTaxHtml() ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']) ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?>
escapeHtml(__('Total')) ?>:
getFinalUnitPriceInclTaxHtml() ?> diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml index f3222ae68e79d..769e9e68e3a46 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/row.phtml @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> getItem(); ?> -displayPriceExclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?> escapeHtml(__('Excl. Tax')) ?>: formatPrice($block->getRowDisplayPriceExclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount'], true, true) ?>
- displayFinalPrice()): ?> + displayFinalPrice()) : ?>
escapeHtml(__('Total')) ?>:
formatPrice($block->getFinalRowDisplayPriceExclTax()) ?> @@ -36,22 +38,22 @@ $_item = $block->getItem(); -displayPriceInclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceInclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?>
escapeHtml(__('Incl. Tax')) ?>: formatPrice($block->getRowDisplayPriceInclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount_incl_tax'], true, true) ?>
- displayFinalPrice()): ?> + displayFinalPrice()) : ?> escapeHtml(__('Total Incl. Tax')) ?>:
formatPrice($block->getFinalRowDisplayPriceInclTax()) ?>
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml index c3c8547510ee7..fceca17acf61e 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/total.phtml @@ -3,33 +3,34 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> helper('Magento\Weee\Helper\Data'); +$_weeeHelper = $this->helper(\Magento\Weee\Helper\Data::class); $_item = $block->getItem(); ?> -displayPriceExclTax() || $block->displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> getRowDisplayPriceExclTax() - $_item->getTotalDiscountAmount(); ?> - displayBothPrices()): ?> + displayBothPrices()) : ?> escapeHtml(__('Excl. Tax')) ?>: formatPrice(max(0, $_rowTotalWithoutDiscount)) ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount'], true, true) ?>
- displayFinalPrice()): ?> + displayFinalPrice()) : ?>
escapeHtml(__('Total')) ?>:
formatPrice($block->getFinalRowDisplayPriceExclTax() - $_item->getTotalDiscountAmount()) ?> @@ -39,23 +40,23 @@ $_item = $block->getItem(); -displayPriceInclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceInclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?>
escapeHtml(__('Incl. Tax')) ?>: getTotalAmount($_item); ?> formatPrice(max(0, $_incl)) ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount_incl_tax'], true, true) ?>
- displayFinalPrice()): ?> + displayFinalPrice()) : ?> escapeHtml(__('Total Incl. Tax')) ?>:
formatPrice($block->getFinalRowDisplayPriceInclTax() - $_item->getTotalDiscountAmount()) ?>
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml index 6b0cc43af95f5..362c88ecedd4b 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/order/create/items/price/unit.phtml @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> getItem(); ?> -displayPriceExclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?> escapeHtml(__('Excl. Tax')) ?>: formatPrice($block->getUnitDisplayPriceExclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: formatPrice($tax['amount'], true, true) ?>
- displayFinalPrice()): ?> + displayFinalPrice()) : ?>
escapeHtml(__('Total')) ?>:
formatPrice($block->getFinalUnitDisplayPriceExclTax()) ?> @@ -36,23 +38,23 @@ $_item = $block->getItem(); -displayPriceInclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceInclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?>
escapeHtml(__('Incl. Tax')) ?>: formatPrice($block->getUnitDisplayPriceInclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: formatPrice($tax['amount_incl_tax'], true, true) ?>
- displayFinalPrice()): ?> + displayFinalPrice()) : ?> escapeHtml(__('Total Incl. Tax')) ?>:
formatPrice($block->getFinalUnitDisplayPriceInclTax()) ?>
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml index 097cbc8d36b9b..1b77231640868 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml @@ -3,12 +3,14 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> [ - 'region' => $this->helper('Magento\Framework\Json\Helper\Data')->jsonDecode( - $this->helper('Magento\Directory\Helper\Data')->getRegionJson() + 'region' => $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonDecode( + $this->helper(\Magento\Directory\Helper\Data::class)->getRegionJson() ), 'itemsData' => $block->getValues(), 'bundlePriceType' => '#price_type', @@ -16,14 +18,14 @@ $data = ['fptAttribute' => [ ?>
+ data-mage-init="helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($data) ?>">
isMultiWebsites()): ?>style="display: none;">isMultiWebsites()): ?>style="display: none;">escapeHtml(__('Website')) ?>escapeHtml(__('Country/State')) ?>escapeHtml(__('Tax')) ?>escapeHtml(__('Action')) ?>
- escapeHtml(__('Grand Total Excl. Tax')) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotalExclTax()) ?> -
- escapeHtml(__('Grand Total Incl. Tax')) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> -
- escapeHtml($block->getTotal()->getTitle()) ?> - - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> -
+ escapeHtml(__('Grand Total Excl. Tax')) ?> + + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotalExclTax()) ?> +
+ escapeHtml(__('Grand Total Incl. Tax')) ?> + + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?> +
+ escapeHtml($block->getTotal()->getTitle()) ?> + + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?> +
escapeHtml($block->getExcludeTaxLabel()) ?> - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingExcludeTax()) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingExcludeTax()) ?>
- helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingIncludeTax()) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingIncludeTax()) ?>
- helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingIncludeTax()) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingIncludeTax()) ?>
escapeHtml($block->getTotal()->getTitle()) ?> - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getShippingExcludeTax()) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingExcludeTax()) ?>
escapeHtml(__('Subtotal (Excl. Tax)')) ?> - helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValueExclTax()) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValueExclTax()) ?>
- helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValueInclTax()) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValueInclTax()) ?>
- helper('Magento\Checkout\Helper\Data')->formatPrice($block->getTotal()->getValue()) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?>
- helper('Magento\Tax\Helper\Data')->displayFullSummary()): ?> + helper(\Magento\Tax\Helper\Data::class)->displayFullSummary()) : ?> escapeHtml($block->getTotal()->getTitle()) ?> - + escapeHtml($block->getTotal()->getTitle()) ?> - helper('Magento\Checkout\Helper\Data')->formatPrice($_value) ?> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($_value) ?>
escapeHtml($rate['title']) ?> - + (%) - helper('Magento\Checkout\Helper\Data')->formatPrice($amount) ?> + data-th="escapeHtmlAttr($rate['title']) ?>(%)"> + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($amount) ?>
getLabelProperties() ?>> escapeHtml($title) ?> - + (%)
@@ -34,17 +35,17 @@ -displayFullSummary() && $_fullInfo && !$block->getIsPlaneMode()): ?> +displayFullSummary() && $_fullInfo && !$block->getIsPlaneMode()) : ?>
getLabelProperties() ?> scope="row"> - displayFullSummary()): ?> + displayFullSummary()) : ?>
escapeHtml(__('Tax')) ?>
- + escapeHtml(__('Tax')) ?>
- + @@ -50,12 +52,12 @@ $data = ['fptAttribute' => [ $elementClass = $block->escapeHtmlAttr($block->getElement()->getClass()); ?> - @@ -63,7 +65,7 @@ $data = ['fptAttribute' => [ diff --git a/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml b/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml index 01f003246e8f9..a2b5ad4f196e8 100644 --- a/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml +++ b/app/code/Magento/Weee/view/base/templates/pricing/adjustment.phtml @@ -15,22 +15,22 @@ $taxDisplay = $block->getTaxDisplayConfig(); $priceDisplay = $block->isPriceIncludesTax(); ?> -showInclDescr() || $block->showExclDescrIncl()): // incl. + weee || excl. + weee + final ?> - getWeeeTaxAttributes() as $weeeTaxAttribute): ?> +showInclDescr() || $block->showExclDescrIncl()) : // incl. + weee || excl. + weee + final ?> + getWeeeTaxAttributes() as $weeeTaxAttribute) : ?> escapeHtmlAttr($block->renderWeeeTaxAttributeName($weeeTaxAttribute)); ?> - + renderWeeeTaxAttributeWithTax($weeeTaxAttribute) ?> - + renderWeeeTaxAttributeWithoutTax($weeeTaxAttribute) ?> - + @@ -43,7 +43,7 @@ $priceDisplay = $block->isPriceIncludesTax(); -showExclDescrIncl()): // excl. + weee + final ?> +showExclDescrIncl()) : // excl. + weee + final ?> getItem(); @@ -13,27 +15,27 @@ $originalZone = $block->getZone(); $block->setZone(\Magento\Framework\Pricing\Render::ZONE_CART); ?> -displayPriceInclTax() || $block->displayBothPrices()): ?> +displayPriceInclTax() || $block->displayBothPrices()) : ?> - displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getUnitDisplayPriceInclTax()) ?> - displayPriceWithWeeeDetails()): ?> - helper('Magento\Weee\Helper\Data')->getApplied($item)): ?> + displayPriceWithWeeeDetails()) : ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($item) as $tax) : ?> formatPrice($tax['amount_incl_tax'], true, true) ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> formatPrice($block->getFinalUnitDisplayPriceInclTax()) ?> @@ -45,27 +47,27 @@ $block->setZone(\Magento\Framework\Pricing\Render::ZONE_CART); -displayPriceExclTax() || $block->displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> - displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getUnitDisplayPriceExclTax()) ?> - displayPriceWithWeeeDetails()): ?> - helper('Magento\Weee\Helper\Data')->getApplied($item)): ?> + displayPriceWithWeeeDetails()) : ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($item) as $tax) : ?> formatPrice($tax['amount'], true, true) ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> formatPrice($block->getFinalUnitDisplayPriceExclTax()) ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml index ad98039519cea..e1f4207f3740c 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml @@ -4,28 +4,30 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** @var $block \Magento\Weee\Block\Item\Price\Renderer */ $_item = $block->getItem(); ?> -displayPriceWithWeeeDetails()): ?> +displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getRowDisplayPriceExclTax()) ?> -helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> +helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> formatPrice($block->getFinalRowDisplayPriceExclTax()) ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml index e0513f522a770..1189c1b9ba2fb 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml @@ -4,31 +4,33 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** @var $block \Magento\Weee\Block\Item\Price\Renderer */ $_item = $block->getItem(); /** @var $_weeeHelper \Magento\Weee\Helper\Data */ -$_weeeHelper = $this->helper('Magento\Weee\Helper\Data'); +$_weeeHelper = $this->helper(\Magento\Weee\Helper\Data::class); ?> getRowTotalInclTax(); ?> -displayPriceWithWeeeDetails()): ?> +displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getRowDisplayPriceInclTax()) ?> -helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> +helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> formatPrice($block->getFinalRowDisplayPriceInclTax()) ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml index cf2693842b8d3..809d8ac90e12e 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml @@ -4,29 +4,30 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** @var $block \Magento\Weee\Block\Item\Price\Renderer */ $_item = $block->getItem(); ?> -displayPriceWithWeeeDetails()): ?> +displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getUnitDisplayPriceExclTax()) ?> - -helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> +helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> formatPrice($block->getFinalUnitDisplayPriceExclTax()) ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml index b4389dea160c3..81ec8c1c6795b 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml @@ -4,32 +4,34 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** @var $block \Magento\Weee\Block\Item\Price\Renderer */ $_item = $block->getItem(); /** @var $_weeeHelper \Magento\Weee\Helper\Data */ -$_weeeHelper = $this->helper('Magento\Weee\Helper\Data'); +$_weeeHelper = $this->helper(\Magento\Weee\Helper\Data::class); ?> getPriceInclTax(); ?> -displayPriceWithWeeeDetails()): ?> +displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getUnitDisplayPriceInclTax()) ?> -helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> +helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> formatPrice($block->getFinalUnitDisplayPriceInclTax()) ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/email/items/price/row.phtml b/app/code/Magento/Weee/view/frontend/templates/email/items/price/row.phtml index 0b3b4b7ca5c1d..edcf73d2f9577 100644 --- a/app/code/Magento/Weee/view/frontend/templates/email/items/price/row.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/email/items/price/row.phtml @@ -3,35 +3,37 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +// phpcs:disable Magento2.Templates.ThisInTemplate ?> helper('Magento\Weee\Helper\Data'); +$_weeeHelper = $this->helper(\Magento\Weee\Helper\Data::class); $_item = $block->getItem(); /** @var \Magento\Sales\Model\Order $_order */ $_order = $_item->getOrder(); ?> -displayPriceExclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?> escapeHtml(__('Excl. Tax')) ?>: formatPrice($block->getRowDisplayPriceExclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount'], true, true) ?>
- displayFinalPrice()): ?> + displayFinalPrice()) : ?>
escapeHtml(__('Total')) ?>:
formatPrice($block->getFinalRowDisplayPriceExclTax()) ?>
@@ -39,22 +41,22 @@ $_order = $_item->getOrder(); -displayPriceInclTax() || $block->displayBothPrices()): ?> - displayBothPrices()): ?> +displayPriceInclTax() || $block->displayBothPrices()) : ?> + displayBothPrices()) : ?>
escapeHtml(__('Incl. Tax')) ?>: formatPrice($block->getRowDisplayPriceInclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
- displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - helper('Magento\Weee\Helper\Data')->getApplied($_item) as $tax): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?> escapeHtml($tax['title']) ?>: formatPrice($tax['row_amount_incl_tax'], true, true) ?>
- displayFinalPrice()): ?> + displayFinalPrice()) : ?> escapeHtml(__('Total Incl. Tax')) ?>:
formatPrice($block->getFinalRowDisplayPriceInclTax()) ?>
diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml index c78cb30dd9d56..afecc8be030a4 100644 --- a/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml @@ -4,31 +4,33 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** @var $block \Magento\Weee\Block\Item\Price\Renderer */ $item = $block->getItem(); ?> -displayPriceInclTax() || $block->displayBothPrices()) && !$item->getNoSubtotal()): ?> +displayPriceInclTax() || $block->displayBothPrices()) && !$item->getNoSubtotal()) : ?> - displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getRowDisplayPriceInclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> @@ -40,28 +42,28 @@ $item = $block->getItem(); -displayPriceExclTax() || $block->displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> - displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getRowDisplayPriceExclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml index 5b50c82255b3a..8c52144aeb7eb 100644 --- a/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml @@ -4,31 +4,33 @@ * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate + /** @var $block \Magento\Weee\Block\Item\Price\Renderer */ $item = $block->getItem(); ?> -displayPriceInclTax() || $block->displayBothPrices()): ?> +displayPriceInclTax() || $block->displayBothPrices()) : ?> - displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getUnitDisplayPriceInclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> @@ -40,28 +42,28 @@ $item = $block->getItem(); -displayPriceExclTax() || $block->displayBothPrices()): ?> +displayPriceExclTax() || $block->displayBothPrices()) : ?> - displayPriceWithWeeeDetails()): ?> + displayPriceWithWeeeDetails()) : ?> - + formatPrice($block->getUnitDisplayPriceExclTax()) ?> - helper('Magento\Weee\Helper\Data')->getApplied($item)): ?> + helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?> - displayFinalPrice()): ?> + displayFinalPrice()) : ?> From c62c3c8778f20f355c0ebcf2b2266979f088f6f7 Mon Sep 17 00:00:00 2001 From: Ievgen Kolesov Date: Wed, 15 May 2019 17:11:53 -0500 Subject: [PATCH 05/10] MAGETWO-99488: Eliminate @escapeNotVerified in Tax-related Modules --- .../Tax/view/frontend/templates/checkout/grandtotal.phtml | 8 ++++---- .../Tax/view/frontend/templates/checkout/subtotal.phtml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml index 94814c5156610..ee8ae505aa9e5 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml @@ -10,11 +10,11 @@ * @var $block \Magento\Tax\Block\Checkout\Grandtotal */ ?> +escapeHtmlAttr($block->getStyle()); +$colspan = (int)$block->getColspan(); +?> includeTax() && $block->getTotalExclTax() >= 0) : ?> - escapeHtmlAttr($block->getStyle()); - $colspan = (int)$block->getColspan(); - ?>
@@ -41,4 +41,4 @@ $colspan = (int)$block->getColspan(); helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?> - + diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml index ffbb33487136d..3f5a55e5fa325 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml @@ -14,7 +14,7 @@ displayShipping()) : ?> escapeHtmlAttr($block->getStyle()); - $colspan = (int)$block->getColspan(); + $colspan = (int) $block->getColspan(); ?> displayBoth()) : ?> @@ -42,7 +42,7 @@ helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingIncludeTax()) ?> - + - + diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml index 914e5bda9abc6..010a7b8dcfe4a 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml @@ -13,7 +13,7 @@ ?> escapeHtmlAttr($block->getStyle()); -$colspan = (int)$block->getColspan(); +$colspan = (int) $block->getColspan(); ?> displayBoth()) : ?> @@ -41,4 +41,4 @@ $colspan = (int)$block->getColspan(); helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?> - + diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml index 01dbeb68a0344..0329db406fa16 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml @@ -23,12 +23,12 @@ if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_va ?> > - - @@ -61,4 +61,4 @@ if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_va - + diff --git a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml index d1346b499975c..5e6f4e5277a30 100644 --- a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml @@ -24,7 +24,7 @@ @@ -33,7 +33,7 @@ - +displayFullSummary() && $_fullInfo && !$block->getIsPlaneMode()) : ?> @@ -47,7 +47,7 @@
escapeHtml(__('Tax')) ?>
escapeHtml(__('Tax')) ?> - + +
isMultiWebsites()): ?>style="display: none;">escapeHtml(__('Website')) ?>isMultiWebsites()) : ?>style="display: none;">escapeHtml(__('Website')) ?> escapeHtml(__('Country/State')) ?> escapeHtml(__('Tax')) ?> escapeHtml(__('Action')) ?>
isMultiWebsites()): ?>style="display: none"> + isMultiWebsites()) : ?>style="display: none">
escapeHtml(__('Grand Total Excl. Tax')) ?> diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml index 1dd3570f1c6f2..914e5bda9abc6 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml @@ -11,11 +11,11 @@ * @see \Magento\Tax\Block\Checkout\Subtotal */ ?> +escapeHtmlAttr($block->getStyle()); +$colspan = (int)$block->getColspan(); +?> displayBoth()) : ?> - escapeHtmlAttr($block->getStyle()); - $colspan = (int)$block->getColspan(); - ?>
escapeHtml(__('Subtotal (Excl. Tax)')) ?> From f2446ba5382fb44b5ca35a1dd75e4470189c9dd2 Mon Sep 17 00:00:00 2001 From: Ievgen Kolesov Date: Thu, 16 May 2019 16:51:18 -0500 Subject: [PATCH 06/10] MAGETWO-99488: Eliminate @escapeNotVerified in Tax-related Modules --- .../Magento/Tax/view/base/templates/pricing/adjustment.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml index 3eba15da887a4..e87d1c9eb96aa 100644 --- a/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment.phtml @@ -8,7 +8,7 @@ displayBothPrices()) : ?> - Date: Mon, 20 May 2019 14:49:06 -0500 Subject: [PATCH 07/10] MAGETWO-99488: Eliminate @escapeNotVerified in Tax-related Modules --- .../view/adminhtml/templates/items/price/row.phtml | 2 +- .../Tax/view/adminhtml/templates/rate/title.phtml | 4 ++-- .../Tax/view/adminhtml/templates/rule/edit.phtml | 2 +- .../view/adminhtml/templates/toolbar/rate/save.phtml | 2 +- .../base/templates/pricing/adjustment/bundle.phtml | 2 +- .../frontend/templates/checkout/grandtotal.phtml | 4 ++-- .../view/frontend/templates/checkout/shipping.phtml | 6 +++--- .../view/frontend/templates/checkout/subtotal.phtml | 4 ++-- .../Tax/view/frontend/templates/checkout/tax.phtml | 12 ++++++------ .../Tax/view/frontend/templates/order/tax.phtml | 6 +++--- .../onepage/review/item/price/row_excl_tax.phtml | 6 +++--- .../onepage/review/item/price/row_incl_tax.phtml | 6 +++--- .../onepage/review/item/price/unit_excl_tax.phtml | 6 +++--- .../onepage/review/item/price/unit_incl_tax.phtml | 6 +++--- .../view/frontend/templates/item/price/row.phtml | 12 ++++++------ .../view/frontend/templates/item/price/unit.phtml | 12 ++++++------ 16 files changed, 46 insertions(+), 46 deletions(-) diff --git a/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml b/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml index e6de067a4de64..4d680dc072e52 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/items/price/row.phtml @@ -22,7 +22,7 @@ $_item = $block->getItem(); displayBothPrices() || $block->displayPriceInclTax()) : ?>
displayBothPrices()) : ?> - escapeHtml(('Incl. Tax')) ?>: + escapeHtml(__('Incl. Tax')) ?>: helper(\Magento\Checkout\Helper\Data::class)->getSubtotalInclTax($_item); ?> helper(\Magento\Checkout\Helper\Data::class)->getBaseSubtotalInclTax($_item); ?> diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml index 3d6d3d19dc314..7dd6f6cee8c63 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/title.phtml @@ -15,8 +15,8 @@ + name="title[getId() ?>]" + value="escapeHtmlAttr($_labels[(int) $_store->getId()]) ?>" />
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml index 1ad16feef9690..81bdd874ead6c 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml @@ -113,7 +113,7 @@ require([ toggleAddButton:false, addText: 'escapeJs($block->escapeHtml(__('Add New Tax Rate'))) ?>', parse: null, - nextPageUrl: 'escapeHtml($block->getTaxRatesPageUrl())?>', + nextPageUrl: 'escapeHtml($block->getTaxRatesPageUrl()) ?>', selectedValues: this.settings.selected_values, mselectInputSubmitCallback: function (value, options) { var select = $('#tax_rate'); diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml index 5e3ef15da5482..58c79bbfe9715 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml @@ -12,7 +12,7 @@ "mage/mage" ], function($){ - $('#escapeHtml($form->getForm()->getId()) ?>').mage('form').mage('validation'); + $('#escapeJs($form->getForm()->getId()) ?>').mage('form').mage('validation'); $(document).ready(function () { 'use strict'; diff --git a/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml b/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml index 9e60dc983e3ac..41430c0fbcfa8 100644 --- a/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml +++ b/app/code/Magento/Tax/view/base/templates/pricing/adjustment/bundle.phtml @@ -13,6 +13,6 @@ displayBothPrices()) : ?> getDisplayAmount() ?> getDisplayAmountExclTax() !== $block->getDisplayAmount()) : ?> - (+getDisplayAmountExclTax() ?> escapeHtml(__('Excl. Tax'))?>) + (+getDisplayAmountExclTax() ?> escapeHtml(__('Excl. Tax')) ?>) diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml index ee8ae505aa9e5..df177b6180511 100644 --- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml +++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml @@ -12,7 +12,7 @@ ?> escapeHtmlAttr($block->getStyle()); -$colspan = (int)$block->getColspan(); +$colspan = (int) $block->getColspan(); ?> includeTax() && $block->getTotalExclTax() >= 0) : ?>
escapeHtml($block->getTotal()->getTitle()) ?> @@ -51,5 +51,5 @@ helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingExcludeTax()) ?>
+ helper(\Magento\Tax\Helper\Data::class)->displayFullSummary()) : ?> escapeHtml($block->getTotal()->getTitle()) ?> escapeHtml($block->getTotal()->getTitle()) ?> - + helper(\Magento\Checkout\Helper\Data::class)->formatPrice($_value) ?> @@ -45,15 +45,15 @@ if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_va
+ escapeHtml($rate['title']) ?> - (%) + (%) + data-th="escapeHtmlAttr($rate['title']) ?>(%)"> helper(\Magento\Checkout\Helper\Data::class)->formatPrice($amount) ?> getLabelProperties() ?>> escapeHtml($title) ?> - (%) + (%)
getValueProperties() ?> data-th="escapeHtmlAttr(__('Tax')) ?>"> formatPrice($_source->getTaxAmount()) ?> diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml index e1f4207f3740c..15abae5c889fe 100644 --- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml +++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml @@ -11,7 +11,7 @@ $_item = $block->getItem(); ?> displayPriceWithWeeeDetails()) : ?> - + @@ -19,7 +19,7 @@ $_item = $block->getItem(); helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?> -
getLabelProperties() ?>> escapeHtml($title) ?>