On the 'Registration Information' page, if a user is only allowed to buy a registration for themselves, they should not be presented with the form for 'This registration is for:'. If there are no fields to be collected on the registration, this step should be skipped altogether, or if fields are to be collected, only that field collection should be shown.

So, in the case of this:
reg form

Do something like this:
alternate

Comments

jpontani’s picture

Status: Active » Needs review

Setting as needs review, don't have time to fully test it but I pushed a fix that should hopefully take care of this.

jpontani’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev

It's also part of 2.x dev, not the 3.x dev.

sheldonkreger’s picture

I installed 7.x-2.x-dev to test, but I can't find any option to disable registration for other people. Where can I find it?

jpontani’s picture

There is no option to disable it, it should do it automatically based on permissions. I'll try to test it myself later tonight.

twardnw’s picture

Issue tags: +da_drupalcon

I'm getting an error when I use the latest 2.x-dev

Notice: Use of undefined constant REGISTRATION_REGISTRANT_TYPE_SELF - assumed 'REGISTRATION_REGISTRANT_TYPE_SELF' in commerce_registration_information_checkout_form() (line 118 of /Users/twardnw/Sites/cod7.dev/sites/all/modules/commerce_registration/includes/commerce_registration.checkout_pane.inc).

(tagging as this relates to our current project)

twardnw’s picture

Status: Needs review » Needs work
StatusFileSize
new48.93 KB

screenshot

jpontani’s picture

Status: Needs work » Fixed
StatusFileSize
new976 bytes

Crap forgot to change that constant.

Attached patch should fix it.

twardnw’s picture

StatusFileSize
new35.1 KB

No more error from the constant, was the fix supposed to deal with any of the excess field groups on the form?

twardnw’s picture

Status: Fixed » Needs work
StatusFileSize
new38.62 KB

bah, got an error on the next page now

Warning: Illegal offset type in isset or empty in commerce_registration_information_checkout_form_validate() (line 278 of /Users/twardnw/Sites/cod7.dev/sites/all/modules/commerce_registration/includes/commerce_registration.checkout_pane.inc).
Warning: Illegal offset type in commerce_registration_information_checkout_form_validate() (line 288 of /Users/twardnw/Sites/cod7.dev/sites/all/modules/commerce_registration/includes/commerce_registration.checkout_pane.inc).
seanberto’s picture

Is this actually a Commerce Registration issue or an Entity Registrations issue? Joseph, you're really just embedding the registration form provided by the ER module, right? If that's the case, we should probably address the potential root issue in ER.

jpontani’s picture

There's a mix of both here. Currently I just use field_attach_form to attach the registration bundle fields on the checkout pane and add the form field for "who this registration is for" so I can do some other custom work alongside the form generator. This also allows me to ignore the form redirect from ER on the default registration form page since Commerce does the redirection for me.

As far as I'm aware this functionality is not yet available in ER but it definitely could be.

seanberto’s picture

Yeah, it's probably a question for Lev, but I would imagine that the select list should be adjusted in ER when only one type of registration is available for the Drupal user. (I've pinged him.)

jpontani’s picture

Eventually my goal is to just override the redirect and validation/submission handlers and then just embed the registration form provided by ER, I just wanted to hold off new features for 2.x until we could iron out some underlying architectural things first.

levelos’s picture

Project: Commerce Registration » Entity Registration
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: User interface » Registration Core
Assigned: Unassigned » levelos

This is primary an issue with Entity Registrations and there's a similar ticket, #1692490: Automatically select when only one available option in This registration is for. I'm going to move this longer thread into that project. and mark the other ticket as a duplicate.

levelos’s picture

Status: Needs work » Fixed

Fixed in a88867636cb7122a91715d7acd5c3cc4a37de586. Not related to the patches attached in this post re: Commerce Registration.

kevinquillen’s picture

I just downloaded and overwrote with the dev version, but I am still seeing 'This registration is for:' on the form for a regular user who does not have permission.

kevinquillen’s picture

Nevermind, didn't have the dev version of Commerce Registration, only Registration.

Status: Fixed » Closed (fixed)

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

mortona2k’s picture

Status: Closed (fixed) » Active

I'd like to use registration on a non commerce site. How can I use this feature (what is the plan for this module)?

kevinquillen’s picture

I believe you can. Commerce Registration is the bridge between Commerce and Entity Registrations.

seanberto’s picture

Status: Active » Closed (fixed)

  • levelos committed a888676 on 7.x-1.x, panels, any-entity, slots, integrations, hold_state
    #1670084: If a user is only allowed to buy a registration for 'myself'...