Move override for cart line item into existing view replacement

This commit is contained in:
Rob Harrington
2014-11-26 16:08:53 +11:00
parent a8dde3bbb9
commit 8f27c643f1
3 changed files with 3 additions and 16 deletions

View File

@@ -1,5 +0,0 @@
Deface::Override.new(:virtual_path => "spree/orders/_line_item",
:replace => "[data-hook='cart_item_description']",
:partial => "spree/orders/cart_item_description",
:name => "cart_item_description",
:original => 'ce2b7ddab2a6a13b25159ea18f6ab50991409d3e')

View File

@@ -1,7 +0,0 @@
%td{'data-hook' => "cart_item_description"}
%h4= variant.product.name
= variant.options_text
- if @order.insufficient_stock_lines.include? line_item
%span.out-of-stock
= variant.in_stock? ? t(:insufficient_stock, :on_hand => variant.on_hand) : t(:out_of_stock)
%br/

View File

@@ -5,14 +5,13 @@
- else
= link_to image_tag(variant.images.first.attachment.url(:small)), variant.product
%td.cart-item-description{"data-hook" => "cart_item_description"}
%h4= link_to variant.product.name, product_path(variant.product)
%td.cart-item-description{'data-hook' => "cart_item_description"}
%h4= variant.product.name
= variant.options_text
- if @order.insufficient_stock_lines.include? line_item
%span.out-of-stock
= variant.in_stock? ? t(:insufficient_stock, :on_hand => variant.on_hand) : t(:out_of_stock)
%br
= line_item_description(variant)
%br/
%td.cart-item-price{"data-hook" => "cart_item_price"}
= line_item.single_money.to_html