diff --git a/app/overrides/add_distributor_fees_to_cart_form.rb b/app/overrides/add_distributor_fees_to_cart_form.rb deleted file mode 100644 index 883f4622ed..0000000000 --- a/app/overrides/add_distributor_fees_to_cart_form.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/orders/edit", - :insert_after => "#empty-cart", - :partial => "spree/orders/distributor_fees", - :name => "add_distributor_fees_to_cart_form", - :original => 'b5a751777e66ccbd45d7f1b980ecd201af94cb5b') diff --git a/app/views/spree/orders/_distributor_fees.html.haml b/app/views/spree/orders/_distributor_fees.html.haml deleted file mode 100644 index 015d4d77ee..0000000000 --- a/app/views/spree/orders/_distributor_fees.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -#delivery-fees - %h2 Distribution Costs - = cms_snippet_content(Cms::Snippet.find_by_identifier('cart_distribution_costs')) - - %table#delivery - %thead - %tr - %th Item - %th Shipping Method - %th Delivery Fee - %tbody - - @order.line_items.each do |line_item| - - tr_class = cycle('', 'alt') - %tr{:class => tr_class} - %td - %h4= link_to line_item.product.name, product_path(line_item.product) - %td.item-shipping-method= line_item.shipping_method_name - %td.item-shipping-cost= number_to_currency line_item.distribution_fee - - .subtotal{'data-hook' => 'delivery_fees_subtotal'} - %h5 - Shipping total - \: - %span.order-total= order_delivery_fee_subtotal(@order) diff --git a/spec/features/consumer/checkout_spec.rb b/spec/features/consumer/checkout_spec.rb index 873366ec0f..9ed52a996f 100644 --- a/spec/features/consumer/checkout_spec.rb +++ b/spec/features/consumer/checkout_spec.rb @@ -80,12 +80,14 @@ feature %q{ # Fuji apples | Shipping Method One | $1.00 # # Subtotal: $3.00 - table = page.find 'table#delivery' - rows = table.all('tr') - rows[0].all('th').map { |cell| cell.text.strip }.should == ['Item', 'Shipping Method', 'Delivery Fee'] - rows[1].all('td').map { |cell| cell.text.strip }.should == ['Fuji apples', 'Shipping Method One', '$1.00'] - rows[2].all('td').map { |cell| cell.text.strip }.should == ['Garlic', 'Shipping Method Two', '$2.00'] - page.should have_selector '#delivery-fees span.order-total', :text => '$3.00' + + # Disabled pending spec for the new table + # table = page.find 'table#delivery' + # rows = table.all('tr') + # rows[0].all('th').map { |cell| cell.text.strip }.should == ['Item', 'Shipping Method', 'Delivery Fee'] + # rows[1].all('td').map { |cell| cell.text.strip }.should == ['Fuji apples', 'Shipping Method One', '$1.00'] + # rows[2].all('td').map { |cell| cell.text.strip }.should == ['Garlic', 'Shipping Method Two', '$2.00'] + # page.should have_selector '#delivery-fees span.order-total', :text => '$3.00' end scenario "changing distributor updates delivery fees" do