Skip to content

Commit 4fbb799

Browse files
committed
MAGETWO-31559: [TD] Removing NominalItems usage
1 parent 1be6ca1 commit 4fbb799

File tree

56 files changed

+86
-1126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+86
-1126
lines changed

app/code/Magento/Checkout/Block/Total/Nominal.php

Lines changed: 0 additions & 140 deletions
This file was deleted.

app/code/Magento/Checkout/etc/sales.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/code/Magento/Checkout/view/frontend/templates/total/nominal.phtml

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/code/Magento/Multishipping/Helper/Data.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public function isMultishippingCheckoutAvailable()
8686
true
8787
) &&
8888
$quote->getItemsSummaryQty() - $quote->getItemVirtualQty() > 0 &&
89-
$quote->getItemsSummaryQty() <= $this->getMaximumQty() &&
90-
!$quote->hasNominalItems();
89+
$quote->getItemsSummaryQty() <= $this->getMaximumQty();
9190
}
9291
}

app/code/Magento/Payment/Model/Cart/SalesModel/Quote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getAllItems()
4949
'parent_item' => $item->getParentItem(),
5050
'name' => $item->getName(),
5151
'qty' => (int)$item->getTotalQty(),
52-
'price' => $item->isNominal() ? 0 : (double)$item->getBaseCalculationPrice(),
52+
'price' => (double)$item->getBaseCalculationPrice(),
5353
'original_item' => $item,
5454
]
5555
);

app/code/Magento/Paypal/Helper/Shortcut/CheckoutValidator.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ public function isQuoteSummaryValid($isInCatalog)
8181
{
8282
$quote = $isInCatalog ? null : $this->_checkoutSession->getQuote();
8383
// validate minimum quote amount and validate quote for zero grandtotal
84-
if (null !== $quote && (!$quote->validateMinimumAmount() ||
85-
!$quote->getGrandTotal() && !$quote->hasNominalItems())
86-
) {
84+
if (null !== $quote && (!$quote->validateMinimumAmount() || !$quote->getGrandTotal())) {
8785
return false;
8886
}
8987
return true;

app/code/Magento/Paypal/Model/Express/Checkout.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ public function start($returnUrl, $cancelUrl, $button = null)
485485
{
486486
$this->_quote->collectTotals();
487487

488-
if (!$this->_quote->getGrandTotal() && !$this->_quote->hasNominalItems()) {
488+
if (!$this->_quote->getGrandTotal()) {
489489
throw new \Magento\Framework\Model\Exception(
490490
__(
491491
'PayPal can\'t process orders with a zero balance due. '
@@ -563,7 +563,7 @@ public function start($returnUrl, $cancelUrl, $button = null)
563563
&& $this->_config->getConfigValue('transferShippingOptions')
564564
&& !empty($cartItems)
565565
) {
566-
if (!$this->_quote->getIsVirtual() && !$this->_quote->hasNominalItems()) {
566+
if (!$this->_quote->getIsVirtual()) {
567567
$options = $this->_prepareShippingOptions($address, true);
568568
if ($options) {
569569
$this->_api->setShippingOptionsCallbackUrl(
@@ -959,7 +959,7 @@ protected function _setExportedAddressData($address, $exportedAddress)
959959
*/
960960
protected function _setBillingAgreementRequest()
961961
{
962-
if (!$this->_customerId || $this->_quote->hasNominalItems()) {
962+
if (!$this->_customerId) {
963963
return $this;
964964
}
965965

app/code/Magento/Sales/Api/Data/OrderItemInterface.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ interface OrderItemInterface extends \Magento\Framework\Api\ExtensibleDataInterf
7474
const BASE_HIDDEN_TAX_INVOICED = 'base_hidden_tax_invoiced';
7575
const HIDDEN_TAX_REFUNDED = 'hidden_tax_refunded';
7676
const BASE_HIDDEN_TAX_REFUNDED = 'base_hidden_tax_refunded';
77-
const IS_NOMINAL = 'is_nominal';
7877
const TAX_CANCELED = 'tax_canceled';
7978
const HIDDEN_TAX_CANCELED = 'hidden_tax_canceled';
8079
const TAX_REFUNDED = 'tax_refunded';
@@ -464,13 +463,6 @@ public function getHiddenTaxInvoiced();
464463
*/
465464
public function getHiddenTaxRefunded();
466465

467-
/**
468-
* Returns is_nominal
469-
*
470-
* @return int
471-
*/
472-
public function getIsNominal();
473-
474466
/**
475467
* Returns is_qty_decimal
476468
*

app/code/Magento/Sales/Model/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function getTotalsRenderer($section, $group, $code)
4848

4949
/**
5050
* Retrieve totals for group
51-
* e.g. quote, nominal_totals, etc
51+
* e.g. quote, etc
5252
*
5353
* @param string $section
5454
* @param string $group

app/code/Magento/Sales/Model/Config/Converter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/**
7-
* Converts sales totals (incl. nominal, creditmemo, invoice) from \DOMDocument to array
7+
* Converts sales totals (incl. creditmemo, invoice) from \DOMDocument to array
88
*/
99
namespace Magento\Sales\Model\Config;
1010

0 commit comments

Comments
 (0)