2

I have an issue that I have been wrestling with for a few months now. I have a B2B site that needs a separate "Drop-shipping" shipping address field from the default shipping address that comes with commerce shipping. The fields need to be different because the client wants the default shipping address field to be constrained to only items in the users address book (controlled by the client, not the customer and created by the site admin when adding new registered users) but allow the second "Drop-shipping" added field to be an editable address form for drop-shipped addresses.

So, using the module "Customer Profile Type UI" I created the "Drop-shipping Information" profile type. Using "Checkout Pages" module I created a new page named "Drop-shipping Information" positioned before the checkout page, with a drop-shipping check-box. It is obviously the first page the customer will see when entering the check-out process, and before the checkout page, so that I can capture a Boolean value that will drive which check-out pane ("Drop-shipping Information" or just "Shipping Information" address fields) are shown on the checkout page.Then I use rules and "Change pane properties" to disable the "Shipping Information" pane if the user has selected "Drop-shipping" on the first page, and vice-verse if not. All of that works properly.

The problem is, when "drop-shipping is selected and a valid address provided, when moving from the checkout page to the shipping services page (with UPS enabled and tested to return rates), it returns the rates for the "Shipping Information" address, and not the "Drop-shipping Information" address.

I realize that rules may only be hiding the default "Shipping Information address form (which is including a default shipping address from the customers account profile) ... but how do it make it use the address in the "Drop-shipping Information" address form instead?

Not sure what I am doing wrong, and I see no configuration options to change the behavior. Can someone tell me what I might be missing or perhaps provide an alternate method (that doesn't require custom coding) after reading the details of my requirements above? Either way, you should know that I am not a developer, and could use at least some mid-level instruction on what I have missed or need to do.

Thanks in advance for any serious help. :)

1

Commerce UPS calls commerce_physical_order_shipping_field_name($order) to determine what field holds the shipping profile for a given order. That means you can then use Commerce Physical's hook_commerce_physical_order_shipping_field_name_alter() to specify a per-order shipping profile field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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