Prepare delivery details partial for conditional display

This commit is contained in:
Maikel Linke
2025-06-26 14:17:17 +10:00
parent c23c773942
commit fcd6897240
2 changed files with 29 additions and 28 deletions

View 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

View File

@@ -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.description.present?
%div
.summary-subtitle