From b5024c5a16420be6debf08d4a73af065080023b2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Wed, 25 Aug 2021 16:31:45 +0200 Subject: [PATCH] On summary page, display shipping address as well as billing one --- app/views/split_checkout/_summary.html.haml | 41 +++---------------- .../split_checkout/_summary_address.html.haml | 36 ++++++++++++++++ config/locales/en.yml | 2 + 3 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 app/views/split_checkout/_summary_address.html.haml diff --git a/app/views/split_checkout/_summary.html.haml b/app/views/split_checkout/_summary.html.haml index 9341a21713..90db1f2c5f 100644 --- a/app/views/split_checkout/_summary.html.haml +++ b/app/views/split_checkout/_summary.html.haml @@ -30,43 +30,12 @@ %div.checkout-substep %div.checkout-title = t("split_checkout.step3.billing_address.title") - - %div.summary - %span.summary-label - = t("split_checkout.step1.address.address1.label") - %span.summary-value - = @order.bill_address.address1 - - - unless @order.bill_address.address2.blank? - %div.summary - %span.summary-label - = t("split_checkout.step1.address.address2.label") - %span.summary-value - = @order.bill_address.address2 + = render "summary_address", address: @order.bill_address - %div.summary - %span.summary-label - = t("split_checkout.step1.address.city.label") - %span.summary-value - = @order.bill_address.city - - %div.summary - %span.summary-label - = t("split_checkout.step1.address.state_id.label") - %span.summary-value - = @order.bill_address.state - - %div.summary - %span.summary-label - = t("split_checkout.step1.address.zipcode.label") - %span.summary-value - = @order.bill_address.zipcode - - %div.summary - %span.summary-label - = t("split_checkout.step1.billing_address.country.label") - %span.summary-value - = @order.bill_address.country + %div.checkout-substep + %div.checkout-title + = t("split_checkout.step3.shipping_address.title") + = render "summary_address", address: @order.shipping_address %div.checkout-substep %div.checkout-title diff --git a/app/views/split_checkout/_summary_address.html.haml b/app/views/split_checkout/_summary_address.html.haml new file mode 100644 index 0000000000..23dd9ad5fa --- /dev/null +++ b/app/views/split_checkout/_summary_address.html.haml @@ -0,0 +1,36 @@ +%div.summary + %span.summary-label + = t("split_checkout.step1.address.address1.label") + %span.summary-value + = address.address1 + +- unless @order.bill_address.address2.blank? + %div.summary + %span.summary-label + = t("split_checkout.step1.address.address2.label") + %span.summary-value + = address.address2 + +%div.summary + %span.summary-label + = t("split_checkout.step1.address.city.label") + %span.summary-value + = address.city + +%div.summary + %span.summary-label + = t("split_checkout.step1.address.state_id.label") + %span.summary-value + = address.state + +%div.summary + %span.summary-label + = t("split_checkout.step1.address.zipcode.label") + %span.summary-value + = address.zipcode + +%div.summary + %span.summary-label + = t("split_checkout.step1.billing_address.country.label") + %span.summary-value + = address.country diff --git a/config/locales/en.yml b/config/locales/en.yml index 894f3d0ea6..bcd1ccab75 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1676,6 +1676,8 @@ en: edit: Edit your details billing_address: title: Billing address + shipping_address: + title: Shipping address delivery_info: title: Delivery info payment_method: