Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Order
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2012 at 10:11 UTC
Updated:
4 Nov 2012 at 22:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
vasikehere is a patch
i don't know if this should be the solution, or it's ok to have this field unlocked and to fix the bug within checkout module.
Comment #2
rszrama commentedWe actually don't require this on purpose, allowing sites to remove the default billing profile association if they so choose. In that case, I'm guessing checkout was broken for you because you were still showing the billing information checkout pane. If you disable that, it should not provide errors, or if you were to add a different customer profile reference field to your order bundle, then you could update the checkout pane settings to use that field instead.
Perhaps the real fix here to preserve this behavior would be to disable the billing information checkout pane if the customer profile reference field it's been configured to use is removed from the order bundle.
Comment #3
vasikei see,
so where do you think this fix should take place, in which module? checkout or customer?
Comment #4
vasikethere's something else:
I delete the Customer Billing field.
I save the 'Billing information' checkout pane with NO Related customer profile reference field
I go the checkout page
Surprise i have the Billing information inputs right in the checkout form.
and The data is saved the Address (commerce_customer_address) field tables.
How it should be the right way?
I' m thinking to have a validation for this Customer checkout pane and disable it if there's no Related customer profile reference field selected.
Comment #5
rszrama commentedSounds like we should also then make sure that pane is not enabled without a valid reference field selected. : D
We can patch both of these issues in the Customer module.
Comment #6
vasikehere is patch for this (rough stuff).
i found 2 more cases:
Comment #7
cvangysel commentedI'll have a look at this.
Comment #8
cvangysel commentedI cleaned up the code a bit and removed some of the hacky stuff. The only thing I don't necessarily like about my patch is that the error message when trying to move a customer profile pane that hasn't got a customer profile referenced is a little general.
But then again, when you're deleting entity fields I guess you should know what it is you're doing.
Comment #9
joshmillerPatch looks clean; Confirmed bug (wow!); Applied patch; Bug immediately fixed; Re-installed site and bug is non-existant.
All is well and bug is gone. Love the hook_field_delete_field() ... not sure what it does or why it's necessary.
Comment #10
rszrama commentedAlrighty, in she goes. As for that function, Josh, it basically updates any checkout panes that may have been based on the customer profile reference field to disable them. And agreed w/ Christophe - if you're deleting these fields, you should know what you're doing. No need to go overboard on the error messages. : )
Thanks to vasike for starting this out and the others for driving it home.