I'm trying to get the country code for for an order to be saved in the orders channel. Currently, I have a step in the checkout process which uses the {exp:cartthrob:save_customer_info_form} tags to collect the customer's shipping info. Most of this information is somehow, in a way I don't understand, getting saved for each order (in the orders channel). That's exactly what I want but unfortunately the country code is not being saved with the rest of the address. How would the country code typically be saved to the orders channel and is there anything that I should check to see why it hasn't?

1 Answer 1


Are you sure you have mapped this field to the correct field in your orders channel?

Cartthrob > Orders > Order data fields > Shipping country code

Also, how are you capturing the country code in your template files? Can you provide a sample of your code? Are you using a text input field like this(?):

<input type="text" name="country_code" value="{customer_country_code}" />
  • Yep, that was the problem. I didn't have that particular field selected under "Order Data Fields". I guess that probably should have been pretty obvious but I was sort of banging my head over that one. Thank you very much!!!
    – user1011
    Apr 24, 2013 at 17:48
  • For what it's worth, I was using Cartthrob's: {exp:cartthrob:country_select name="shipping_country_code" selected="{shipping_country_code}"} tag inside save_customer_info_form and customer_info loops on my address page.
    – user1011
    Apr 24, 2013 at 17:54

Your Answer

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