title: undefined method `*' for nil:NilClass
body: <p>I'm getting this error while using the <a href="https://github.com/crowdint/acts_as_shopping_cart" rel="nofollow">acts-as-shopping-cart gem</a>:</p>
  
  <blockquote>
  <pre><code>undefined method `*' for nil:NilClass  Extracted source (around line #5):
  
  2:
  3: &lt;%= render :partial =&gt; 'shopping_cart_item', :collection =&gt; @shopping_cart.shopping_cart_items %&gt;
  4:
  5:  SubTotal:&lt;%= number_to_currency @shopping_cart.subtotal %&gt;
  6:  Taxes:&lt;%= number_to_currency @shopping_cart.taxes %&gt;
  7:  Total:&lt;%= number_to_currency @shopping_cart.total %&gt;
  </code></pre>
  </blockquote>
  
  <p>The fields appear to be defined in the gem source.</p>
  
  <h3>show.html.erb</h3>
  
  <pre><code>&lt;h1&gt;Shopping Cart&lt;/h1&gt;
  
  &lt;%= render :partial =&gt; 'shopping_cart_item', :collection =&gt; @shopping_cart.shopping_cart_items %&gt;
  
  &lt;div&gt;&lt;b&gt;SubTotal:&lt;/b&gt;&lt;%= number_to_currency @shopping_cart.subtotal %&gt;&lt;/div&gt;
  &lt;div&gt;&lt;b&gt;Taxes:&lt;/b&gt;&lt;%= number_to_currency @shopping_cart.taxes %&gt;&lt;/div&gt;
  &lt;div&gt;&lt;b&gt;Total:&lt;/b&gt;&lt;%= number_to_currency @shopping_cart.total %&gt;&lt;/div&gt;
  </code></pre>
  
  <h3>shopping_cart.rb</h3>
  
  <pre><code>class ShoppingCart &lt; ActiveRecord::Base
    acts_as_shopping_cart
  
    def tax_pct
      8.25
    end
  
    def taxes
      (subtotal - 10) * tax_pct
    end
  
  end
  </code></pre>
  
  <p>application trace</p>
  
  <blockquote>
    <p>app/views/shopping_carts/show.html.erb:5:in
    `_app_views_shopping_carts_show_html_erb__2338506009803118188_70153042369260'</p>
  </blockquote>
  
  <p>shopping_carts.controller</p>
  
  <pre><code>class ShoppingCartsController &lt; ApplicationController
    before_filter :extract_shopping_cart
  
    def create
      @product = Product.find(params[:product_id])
      @shopping_cart.add(@product, @product.price)
      redirect_to shopping_cart_path
    end
  
    def show
  
    end
  
    private
    def extract_shopping_cart
      shopping_cart_id = session[:shopping_cart_id]
      @shopping_cart = session[:shopping_cart_id] ? ShoppingCart.find(shopping_cart_id) : ShoppingCart.create
      session[:shopping_cart_id] = @shopping_cart.id
    end
  end
  </code></pre>
  
  <p>my repo</p>
  
  <p><a href="https://github.com/atbyrd/Bootstrapped_Devise" rel="nofollow">https://github.com/atbyrd/Bootstrapped_Devise</a></p>