mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #13402 from mkllnk/hub-address
Hide the delivery address for pickup on checkout summary
This commit is contained in:
28
app/views/checkout/_delivery_details.html.haml
Normal file
28
app/views/checkout/_delivery_details.html.haml
Normal file
@@ -0,0 +1,28 @@
|
||||
%div
|
||||
.summary-subtitle
|
||||
= t("checkout.step3.delivery_details.address")
|
||||
%span
|
||||
= @order.ship_address.firstname
|
||||
= @order.ship_address.lastname
|
||||
%div
|
||||
= @order.ship_address.phone
|
||||
%div
|
||||
= @order.user.email if @order.user
|
||||
%br
|
||||
%div
|
||||
= @order.ship_address.address1
|
||||
- unless @order.ship_address.address2.blank?
|
||||
%div
|
||||
= @order.ship_address.address2
|
||||
%div
|
||||
= @order.ship_address.city
|
||||
%div
|
||||
= @order.ship_address.state
|
||||
%div
|
||||
= @order.ship_address.zipcode
|
||||
%div
|
||||
= @order.ship_address.country
|
||||
- if @order.special_instructions.present?
|
||||
%br
|
||||
%em
|
||||
= @order.special_instructions
|
||||
@@ -91,7 +91,7 @@
|
||||
"data-toggle-show": shipping_method.require_ship_address
|
||||
= shipping_method_form.label shipping_method.id, shipping_method.name, {for: "shipping_method_" + shipping_method.id.to_s }
|
||||
%em.fees= payment_or_shipping_price(shipping_method, @order)
|
||||
- display_ship_address = display_ship_address || (ship_method_is_selected && shipping_method.require_ship_address)
|
||||
- display_ship_address ||= ship_method_is_selected && shipping_method.require_ship_address
|
||||
.checkout-input{"data-shippingmethod-target": "shippingMethodDescription", "data-shippingmethodid": shipping_method.id , style: "display: #{ship_method_is_selected ? 'block' : 'none'}" }
|
||||
#distributor_address.panel
|
||||
- if shipping_method.description.present?
|
||||
|
||||
@@ -11,34 +11,7 @@
|
||||
= @order.shipping_method.name
|
||||
%em.fees= payment_or_shipping_price(@order.shipping_method, @order)
|
||||
.two-columns
|
||||
%div
|
||||
.summary-subtitle
|
||||
= t("checkout.step3.delivery_details.address")
|
||||
%span
|
||||
= @order.ship_address.firstname
|
||||
= @order.ship_address.lastname
|
||||
%div
|
||||
= @order.ship_address.phone
|
||||
%div
|
||||
= @order.user.email if @order.user
|
||||
%br
|
||||
%div
|
||||
= @order.ship_address.address1
|
||||
- unless @order.ship_address.address2.blank?
|
||||
%div
|
||||
= @order.ship_address.address2
|
||||
%div
|
||||
= @order.ship_address.city
|
||||
%div
|
||||
= @order.ship_address.state
|
||||
%div
|
||||
= @order.ship_address.zipcode
|
||||
%div
|
||||
= @order.ship_address.country
|
||||
- if @order.special_instructions.present?
|
||||
%br
|
||||
%em
|
||||
= @order.special_instructions
|
||||
= render "delivery_details" if @order.shipping_method.delivery? || feature?(:hub_address)
|
||||
- if @order.shipping_method.description.present?
|
||||
%div
|
||||
.summary-subtitle
|
||||
|
||||
@@ -67,6 +67,9 @@ module OpenFoodNetwork
|
||||
"inventory" => <<~DESC,
|
||||
Enable the inventory.
|
||||
DESC
|
||||
"hub_address" => <<~DESC,
|
||||
Show the hub's address as shipping address on pickup orders.
|
||||
DESC
|
||||
}.merge(conditional_features).freeze;
|
||||
|
||||
# Features you would like to be enabled to start with.
|
||||
|
||||
Reference in New Issue
Block a user