0

I am new to cartthrob and am playing with it on my development site. I am still using OFFLINE PAYMENT while I work out how to get the information flow right. My question is this: How do I display the customer shipping address on the order completion page? At the moment I am collecting customer information and shipping information in the same place, so I want an output that will give the customer name and address if it is the same as the shipping address, or just the shipping name and address if it is different from the customer address. I am using the {exp:cartthrob:customer_info} paired tag.

2 Answers 2

1

If you've specified in the CT settings to save orders to an 'orders' channel, then you can use the submitted_order_info tag to output fields from the completed order the same way you'd output any other channel entry.

https://www.cartthrob.com/docs/tags_detail/submitted_order_info/index.html

1
  • Thanks for your reply. I am using the submitted_order_info tag, but that form outputs both billing and shipping addresses (which are usually the same. My issue is that I only want the shipping address to output. When the customer inputs the information they input their billing information first, and then the shipping information if the address is different. Thus I want to output the billing information as the shipping information if the address is the same and the shipping form is left blank, and when the address is different, I want just the shipping information. Do you see what I mean?
    – Max Drake
    Apr 21, 2016 at 14:20
0

Ok, so the CT examples use old syntax, which is why they don't work on CT3. This works:

  • {if shipping_first_name=="{shipping_first_name}"}{shipping_first_name}{/if} {if shipping_first_name==""}{first_name} {/if} {if shipping_last_name=="{shipping_last_name}"}{shipping_last_name}{/if} {if shipping_last_name==""}{last_name} {/if}
  • {if shipping_address=="{shipping_address}"}{shipping_address}{/if} {if shipping_address==""}{address} {/if}
  • {if shipping_address=="{shipping_address}"}{shipping_address2}{/if} {if shipping_address==""}{address2} {/if}
  • {if shipping_city=="{shipping_city}"}{shipping_city}{/if} {if shipping_city==""}{city} {/if}
  • {if shipping_state=="{shipping_state}"}{shipping_state}{/if} {if shipping_state==""}{state} {/if}
  • {if shipping_zip=="{shipping_zip}"}{shipping_zip}{/if} {if shipping_zip==""}{zip} {/if}

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

    Not the answer you're looking for? Browse other questions tagged or ask your own question.