Sha256: aa5cadcfe658376a7aba1b84110caa0589e2617878b617f29309ed1943a6212a

Contents?: true

Size: 1.4 KB

Versions: 122

Compression:

Stored size: 1.4 KB

Contents

<h3>Shopping Cart</h3>

<% if (!order.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(order.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.price * 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(order.subtotal * 100) / 100).toFixed(2) %></span></h4>
      </footer>
    </li>
  </ul>
<% } %>

Version data entries

122 entries across 122 versions & 2 rubygems

Version Path
caboose-cms-0.5.122 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.121 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.120 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.119 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.118 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.117 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.116 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.115 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.114 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.113 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.112 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.111 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.110 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.109 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.108 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.107 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.106 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.105 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.104 app/assets/templates/caboose/cart/line_items.jst.ejs
caboose-cms-0.5.103 app/assets/templates/caboose/cart/line_items.jst.ejs