In the checkout pane setting, when you place the shipping in between the shopping cart content and the billing information, you are not able to get the last updated billing information from the full order object in your custom shipping module.

So if your shipping calculation is relying on the billing address's country, if the user changes his billing information and go straight to the checkout order review, everything else take the new address in account (Taxes, display of the billing address), but the shipping calculation is still based on the previous address. You need to go back to the checkout form then the checkout review to see your shipping amount based on the new address.

Do you have any suggestion to access the actual last billing information other than through the order object ?

CommentFileSizeAuthor
#2 order-review.jpg27.62 KBDevline

Comments

googletorp’s picture

Status: Active » Fixed

This is untested, but should work.

$order = ??;
$order_wrapper = entity_metadata_wrapper('commerce_order', $order);
$profile = $order_wrapper->commerce_customer_billing->value();
$country = $order_wrapper->commerce_customer_billing->commerce_customer_address->country->value();
Devline’s picture

StatusFileSize
new27.62 KB

It's not delivering the right information. It seems like the address update is done after the address block is processed. So I let the shipping block below the billing address and fixed the output playing in between field display in views and some CSS. This appart, I totally agree with you that the table template is not the easiest one for that job...

Attached the final result in order review (I added also VAT on shipping... thanks to your module!)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Sushil_Drupal_developer’s picture

Category: support » bug
Priority: Normal » Critical
Status: Closed (fixed) » Active

I am also getting same error in my project.. Your billing information must match the billing address for the credit card entered below or we will be unable to process your payment.

googletorp’s picture

Issue summary: View changes
Priority: Critical » Normal
Status: Active » Fixed

This has been handled.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.