From 63cf128f863dc311a82dbda47144deda4e76066b Mon Sep 17 00:00:00 2001 From: Rob H Date: Fri, 14 Dec 2012 15:08:35 +1100 Subject: [PATCH] Remove product descriptions from line item listings in cart and order --- app/overrides/order_item_description.rb | 4 ++++ app/views/spree/orders/_cart_item_description.html.haml | 3 +-- app/views/spree/orders/_order_item_description.html.haml | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 app/overrides/order_item_description.rb create mode 100644 app/views/spree/orders/_order_item_description.html.haml diff --git a/app/overrides/order_item_description.rb b/app/overrides/order_item_description.rb new file mode 100644 index 0000000000..ae1a28ecd2 --- /dev/null +++ b/app/overrides/order_item_description.rb @@ -0,0 +1,4 @@ +Deface::Override.new(:virtual_path => "spree/shared/_order_details", + :replace => "[data-hook='order_item_description']", + :partial => "spree/orders/order_item_description", + :name => "order_item_description") \ No newline at end of file diff --git a/app/views/spree/orders/_cart_item_description.html.haml b/app/views/spree/orders/_cart_item_description.html.haml index ff04782b44..9a516168bc 100644 --- a/app/views/spree/orders/_cart_item_description.html.haml +++ b/app/views/spree/orders/_cart_item_description.html.haml @@ -4,5 +4,4 @@ - 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/ - = truncate_html(variant.product.description, :length => 100, :omission => "...") + %br/ \ No newline at end of file diff --git a/app/views/spree/orders/_order_item_description.html.haml b/app/views/spree/orders/_order_item_description.html.haml new file mode 100644 index 0000000000..d7a9184736 --- /dev/null +++ b/app/views/spree/orders/_order_item_description.html.haml @@ -0,0 +1,3 @@ +%td(data-hook = "order_item_description") + %h4= item.variant.product.name + = "(" + variant_options(item.variant) + ")" unless item.variant .option_values.empty? \ No newline at end of file