title: Magento - Override real time rates from UPS
body: <p>My goal is to override returned UPS rates in the one page checkout, Magento 1.5.</p>
  
  <p>I viewed the js console to find out what template to modify, I have copied it over into my local theme and am making edits (confirmed I am on the correct file by dumping vars).</p>
  
  <p>The file is:  <code>/app/design/frontend/default/mytheme/template/checkout/onepage/shipping_method/available.phtml</code></p>
  
  <p>I see where the rate is being set with the $_incl var:</p>
  
  <pre><code>&lt;?php $_incl = $this-&gt;getShippingPrice($_rate-&gt;getPrice(), true); ?&gt;
  </code></pre>
  
  <p>I need to modify the rate based on some business rules (e.g. If rate is between 0 and 100, add $5. If rate between 101 and 200, add $10, etc etc). -- That's working great and I can confirm the rate is being modified by dumping the new value.</p>
  
  <p><strong>The Problem:</strong></p>
  
  <p>When I submit the form (go to the next step), my modified rate is not being saved and the standard rate is. So I'm missing something crucial (and probably very basic). Can someone point me in the right direction?</p>
  
  <p><strong>edit</strong>: I see when I click the "Continue" button (to move away from shipping method step to the payment method step) this is being ran:</p>
  
  <p>I'm guessing the answer is found wherever this template is posting to. Problem is I can't find it.</p>