app/views/caboose/checkout/step_two.html.erb in caboose-cms-0.5.60 vs app/views/caboose/checkout/step_two.html.erb in caboose-cms-0.5.61
- old
+ new
@@ -1,7 +1,15 @@
<%
sa = @order.shipping_address
ba = @order.billing_address
+if sa.nil?
+ q = ["status <> ? and id < ?", 'cart', @order.id]
+ if Caboose::Order.where(q).exists?
+ last_order = Caboose::Order.where(q).first
+ sa = last_order.shipping_address
+ ba = last_order.billing_address
+ end
+end
%>
<div id="checkout">
<% if @logged_in_user.id == 1 %>
<p class='note error'>You are logged in as the admin user. Please <a href='/logout'>logout</a> and complete your order as a different user.</p>