title: Bringing in value of Coupon Code into "tax" calculation.php in magento
body: <p>Im trying to pull in the name of the discount code currently applied to the cart into the calculation.php file. The name of the discount code is optionalTax but Im having trouble passing it through or retrieving it directly. Its appears to be referenced as <code>$quote-&gt;getCouponCode()</code> in mage/sales/model/quote.php and I want to use it in 
  mage/tax/model/calculation.php</p>
  
  <p>Anyone have any idea on how to call it in as I've tried using the model as per (which I think is correct)</p>
  
  <pre><code>public function calcTaxAmount($price, $taxRate, $priceIncludeTax=false, $round=true)
      {
          $taxRate = $taxRate/100;
  
          if ($priceIncludeTax) {
              $amount = $price*(1-1/(1+$taxRate));
          } else {
     $cModel = Mage::getModel('catalog/sales');
     $thisDiscountCode = $cModel-&gt;$quote-&gt;getCouponCode();
     die($thisDiscountCode);
     $amount = $price*$taxRate; 
          }
  
          if ($round) {
              return $this-&gt;round($amount);
          } else {
              return $amount;
          }
      }
  </code></pre>
  
  <p>Chris</p>