Hi,
on the site I build users can register for events but no extra information is required. Only authenticated users are allowed to register and they can register only themselves. So on the Registration page I have only the text "Registration Information You are registering: Myself" and the button "Continue to next step".
How can I skip this page but still have the registration created for the user?
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | skip_registration_page_when_no_registration_required-2057497-4.patch | 1.66 KB | imclean |
Comments
Comment #1
aaronbaumanThis is a feature request.
If no input is required from the user, the registration page should be skipped automatically.
User should not be forced to submit an empty form.
Closed 2 other issues on this one.
Comment #2
blacklabel_tom commentedHi Aaron,
Something similar to this:
http://www.nextide.ca/skip_drupal_commerce_checkout_page
Is something I'm using on a site I'm working on, but haven't had a chance to patch in.
Patches welcome and thanks for cleaning up the issue queue.
Cheers
Tom
Comment #3
imclean commentedPotentially related problem:
#2101381: Registration attaching itself to all content/product types
Comment #4
imclean commentedBased on the link in #2, this patch loads each product and checks for the registration field. I'm not sure what the performance implications would be for large carts but seems to be quick enough for smaller ones.
Comment #5
imclean commentedUpdate status.
Comment #7
blacklabel_tom commentedThis was almost the same solution I had for the site I was working on.
Committed :)
Comment #9
maddentim commentedThis commit is causing my project to crash when you try to go from the billing info screen to the payment methods screen.
The log has
EntityMetadataWrapperException: Missing data values. in EntityMetadataWrapper->value() (line 83 of /.../sites/all/modules/entity/includes/entity.wrapper.inc).I am not particularly familiar with EntityMetadataWrapperException so I don't have much to add other than it fails with the patch. It could be something in my project, but I haven't hacked the module myself beyond applying patches from the dev branch.
Comment #10
acrazyanimal commentedLooks like the committed patch uses some assumptions about the type of line items being used and the fields on the products that contain the registration. The code definitely needs to be fixed up to make it a little more generic and function in possible scenarios like if someone created a product type the doesn't use a field with the machine name
field_registrationor if the order was created through the admin ui first and the line items don't happen to have the$order->data['context']property set as I discovered with this error:Notice: Undefined index: context in commerce_registration_commerce_checkout_router() (line 1352 of /home/jesse/data/www/dm7/sites/cce/modules/contrib/commerce_registration/commerce_registration.module).Comment #11
acrazyanimal commentedI've added a new issue #2654348: Fix some bad assumptions in hook_commerce_checkout_router() for fixing the follow up issues since the original code here was already committed.
@maddentim could you please let me know if the patch in the follow up issue resolves the problem you were seeing? I was not able to reproduce your exact issue.
Comment #12
acrazyanimal commentedComment #13
maddentim commentedOK. Will do. Thanks.
Comment #14
acrazyanimal commented@maddentim actually I was able to reproduce the issue when a line item had its registration disabled via the product. Refreshing the cart causes the issue you are seeing. I have opened a new issue as it was not related to this patch specifically.
See #2654590: Implementation of hook_commerce_cart_order_refresh causes EntityMetadataWrapperException
Comment #15
acrazyanimal commented@maddentim Another correction. I was trying to fix it and it actually is not possible in commerce_registration. It seems it happens if commerce_rules_extra and commerce_registration are enabled. The only logical fix I could come up with was to patch the commerce module. The issue and patch to fix it are here: #2655184: Ensure the latest revision of an order is loaded before checkout routing. It would be great to have someone RTBC it.
Comment #16
maddentim commented@acrazyanimal hmmm. I don't have commerce_rules_extra in this project... I do have commerce_extra though. Maybe I should disable it and test.