Events as products in Kentico 6

   —   
This article 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.

Now, please follow these steps:
  1.  Back up your database.
  2. Copy content of the WebProject folder to your web project folder.
  3. Copy content of the CustomEcommerceProviders to your App_Code/CMSModules/Ecommerce/Samples folder to register custom ecommerce providers. If there are already some of the files, you will need to merge the differences.
  4. Add CustomEventManager project to your solution (open web project in Visual Studio -> File -> Add -> Existing project -> locate the project file) and set its required references to your existing DLLs in your BIN folder (CMS.DataEngine, CMS.Ecommerce, CMS.EventManager, CMS.GlobalHelper, CMS.SettingsProvider, CMS.Synchronization, CMS.TreeEngine).
  5. Add a reference to the CustomEventManager to your BIN folder.
  6. Rebuild the solution.
  7. Go to the CMS Site Manager -> Development -> Document types -> Event (booking system) -> General tab and check Document is product type box.
  8. Create a new product document of type Event (booking system)
  9. Go to the CMS Site Manager -> Development -> Document types -> Event (booking system) -> Transformations tab and modify an existing or create a new transformation to show the button for adding a booking event to the shopping cart. You can take inspiration in another product document type's transformations.
  10. Open ModifyAttendeesTable.aspx (http://<yourdomain>/ModifyAttendeesTable.aspx) page in your web browser. This will add two new columns to the Events_Attendee database table (these fields will be also visible in the event attendees list):
    • 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.
-jo-


See also: Events as products for previous Kentico CMS versions

Applies to: Kentico CMS 6
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.