We need to build a ticketing system for venue tours, that happen every week within certain date ranges, and with an option to exclude specific dates from the availability list.

Looking at Solspace Calendar, it offers almost exactly the fields we need for this out of the box: (screenshot below)

But I can't figure out how to either:

(1) Recreate this setup as fields on a Commerce product .

(2) Create a relationship between a Solspace Calendar event and a Commerce product (that only allows for a certain number of products to be sold for each date in the calendar).

enter image description here

  • So far I've got this: (1) Use Solspace Calendar to define each tour as a repeating event. (2) Then query that event list and display a Commerce "Buy product" form for each event occurance, with a hidden options param for the date/time (3) This means that the Commerce item has a "tour-date" options param when added to the cart / purchased, which stores the date/time Then just need something to prevent people purchasing a tour that has already been sold... not sure if querying already-placed orders for these date is madness... Commented Feb 11, 2019 at 15:35

1 Answer 1


I think you will have to get your hands a bit dirty with this one.

The Calendar Events fieldtype will get you part of the way, but you still need some module code to pull this off.

A suggested approach is:

  1. Create a product type with the Events fieldtype
  2. Create some module code that creates/updates a product + variants for each date, where the inventory is set to n.
  3. List the events as you would normally do, and pull in the products and its variants with the reverse relationship.

If the available number of tickets is always the same, you could have one field on the event where you enter the number.

If the amount of tickets vary by day, there is probably multiple approaches. Maybe a Matrix field that assumes position of block with quantity field === date in same position/with a date picker, maybe something else.

You can create a example module over at pluginfactory.io

  • Awesome thanks @Fred. Ticket availability is the same for every event. Commented Feb 13, 2019 at 14:39
  • Hey, did you get this to work? I need to build almost exactly the same thing and wasn't even aware of the need to limit the tickets for the events until I found this question… damn.
    – portnull
    Commented Mar 22, 2019 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.