Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Is this possible? write a rental module and link with availability / bookings calendar

Go to End

4 Posts   1964 Views


Community Member, 6 Posts

23 June 2008 at 10:17am

Hi there,

I recently installed silverstripe locally, and have to say it seems great so far.
I'm thinking of using it for a client website. It has everything i need except one item: The client wants to set up a few pages of products available to rent, and would like to allow visitors to view availability of items by date, and then make a booking.

Does the silverstripe structure / code allow for development of this type of module?
Or should i be looking at getting a custom system developed?

Any advice much appreciated


Community Member, 607 Posts

23 June 2008 at 1:49pm

Edited: 23/06/2008 1:49pm

Hi Podge,

This would be a custom jobbie for the most part on a few key points:

1. A new page type for each rental item
2. A new page type for holding and displaying a list view of rental items.
This tutorial should help with these two:

I used the above tutorial to build a similar solution for a client who sells travel tour packages. Each tour had a (huge) group of custom fields. I also added a new class for Tour Dates, which is a one-many relationship (again, see that tutorial) so uses can see availability.

The big difference is, my client didn't require a search by date, and the dates were set ranges (e.g. no availability checking is done) so:

3. A custom method in your search page that returns an object based on criteria. This can be acheived by using DataObject::get(), the details of which can be found here: I havn't implemented something like this before, so I am unsure of how to actually implement it sorry. Someone else might have some ideas or a different method. Personally, I would make a custom search page just for this purpose, so your general search is still usable.

4. Booking - again, I'm having to do a similar setup for my client, however they have only paid to have provisional booking details emailed to them and payments made manually. This suits them. What I did was on the Tour detail page (in your case the Rental Detail page) I have a big booking button that is simply a link with the id of the tour in the url. The subsquent page (a type I called TourBooking) uses that ID to pull out all the info for the tour using DataObject::get_by_id: I then use this to manually create a form with selectable elements pertaining to the Tour. (Like add-ons, date requested etc). This form then emails the booking details and saves a copy of it in plain text. Again, the client didn't pay for full integration of bookings to the CMS. You however, will need to do this, otherwise availabilty checking won't be possible.

5. Calendar - if you mean in the traditional 28/31 day displayed calendar, this would be a large job. I don't know if a plugin of sorts is available as yet. A very cool plugin to build would be Google Calendar integration however.

So yes, Silverstripe can do this, but be prepared for a learning curve and possible delays as the answers are not always apparent at first. My development has certainly had some hitches, but still a damn sight faster than trying to do the same from scratch, or Drupal (which is my old CMS of choice). I am still a week or so away from completion, but I'll be happy to share some of the code with you if it helps to get you understand the system faster. But the tutorial above formed the base of my entire customization.



Forum Moderator, 5523 Posts

23 June 2008 at 6:30pm

5. Calendar - if you mean in the traditional 28/31 day displayed calendar, this would be a large job. I don't know if a plugin of sorts is available as yet. A very cool plugin to build would be Google Calendar integration however.

As part of the Events Module there has been a calendar module released. Check that out for some guide on that part - . Its pretty bare bones at the moment, needs some development and testing to get it to production level I think but it should be a good start..


Community Member, 6 Posts

24 June 2008 at 12:55am

aaron, willr,

thanks for the detailed notes / pointers. think i'll go ahead with the silverstripe setup, and add in the rental module as an upgrade once the site is up and running. I won't be doing the module work myself. I mostly do xhtml / css, so i'm no php wizz.

Its great to know that the system is so versatile.