The current system is completely database focussed, and doesn't respect exported checkout panes created from its own solution. Example:
If a fieldgroup+fields are added to the order entity, this module only allows a site builder to manually create and set them up. If a savvy user or developer were to export the field group + fields + checkout pane to code so that it could be preset on install, the current approach within the module would cause issues.
Fix?
In order to fix this we need to do 2 things:
1.) Move the hook_commerce_checkout_pane_info() to a hook_commerce_checkout_pane_info_alter() and manually alter our panes in if they don't exist (and NOT overwrite existing exported panes).
2.) Cease using $group->id in favor of $group->identifier. identifier is in the database and is unique and text based, unlike the $group->id which is essentially just a serial id number.
Hopefully this makes good sense. This module is GREAT. It'll be greater when it works with exported checkout panes ;-)
Eclipse
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | allow-exportable-checkout-pane-groups.patch | 1.93 KB | eclipsegc |
| allow-exportable-checkout-pane-groups.patch | 1.48 KB | eclipsegc |
Comments
Comment #1
eclipsegc commentedBetter patch. :-)
Comment #2
hunziker commentedMake sense to me. I commit it.
Comment #4
jantoine commentedI just wasted an hour resolving an issue where I was receiving an error when trying to save a pane that was created prior to this patch. An update hook that would have updated the pane_id for panes created prior to this patch would have been nice, and could still save someone else the trouble I went through.
Cheers,
Antoine