Monday 6 February 2012

Want to disable shipping tax and product tax in check out page

Goto->app/code/core/mage/sales/model/quote

click address.php search line 932 more less




public function setBaseTotalAmount($code, $amount)
    {
        $this->_baseTotalAmounts[$code] = $amount;
        if ($code != 'subtotal') {
            $code = $code.'_amount';
        }
        $this->setData('base_'.$code, $amount);
        return $this;
    }

    /**
     * Add amount total amount value
     *
     * @param   string $code
     * @param   float $amount
     * @return  Mage_Sales_Model_Quote_Address
     */
    public function addTotalAmount($code, $amount)
    {
       
        if(Mage::getSingleton('customer/session')->isLoggedIn()) {
        $customer = Mage::getModel("customer/customer")->load(Mage::getSingleton('customer/session')->getId());
        if($customer->getSalestaxcustomer() == 115 && $code == 'tax') {
        $amount = 0;
       
        }
       
        }
        $amount = $this->getTotalAmount($code)+$amount;
        $this->setTotalAmount($code, $amount);
        return $this;
    }

    /**
     * Add amount total amount value in base store currency
     *
     * @param   string $code
     * @param   float $amount
     * @return  Mage_Sales_Model_Quote_Address
     */
    public function addBaseTotalAmount($code, $amount)
    {
        $amount = $this->getBaseTotalAmount($code)+$amount;
        $this->setBaseTotalAmount($code, $amount);
        return $this;
    }



check in check out page that tax does not display

No comments:

Post a Comment