<%- locals = {:item_form => item_form, :variant => variant, :line_item => line_item} %>
<%= hook :cart_item_image, locals do %>
<% if variant.images.length == 0 %>
<%= small_image(variant.product) %>
<% else %>
<%= image_tag variant.images.first.attachment.url(:small) %>
<% end %>
<% end %>
|
<%= hook :cart_item_description, locals do %>
<%= link_to variant.product.name, product_path(variant.product) %>
<% if variant %>
<%= variant_options variant %>
<% if variant.product.description %>
<%= truncate(variant.product.description, :length => 100, :omission => "...") %>
<% end %>
<% end %>
<% end %>
|
<%= hook :cart_item_price, locals do %>
<%= product_price(line_item) %>
<% end %>
|
<%= hook :cart_item_quantity, locals do %>
<%= item_form.text_field :quantity, :class => "input-mini line_item_quantity" %>
<% end %>
|
<%= hook :cart_item_total, locals do %>
<%= format_price(product_price(line_item, :format_as_currency => false) * line_item.quantity) unless line_item.quantity.nil? %>
<% end %>
|
<%= hook :cart_item_delete, locals do %>
<%= link_to(image_tag('/images/admin/icons/delete.png'), '#', :class => 'delete', :onclick => "") %>
<% end %>
|