title: Fatal error: Call to a member function setFinalPrice() on a non-object in /app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php on line 89
body: <p>I had installed an custom extension. Its running successfully and had all files at its place. But I am getting this error on my listing page</p>
  
  <pre><code>Fatal error: Call to a member function setFinalPrice() on a non-object in /var/zpanel/hostdata/zadmin/public_html/unisport_com/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php on line 89.
  </code></pre>
  
  <p>I google this error but did'nt found any proper solution. One solution is to copy the original Abstract.php file may be because extension had overwrite this file. But I checked the code from the backup its the same and also copied original file but nothing worked for me.</p>
  
  <p>What is wrong with this file? Can anybody help?</p>
  
  <p>below is the code of Abstract.php file:</p>
  
  <pre><code>&lt;?php
  /**
   * Magento
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Open Software License (OSL 3.0)
   * that is bundled with this package in the file LICENSE.txt.
   * It is also available through the world-wide-web at this URL:
   * http://opensource.org/licenses/osl-3.0.php
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@magentocommerce.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade Magento to newer
   * versions in the future. If you wish to customize Magento for your
   * needs please refer to http://www.magentocommerce.com for more information.
   *
   * @category    Mage
   * @package     Mage_Sales
   * @copyright   Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
   * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
   */
  
  /**
   * Quote item abstract model
   *
   * Price attributes:
   *  - price - initial item price, declared during product association
   *  - original_price - product price before any calculations
   *  - calculation_price - prices for item totals calculation
   *  - custom_price - new price that can be declared by user and recalculated during calculation process
   *  - original_custom_price - original defined value of custom price without any convertion
   *
   * @category   Mage
   * @package    Mage_Sales
   * @author      Magento Core Team &lt;core@magentocommerce.com&gt;
   */
  abstract class Mage_Sales_Model_Quote_Item_Abstract extends Mage_Core_Model_Abstract
      implements Mage_Catalog_Model_Product_Configuration_Item_Interface
  {
      /**
       * Parent item for sub items for bundle product, configurable product, etc.
       *
       * @var Mage_Sales_Model_Quote_Item_Abstract
       */
      protected $_parentItem  = null;
  
      /**
       * Children items in bundle product, configurable product, etc.
       *
       * @var array
       */
      protected $_children    = array();
  
      /**
       *
       * @var array
       */
      protected $_messages    = array();
  
      /**
       * Retrieve Quote instance
       *
       * @return Mage_Sales_Model_Quote
       */
      abstract function getQuote();
  
      /**
       * Retrieve product model object associated with item
       *
       * @return Mage_Catalog_Model_Product
       */
      public function getProduct()
      {
          $product = $this-&gt;_getData('product');
          if ($product === null &amp;&amp; $this-&gt;getProductId()) {
              $product = Mage::getModel('catalog/product')
                  -&gt;setStoreId($this-&gt;getQuote()-&gt;getStoreId())
                  -&gt;load($this-&gt;getProductId());
              $this-&gt;setProduct($product);
          }
  
          /**
           * Reset product final price because it related to custom options
           */
          $product-&gt;setFinalPrice(null);
          if (is_array($this-&gt;_optionsByCode)) {
              $product-&gt;setCustomOptions($this-&gt;_optionsByCode);
          }
          return $product;
      }
  
      /**
       * Returns special download params (if needed) for custom option with type = 'file'
       * Needed to implement Mage_Catalog_Model_Product_Configuration_Item_Interface.
       * Return null, as quote item needs no additional configuration.
       *
       * @return null|Varien_Object
       */
      public function getFileDownloadParams()
      {
          return null;
      }
  
      /**
       * Specify parent item id before saving data
       *
       * @return  Mage_Sales_Model_Quote_Item_Abstract
       */
      protected function _beforeSave()
      {
          parent::_beforeSave();
          if ($this-&gt;getParentItem()) {
              $this-&gt;setParentItemId($this-&gt;getParentItem()-&gt;getId());
          }
          return $this;
      }
  
  
      /**
       * Set parent item
       *
       * @param  Mage_Sales_Model_Quote_Item $parentItem
       * @return Mage_Sales_Model_Quote_Item
       */
      public function setParentItem($parentItem)
      {
          if ($parentItem) {
              $this-&gt;_parentItem = $parentItem;
              $parentItem-&gt;addChild($this);
          }
          return $this;
      }
  
      /**
       * Get parent item
       *
       * @return Mage_Sales_Model_Quote_Item
       */
      public function getParentItem()
      {
          return $this-&gt;_parentItem;
      }
  
      /**
       * Get chil items
       *
       * @return array
       */
      public function getChildren()
      {
          return $this-&gt;_children;
      }
  
      /**
       * Add child item
       *
       * @param  Mage_Sales_Model_Quote_Item_Abstract $child
       * @return Mage_Sales_Model_Quote_Item_Abstract
       */
      public function addChild($child)
      {
          $this-&gt;setHasChildren(true);
          $this-&gt;_children[] = $child;
          return $this;
      }
  
      /**
       * Adds message(s) for quote item. Duplicated messages are not added.
       *
       * @param  mixed $messages
       * @return Mage_Sales_Model_Quote_Item_Abstract
       */
      public function setMessage($messages)
      {
          $messagesExists = $this-&gt;getMessage(false);
          if (!is_array($messages)) {
              $messages = array($messages);
          }
          foreach ($messages as $message) {
              if (!in_array($message, $messagesExists)) {
                  $this-&gt;addMessage($message);
              }
          }
          return $this;
      }
  
      /**
       * Add message of quote item to array of messages
       *
       * @param   string $message
       * @return  Mage_Sales_Model_Quote_Item_Abstract
       */
      public function addMessage($message)
      {
          $this-&gt;_messages[] = $message;
          return $this;
      }
  
      /**
       * Get messages array of quote item
       *
       * @param   bool $string flag for converting messages to string
       * @return  array|string
       */
      public function getMessage($string = true)
      {
          if ($string) {
              return join("\n", $this-&gt;_messages);
          }
          return $this-&gt;_messages;
      }
  
      /**
       * Removes message by text
       *
       * @param string $text
       * @return Mage_Sales_Model_Quote_Item_Abstract
       */
      public function removeMessageByText($text)
      {
          foreach ($this-&gt;_messages as $key =&gt; $message) {
              if ($message == $text) {
                  unset($this-&gt;_messages[$key]);
              }
          }
          return $this;
      }
  
      /**
       * Clears all messages
       *
       * @return Mage_Sales_Model_Quote_Item_Abstract
       */
      public function clearMessage()
      {
          $this-&gt;unsMessage(); // For older compatibility, when we kept message inside data array
          $this-&gt;_messages = array();
          return $this;
      }
  
      /**
       * Retrieve store model object
       *
       * @return Mage_Core_Model_Store
       */
      public function getStore()
      {
          return $this-&gt;getQuote()-&gt;getStore();
      }
  
      /**
       * Checking item data
       *
       * @return Mage_Sales_Model_Quote_Item_Abstract
       */
      public function checkData()
      {
          $this-&gt;setHasError(false);
          $this-&gt;clearMessage();
  
          $qty = $this-&gt;_getData('qty');
  
          try {
              $this-&gt;setQty($qty);
          } catch (Mage_Core_Exception $e) {
              $this-&gt;setHasError(true);
              $this-&gt;setMessage($e-&gt;getMessage());
          } catch (Exception $e) {
              $this-&gt;setHasError(true);
              $this-&gt;setMessage(Mage::helper('sales')-&gt;__('Item qty declaration error.'));
          }
  
          try {
              $this-&gt;getProduct()-&gt;getTypeInstance(true)-&gt;checkProductBuyState($this-&gt;getProduct());
          } catch (Mage_Core_Exception $e) {
              $this-&gt;setHasError(true)
                  -&gt;setMessage($e-&gt;getMessage());
              $this-&gt;getQuote()-&gt;setHasError(true)
                  -&gt;addMessage(Mage::helper('sales')-&gt;__('Some of the products below do not have all the required options.'));
          } catch (Exception $e) {
              $this-&gt;setHasError(true)
                  -&gt;setMessage(Mage::helper('sales')-&gt;__('Item options declaration error.'));
              $this-&gt;getQuote()-&gt;setHasError(true)
                  -&gt;addMessage(Mage::helper('sales')-&gt;__('Items options declaration error.'));
          }
  
          if ($this-&gt;getProduct()-&gt;getHasError()) {
              $this-&gt;setHasError(true)
                  -&gt;setMessage(Mage::helper('sales')-&gt;__('Some of the selected options are not currently available.'));
              $this-&gt;getQuote()-&gt;setHasError(true)
                  -&gt;addMessage($this-&gt;getProduct()-&gt;getMessage(), 'options');
          }
  
          if ($this-&gt;getHasConfigurationUnavailableError()) {
              $this-&gt;setHasError(true)
                  -&gt;setMessage(Mage::helper('sales')-&gt;__('Selected option(s) or their combination is not currently available.'));
              $this-&gt;getQuote()-&gt;setHasError(true)
                  -&gt;addMessage(Mage::helper('sales')-&gt;__('Some item options or their combination are not currently available.'), 'unavailable-configuration');
              $this-&gt;unsHasConfigurationUnavailableError();
          }
  
          return $this;
      }
  
      /**
       * Get original (not related with parent item) item quantity
       *
       * @return  int|float
       */
      public function getQty()
      {
          return $this-&gt;_getData('qty');
      }
  
      /**
       * Get total item quantity (include parent item relation)
       *
       * @return  int|float
       */
      public function getTotalQty()
      {
          if ($this-&gt;getParentItem()) {
              return $this-&gt;getQty()*$this-&gt;getParentItem()-&gt;getQty();
          }
          return $this-&gt;getQty();
      }
  
      /**
       * Calculate item row total price
       *
       * @return Mage_Sales_Model_Quote_Item
       */
      public function calcRowTotal()
      {
          $qty        = $this-&gt;getTotalQty();
          // Round unit price before multiplying to prevent losing 1 cent on subtotal
          $total      = $this-&gt;getStore()-&gt;roundPrice($this-&gt;getCalculationPriceOriginal()) * $qty;
          $baseTotal  = $this-&gt;getStore()-&gt;roundPrice($this-&gt;getBaseCalculationPriceOriginal()) * $qty;
  
          $this-&gt;setRowTotal($this-&gt;getStore()-&gt;roundPrice($total));
          $this-&gt;setBaseRowTotal($this-&gt;getStore()-&gt;roundPrice($baseTotal));
          return $this;
      }
  
      /**
       * Get item price used for quote calculation process.
       * This method get custom price (if it is defined) or original product final price
       *
       * @return float
       */
      public function getCalculationPrice()
      {
          $price = $this-&gt;_getData('calculation_price');
          if (is_null($price)) {
              if ($this-&gt;hasCustomPrice()) {
                  $price = $this-&gt;getCustomPrice();
              } else {
                  $price = $this-&gt;getConvertedPrice();
              }
              $this-&gt;setData('calculation_price', $price);
          }
          return $price;
      }
  
      /**
       * Get item price used for quote calculation process.
       * This method get original custom price applied before tax calculation
       *
       * @return float
       */
      public function getCalculationPriceOriginal()
      {
          $price = $this-&gt;_getData('calculation_price');
          if (is_null($price)) {
              if ($this-&gt;hasOriginalCustomPrice()) {
                  $price = $this-&gt;getOriginalCustomPrice();
              } else {
                  $price = $this-&gt;getConvertedPrice();
              }
              $this-&gt;setData('calculation_price', $price);
          }
          return $price;
      }
  
      /**
       * Get calculation price used for quote calculation in base currency.
       *
       * @return float
       */
      public function getBaseCalculationPrice()
      {
          if (!$this-&gt;hasBaseCalculationPrice()) {
              if ($this-&gt;hasCustomPrice()) {
                  $price = (float) $this-&gt;getCustomPrice();
                  if ($price) {
                      $rate = $this-&gt;getStore()-&gt;convertPrice($price) / $price;
                      $price = $price / $rate;
                  }
              } else {
                  $price = $this-&gt;getPrice();
              }
              $this-&gt;setBaseCalculationPrice($price);
          }
          return $this-&gt;_getData('base_calculation_price');
      }
  
      /**
       * Get original calculation price used for quote calculation in base currency.
       *
       * @return float
       */
      public function getBaseCalculationPriceOriginal()
      {
          if (!$this-&gt;hasBaseCalculationPrice()) {
              if ($this-&gt;hasOriginalCustomPrice()) {
                  $price = (float) $this-&gt;getOriginalCustomPrice();
                  if ($price) {
                      $rate = $this-&gt;getStore()-&gt;convertPrice($price) / $price;
                      $price = $price / $rate;
                  }
              } else {
                  $price = $this-&gt;getPrice();
              }
              $this-&gt;setBaseCalculationPrice($price);
          }
          return $this-&gt;_getData('base_calculation_price');
      }
  
      /**
       * Get whether the item is nominal
       * TODO: fix for multishipping checkout
       *
       * @return bool
       */
      public function isNominal()
      {
          if (!$this-&gt;hasData('is_nominal')) {
              $this-&gt;setData('is_nominal', $this-&gt;getProduct() ? '1' == $this-&gt;getProduct()-&gt;getIsRecurring() : false);
          }
          return $this-&gt;_getData('is_nominal');
      }
  
      /**
       * Data getter for 'is_nominal'
       * Used for converting item to order item
       *
       * @return int
       */
      public function getIsNominal()
      {
          return (int)$this-&gt;isNominal();
      }
  
      /**
       * Get original price (retrieved from product) for item.
       * Original price value is in quote selected currency
       *
       * @return float
       */
      public function getOriginalPrice()
      {
          $price = $this-&gt;_getData('original_price');
          if (is_null($price)) {
              $price = $this-&gt;getStore()-&gt;convertPrice($this-&gt;getBaseOriginalPrice());
              $this-&gt;setData('original_price', $price);
          }
          return $price;
      }
  
      /**
       * Set original price to item (calculation price will be refreshed too)
       *
       * @param   float $price
       * @return  Mage_Sales_Model_Quote_Item_Abstract
       */
      public function setOriginalPrice($price)
      {
          return $this-&gt;setData('original_price', $price);
      }
  
      /**
       * Get Original item price (got from product) in base website currency
       *
       * @return float
       */
      public function getBaseOriginalPrice()
      {
          return $this-&gt;_getData('base_original_price');
      }
  
      /**
       * Specify custom item price (used in case whe we have apply not product price to item)
       *
       * @param   float $value
       * @return  Mage_Sales_Model_Quote_Item_Abstract
       */
      public function setCustomPrice($value)
      {
          $this-&gt;setCalculationPrice($value);
          $this-&gt;setBaseCalculationPrice(null);
          return $this-&gt;setData('custom_price', $value);
      }
  
      /**
       * Get item price. Item price currency is website base currency.
       *
       * @return decimal
       */
      public function getPrice()
      {
          return $this-&gt;_getData('price');
      }
  
      /**
       * Specify item price (base calculation price and converted price will be refreshed too)
       *
       * @param   float $value
       * @return  Mage_Sales_Model_Quote_Item_Abstract
       */
      public function setPrice($value)
      {
          $this-&gt;setBaseCalculationPrice(null);
          $this-&gt;setConvertedPrice(null);
          return $this-&gt;setData('price', $value);
      }
  
      /**
       * Get item price converted to quote currency
       * @return float
       */
      public function getConvertedPrice()
      {
          $price = $this-&gt;_getData('converted_price');
          if (is_null($price)) {
              $price = $this-&gt;getStore()-&gt;convertPrice($this-&gt;getPrice());
              $this-&gt;setData('converted_price', $price);
          }
          return $price;
      }
  
      /**
       * Set new value for converted price
       * @param float $value
       * @return Mage_Sales_Model_Quote_Item_Abstract
       */
      public function setConvertedPrice($value)
      {
          $this-&gt;setCalculationPrice(null);
          $this-&gt;setData('converted_price', $value);
          return $this;
      }
  
      /**
       * Clone quote item
       *
       * @return Mage_Sales_Model_Quote_Item
       */
      public function __clone()
      {
          $this-&gt;setId(null);
          $this-&gt;_parentItem  = null;
          $this-&gt;_children    = array();
          $this-&gt;_messages    = array();
          return $this;
      }
  
      /**
       * Checking if there children calculated or parent item
       * when we have parent quote item and its children
       *
       * @return bool
       */
      public function isChildrenCalculated()
      {
          if ($this-&gt;getParentItem()) {
              $calculate = $this-&gt;getParentItem()-&gt;getProduct()-&gt;getPriceType();
          } else {
              $calculate = $this-&gt;getProduct()-&gt;getPriceType();
          }
  
          if ((null !== $calculate) &amp;&amp; (int)$calculate === Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) {
              return true;
          }
          return false;
      }
  
      /**
       * Checking can we ship product separatelly (each child separately)
       * or each parent product item can be shipped only like one item
       *
       * @return bool
       */
      public function isShipSeparately()
      {
          if ($this-&gt;getParentItem()) {
              $shipmentType = $this-&gt;getParentItem()-&gt;getProduct()-&gt;getShipmentType();
          } else {
              $shipmentType = $this-&gt;getProduct()-&gt;getShipmentType();
          }
  
          if ((null !== $shipmentType) &amp;&amp;
              (int)$shipmentType === Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) {
              return true;
          }
          return false;
      }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
      /**
       * Calculate item tax amount
       *
       * @deprecated logic moved to tax totals calculation model
       * @return  Mage_Sales_Model_Quote_Item
       */
      public function calcTaxAmount()
      {
          $store = $this-&gt;getStore();
  
          if (!Mage::helper('tax')-&gt;priceIncludesTax($store)) {
              if (Mage::helper('tax')-&gt;applyTaxAfterDiscount($store)) {
                  $rowTotal       = $this-&gt;getRowTotalWithDiscount();
                  $rowBaseTotal   = $this-&gt;getBaseRowTotalWithDiscount();
              } else {
                  $rowTotal       = $this-&gt;getRowTotal();
                  $rowBaseTotal   = $this-&gt;getBaseRowTotal();
              }
  
              $taxPercent = $this-&gt;getTaxPercent()/100;
  
              $this-&gt;setTaxAmount($store-&gt;roundPrice($rowTotal * $taxPercent));
              $this-&gt;setBaseTaxAmount($store-&gt;roundPrice($rowBaseTotal * $taxPercent));
  
              $rowTotal       = $this-&gt;getRowTotal();
              $rowBaseTotal   = $this-&gt;getBaseRowTotal();
              $this-&gt;setTaxBeforeDiscount($store-&gt;roundPrice($rowTotal * $taxPercent));
              $this-&gt;setBaseTaxBeforeDiscount($store-&gt;roundPrice($rowBaseTotal * $taxPercent));
          } else {
              if (Mage::helper('tax')-&gt;applyTaxAfterDiscount($store)) {
                  $totalBaseTax = $this-&gt;getBaseTaxAmount();
                  $totalTax = $this-&gt;getTaxAmount();
  
                  if ($totalTax &amp;&amp; $totalBaseTax) {
                      $totalTax -= $this-&gt;getDiscountAmount() * ($this-&gt;getTaxPercent() / 100);
                      $totalBaseTax -= $this-&gt;getBaseDiscountAmount() * ($this-&gt;getTaxPercent() / 100);
  
                      $this-&gt;setBaseTaxAmount($store-&gt;roundPrice($totalBaseTax));
                      $this-&gt;setTaxAmount($store-&gt;roundPrice($totalTax));
                  }
              }
          }
  
          if (Mage::helper('tax')-&gt;discountTax($store) &amp;&amp; !Mage::helper('tax')-&gt;applyTaxAfterDiscount($store)) {
              if ($this-&gt;getDiscountPercent()) {
                  $baseTaxAmount =  $this-&gt;getBaseTaxBeforeDiscount();
                  $taxAmount = $this-&gt;getTaxBeforeDiscount();
  
                  $baseDiscountDisposition = $baseTaxAmount/100*$this-&gt;getDiscountPercent();
                  $discountDisposition = $taxAmount/100*$this-&gt;getDiscountPercent();
  
                  $this-&gt;setDiscountAmount($this-&gt;getDiscountAmount()+$discountDisposition);
                  $this-&gt;setBaseDiscountAmount($this-&gt;getBaseDiscountAmount()+$baseDiscountDisposition);
              }
          }
  
          return $this;
      }
  
      /**
       * Get item tax amount
       *
       * @deprecated
       * @return  decimal
       */
      public function getTaxAmount()
      {
          return $this-&gt;_getData('tax_amount');
      }
  
  
      /**
       * Get item base tax amount
       *
       * @deprecated
       * @return decimal
       */
      public function getBaseTaxAmount()
      {
          return $this-&gt;_getData('base_tax_amount');
      }
  
      /**
       * Get item price (item price always exclude price)
       *
       * @deprecated
       * @return decimal
       */
      protected function _calculatePrice($value, $saveTaxes = true)
      {
          $store = $this-&gt;getQuote()-&gt;getStore();
  
          if (Mage::helper('tax')-&gt;priceIncludesTax($store)) {
              $bAddress = $this-&gt;getQuote()-&gt;getBillingAddress();
              $sAddress = $this-&gt;getQuote()-&gt;getShippingAddress();
  
              $address = $this-&gt;getAddress();
  
              if ($address) {
                  switch ($address-&gt;getAddressType()) {
                      case Mage_Sales_Model_Quote_Address::TYPE_BILLING:
                          $bAddress = $address;
                          break;
                      case Mage_Sales_Model_Quote_Address::TYPE_SHIPPING:
                          $sAddress = $address;
                          break;
                  }
              }
  
              if ($this-&gt;getProduct()-&gt;getIsVirtual()) {
                  $sAddress = $bAddress;
              }
  
              $priceExcludingTax = Mage::helper('tax')-&gt;getPrice(
                  $this-&gt;getProduct()-&gt;setTaxPercent(null),
                  $value,
                  false,
                  $sAddress,
                  $bAddress,
                  $this-&gt;getQuote()-&gt;getCustomerTaxClassId(),
                  $store
              );
  
              $priceIncludingTax = Mage::helper('tax')-&gt;getPrice(
                  $this-&gt;getProduct()-&gt;setTaxPercent(null),
                  $value,
                  true,
                  $sAddress,
                  $bAddress,
                  $this-&gt;getQuote()-&gt;getCustomerTaxClassId(),
                  $store
              );
  
              if ($saveTaxes) {
                  $qty = $this-&gt;getQty();
                  if ($this-&gt;getParentItem()) {
                      $qty = $qty*$this-&gt;getParentItem()-&gt;getQty();
                  }
  
                  if (Mage::helper('tax')-&gt;displayCartPriceInclTax($store)) {
                      $rowTotal = $value*$qty;
                      $rowTotalExcTax = Mage::helper('tax')-&gt;getPrice(
                          $this-&gt;getProduct()-&gt;setTaxPercent(null),
                          $rowTotal,
                          false,
                          $sAddress,
                          $bAddress,
                          $this-&gt;getQuote()-&gt;getCustomerTaxClassId(),
                          $store
                      );
                      $rowTotalIncTax = Mage::helper('tax')-&gt;getPrice(
                          $this-&gt;getProduct()-&gt;setTaxPercent(null),
                          $rowTotal,
                          true,
                          $sAddress,
                          $bAddress,
                          $this-&gt;getQuote()-&gt;getCustomerTaxClassId(),
                          $store
                      );
                      $totalBaseTax = $rowTotalIncTax-$rowTotalExcTax;
                      $this-&gt;setRowTotalExcTax($rowTotalExcTax);
                  }
                  else {
                      $taxAmount = $priceIncludingTax - $priceExcludingTax;
                      $this-&gt;setTaxPercent($this-&gt;getProduct()-&gt;getTaxPercent());
                      $totalBaseTax = $taxAmount*$qty;
                  }
  
                  $totalTax = $this-&gt;getStore()-&gt;convertPrice($totalBaseTax);
                  $this-&gt;setTaxBeforeDiscount($totalTax);
                  $this-&gt;setBaseTaxBeforeDiscount($totalBaseTax);
  
                  $this-&gt;setTaxAmount($totalTax);
                  $this-&gt;setBaseTaxAmount($totalBaseTax);
              }
  
              $value = $priceExcludingTax;
          }
  
          return $value;
      }
  }
  </code></pre>