mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Remove distributor fees table at checkout, pending design of new breakdown
This commit is contained in:
@@ -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')
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user