I've got a working version of Commerce Registration (http://drupal.org/sandbox/jpontani/1300768) if anyone is interested in using/testing. Currently integrates with the alpha3 version, although depending on schema changes, I will update as necessary.

It currently doesn't have an interface for editing the registration settings for a particular product, but that is my next step. If you want to test you'll have to manually add settings into the DB directly (I know, crappy).

It will create registrations upon checkout completion. Some dirty code in there as well that I'm working on cleaning up.

Comments

mrfelton’s picture

Can you explain what we need to o to the db to test this please?

jpontani’s picture

Just add a record into registration_entity with the Commerce Product ID (not the sku, the actual ID) as the entity_id, entity_type is "commerce_product", and then set the rest to whatever you want.

mrfelton’s picture

Ok, and can you explain how the integration works? What should I expect to see? I mean, I did what you said, and I now see 'Unlimited slots available' on the add to dart form. But at what point will the user b prompted to provide the registration details? Would they be expected to use the standard registration form ar node/nid/register ?

jpontani’s picture

Use Drupal Commerce as usual.

If you don't already have a product display set up, create one with a product reference field (name it "commerce_product" for now, I'll be adding variable field name handling later today along with settings UI).

Add a Registration field to the commerce product type you want.

Create a product and set the Registration type, add a new product display with that reference, and add the settings to the DB as above.

Add the product to your cart, go through checkout process and after the User Information checkout page/pane, you get to the Registration Information page/pane. This pane has the registration fields in a fieldset according to the registration type you set for the product. It will also have multiple entries depending on the quantity of the line item (purchasing two registraitons? it has 2 sets of fields).

Once you get to review, there should also be a Registration Information pane with the entered info for each registrant.

mrfelton’s picture

Ok. Pretty much works. I didn't name my product reference field 'commerce_product' since I already had this field, but seemed to work ok regardless. Why did you suggest naming it 'commerce_product'?

One thing I noticed is that /admin/commerce/registrations still appears blank, even after completing a registration.

jpontani’s picture

The Registrations tab on the product display node is based on the node's field named "commerce_product" for now, as for the functionality of checkout/registrations, it works fine because I grab the product IDs from the form's field rather than the node's field.

I'll check the admin page, it's just using a view so you could essentially modify the view named "Commerce Registration Admin Registrations" to get it to show what you want.

levelos’s picture

@yjpontani, this is great, looking forward to checking it out. One comment/question. You mention,

Add a Registration field to the commerce product type you want.

Which I assume means that registrations must go through commerce in a given configuration. We were thinking there might be more flexibility in adding commerce product references to registration entities to enable both paid and unpaid registrations for the same event. At least that's a common use case for us. Think an admin wants to register someone w/o paying or something. Just brainstorming at this point ...

jpontani’s picture

I'll look into that route. It'll take a bit of time, waiting for DNS records to update as I just transferred webhosts :| so I don't have my testing site available currently, nor do I have local install of wamp.

mrfelton’s picture

I see. after setting up a new product reference called commerce_product, I can now see the registration data on the registrations tab and I can also see the embedded registration form on the node - nice.

EDIT - adding the registration form from the product entity onto the node display doesn't really work, as it bypasses the commerce part.

jpontani’s picture

adding the registration form from the product entity onto the node display doesn't really work, as it bypasses the commerce part.

Yea I realized that today actually. Going to fix that and remove that extra field from nodes but only on nodes that have a commerce product reference.

Default view should ideally be fixed as well so it loads right away. Forgot to update it to the new schema and not that schema I was using.

jpontani’s picture

UI is enabled for Commerce Products now. It's on the Add/Edit Product form. Had to copy the validate/submit handlers and modify them since Commerce Product form also has a field called 'status'. Tested on my test site and they save settings fine for both new and editing products and associated registration settings.

calhemp’s picture

many thanks I tried, and works well following your details. I'll test you more tomorow.

socialnicheguru’s picture

Will this setup an account for a user who is not part of the site once they pay for the signup to go back and check their order?

jpontani’s picture

No, but that is something that can be accomplished by Rules since Commerce already requires Rules to be enabled.

seanberto’s picture

Quick community update that jpontani, Acquia and the ThinkShout team will be sprinting on this integration at Capital Camp in DC at the end of the month. We're definitely working hard to smooth out this integration asap.

rerooting’s picture

Hey great to hear Sean! Might this somehow be connected with COD?

seanberto’s picture

Absolutely, Rerooting. We'll be sprinting in DC next week with jpontani, Erzag and others on the integration of Entity Registrations, Commerce Registration, and COD.

greggles’s picture

Title: Commerce Registration » Add Commerce Registration to Entity Registrations project page
Component: Miscellaneous » Documentation
Category: support » task

Any chance this could get added to the project page to make it easier to find?

seanberto’s picture

Status: Active » Fixed

Done! (Though, Joseph, you might also want to edit the Commerce Registration module page to use the correct name for the "Entity Registrations" module. No biggie though...)

Status: Fixed » Closed (fixed)

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