Checkout form validation: alter the value of a commerce customer profile
In my checkout form, I have 2 customer profiles: billing (default) and shipping (from commerce shipping module).
Basically, I need to emulate the commerce_shipping 7.x-1 option "copy shipping information from billing", but i need to do that manually in a validation function (the values depends from few factors).
so: how to change the values of a customer_profile address field in the validation function?
function MYMODULE_form_commerce_checkout_form_checkout_alter(&$form, &$form_state, $form_id)
function _MYMODULE_validate_checkout($form, &$form_state)
// a custom checkbox i
if($form_state['values']['b2s'] == 1)
// here, for example, i have to copy all the values from billing address to shipping address
I tryed many ways, but nothing works