rng
rng copied to clipboard
Drupal Commerce integration
I'm sure it's been thought about, but there wasn't an issue yet.
Integration with Drupal Commerce when it matures for D8 would seem vital.
Commerce is still in alpha and I personally wont be looking at requirements for RNG until at least beta. Depending on how domain-centric the integration is, it may be suitable to implement the integration in a middleman module dependent on both RNG and Commerce.
I remain open to plans or proposals.
Has there been any further movement on this issue given that Commerce is now in beta?
I dont have plans to address this. Patches, or preferably third party modules, welcome.
hi dpi
Where would one add code inside the rng code ecosystem for this sort of connector?
@marqpdx I ended up doing a pretty extensive integration between Commerce and RNG. I started it with the intent of being able to share it with the community however the integration was far too specific to really be generally applicable.
Note that none of the things I did required adding code to the RNG ecosystem. It can all be done by leveraging the Entity API and the EventSubscriber API w/in D8 as well as the CommerceCheckoutPane plugin ecosystem (which are....not exactly documented).
I can tell you that I had to do the following:
- Create a mechanism to map Product Variations Types to Registration Types
- I needed to collect information contingent on the Product Variation Type being purchased (e.g. an Exhibition Booth purchaser needed to select their booth location as well as the names/emails of the two registrants per booth). So I had to create custom CommerceCheckoutPane plugins to detect the need for and then collect this information.
- Once checkout was completed then I had to create EventSubscriber classes to take the collected data and create the appropriate Registration/Registrant/User|RNGContact.
Not at all a casual integration.
At this level of customization to be 100% candid all I'm really using RNG for is the entities that it provides. I'm not using any of the provided UIs...everything is populated and controlled programmatically.
I'm working on a similar thing now. I think that creation of the registration at purchase of a product variation would be a nice action or rule to be able to fire. And sync in information from the user's profile. But a lot of the details of syncing fields are going to be custom per site. But the sync action seems re-usable.
Hi, @chrisrikli - it sounds like you've done exactly what I want to accomplish. Would you be interested in sharing any of your custom code? Thanks! -Steve
I've got registrations happening on event checkout completion now. I've got to say, so far the implementation has been very pleasant--after initial configuration, it works great alongside my product entities and Commerce checkout workflow. I've got more to do (like open one small but blocking issue I found), but a huge kudos to @dpi and others for this awesome module!
Hi Steve,
Congrats! it would be great if you could share your work as an example to others.
On 21 June 2017 at 04:50, Steve Oliver [email protected] wrote:
I've got registrations happening on event checkout completion now. I've got to say, so far the implementation has been very pleasant--after initial configuration, it works great alongside my product entities and Commerce checkout workflow. I've got more to do (like open one small but blocking issue I found), but a huge kudos to @dpi https://github.com/dpi and others for this awesome module!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dpi/rng/issues/84#issuecomment-309955289, or mute the thread https://github.com/notifications/unsubscribe-auth/ADWYQS8y32SQi7TNFw9S5s0-jJilPjfDks5sGJLtgaJpZM4IBLRr .
Plus 1 for this @jonathanjfshaw
it would be great if you could share your work as an example to others.
Hi @heddn, code looks useful. Can you move this code to a Gist or a new Github repo.
Deleted comment, see gist in next comment
https://gist.github.com/heddn/119a439ead6189ddd6c835aa65c7348e
Hi @dpi, Do you plan to create a release that connect rng to commerce ? If so, do you have an idea about delay ? Many thanks for your work Christophe Bourgois
@chrisrikli, @steveoliver I would also be interested to see an example implementation of RNG with Drupal Commerce.
@MegaChriz Very much like @heddn's gist above. If you have any specific questions, feel free to ask in the Drupal Slack channel or on https://drupal.stackexchange.com/questions/tagged/rng and tag it with commerce.
Also, after doing integration on my project--which is quite light (config, access checks and register/deregister)--, I don't think there is going to be any generally useful module, since the integrations will probably vary wildly based on things like product, order, checkout flow and customer types plus other project-specific business logic.
Is there any documentation in how to set this up?
@heddn Could you attach a few words to what assumptions the above code snippet makes of the configuration of the commerce shop? what is the data relations between the order, the product etc.? and how have these been linked to an event?
I think I assume that the rng entity is called 'registration'. And users would be the ones registering.
@heddn - I am new to Drupal 8 and am looking for a payment mechanism to pay for RNG registrations in Commerce. Is your code supposed to be a standalone custom module? I just need to be able to sell tickets to events, pretty straightforward. I would be interested in understanding further how to implement your code, or possibly pay to have you put it into a module.
I've done extensive work on RNG / Commerce integration. Anyone interested, feel free to ping me on drupal.slack.com #commerce to discuss your specific use case(s).
@1959mvp feel free to contact me in slack as well. I'd be pleased to help you in any respect.
@steveoliver What is your slack name? We are going to work on a possibly similar case.
I've done extensive work on RNG / Commerce integration. Anyone interested, feel free to ping me on drupal.slack.com #commerce to discuss your specific use case(s).
Hi, I want to integrate RNG with susbscription(free or paid). How can I achieve?
@riturajgupta I have worked on a module for integrating RNG with Commerce: https://www.drupal.org/sandbox/megachriz/2940732
Part of the module is based on code shared by @chrisrikli.
I did not manage yet to make the module generic enough. Therefore it does make a few assumptions on your setup. There are also a few pieces missing, like making sure that the checkout panes get updated when adding, editing or removing registrants via AJAX. For my client, that part got too much tangled with business logic (read: site specific dependencies) so I had to leave that out for Commerce RNG.
But maybe it could help you as a starting point?
There is a published contributed product for this now currently in development: https://www.drupal.org/project/commerce_rng