Monday 6 February 2012

HOW TO AVOID TAX COLUM IN CHECK OUT PAGE

If u add new attribute like sales tax

customer-manage customer  -account information- after the gender we create the sales tax attribute
 
if v give not taxable means no shipping tax and product tax not comes
if v give taxable means all tax assigned

if v want like this means
goto

app/code/core/Mage/Sales/Model/Quote

address.php


goto the line 930

 /**
     * Set total amount value in base store currency
     *
     * @param   string $code
     * @param   float $amount
     * @return  Mage_Sales_Model_Quote_Address
     */
    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;
    }

    /**
     * Get total amount value by code
     *
     * @param   string $code
     * @return  float
     */



check that tax are not available










No comments:

Post a Comment