Events as products in Kentico 7

   —   
This document describes how to enable events to become products; it means how to enable attendees to pay for the event registrations.
First, download this package with already prepared code changes and extract it somewhere.

Please follow these steps:
  1. Backup your database.
  2. Copy contents of the WebProject folder to your web project folder.
  3. The \App_Code\CMSModules\Ecommerce\EventsProducts\  folder contains custom E-commerce providers. If you are already using such custom providers, you will need to merge their code. The folder name is optional, and you can move it within App_Code according your needs.
  4. Add CustomEventManager  project to your solution (open web project in Visual Studio -> File -> Add -> Existing project -> locate the project file).
  5. Add a reference to your web project BIN folder DLLs (CMS.DataEngine, CMS.Ecommerce, CMS.EventManager, CMS.GlobalHelper, CMS.SettingsProvider, CMS.Synchronization, CMS.DocumentEngine) in the CustomEventManager project,  then add a reference to the CustomEventManager project in the web project.
  6. Build the solution.
  7. Go to the CMS Site Manager -> Development -> Document types -> Event (booking system) -> E-Commerce  tab, and check Document type represents a product type box.
  8. Create a new product document of type “Event (booking system)”,  see Go to the CMS Site Manager -> Development -> Document types -> Event (booking system) -> Transformations tab, and modify or create transformation to show the button for adding a booking event to the shopping cart, see another product’s transformation for more details.
  9. Open ModifyAttendeesTable.aspx page in your web browser. Do that only once. No response will be shown if it runs correctly, however you can verify the result in the global Event log (class update event). This action will add two new columns to the Events_Attendee database table:
    • AttendeeOrderID – identifier of an order the event attendee is associated with
    • AttendeePaymentCompleted – indicates if attendee has already paid for the registration

Please note: Attendee payment status is updated when the corresponding order is paid:

scr.png

Applies to: Kentico CMS 7
Share this article on   LinkedIn

Juraj Ondrus

Hi, I am the Technical support leader at Kentico. I'm here to help you use Kentico and get as much as possible out of it.