Sha256: fa8d856b72081d8cac7dc08de228a21cff25345d08d208a963b2be25cd1d42f6

Contents?: true

Size: 1.41 KB

Versions: 312

Compression:

Stored size: 1.41 KB

Contents

<h3>Shopping Cart</h3>

<% if (!invoice.line_items.length) { %>
  <p>Your cart is currently empty. <a href="/products">Click here</a> to continue shopping.</p>
<% } else { %>
  <ul>
    <li>
      <header>Quantity</header>
      <header>Price</header>
    </li>
    
    <% _.each(invoice.line_items, function(lineItem) { %>
      <li data-id="<%= lineItem.id %>">
        <section>
          <% if (lineItem.variant.images.length > 0) { %>
            <figure style="background-image: url(<%= lineItem.variant.images[0].urls.thumb %>)"></figure>
          <% } else { %>
            <figure style="background-image: url(<%= lineItem.product.images[0].urls.thumb %>)"></figure>
          <% } %>
          
          <p><%= lineItem.title %><br /><a id="remove-from-cart"t="remove">Remove</a><a href="/products/<%= lineItem.variant.product_id %>">View</a></p>
        </section>
        
        <section>
          <input name="quantity" type="text" value="<%= lineItem.quantity %>" />
        </section>
        
        <section>
          <p class="price">$<%= parseFloat(Math.round(lineItem.subtotal * 100) / 100).toFixed(2)  %></p>
        </section>
      </li>
    <% }); %>
    
    <li>
      <footer>
        <a href="/checkout" class="btn blue">Checkout</a>
        <h4>Subtotal: <span class="subtotal">$<%= parseFloat(Math.round(invoice.subtotal * 100) / 100).toFixed(2) %></span></h4>
      </footer>
    </li>
  </ul>
<% } %>

Version data entries

312 entries across 312 versions & 1 rubygems

Version Path
caboose-cms-0.9.211 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.210 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.209 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.208 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.207 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.206 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.205 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.204 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.203 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.202 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.201 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.200 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.198 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.197 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.196 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.195 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.194 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.193 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.192 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.9.191 app/assets/templates/caboose/cart/line_items.jst.ejs