Tuesday 28 February 2012

Add 'How many spaces left' to availability search in Rentalotplus Joomla

after my recent change to the Rentalotplus component Changing Joomla Rentalotplus component to take multiple bookings on each unit I've now made another small change so that after an 'availbility check' is made we can see how many spaces is left.

OPEN administrator/components/com_rentalotplus/models/booking.php

find the function checkForBookingOverlaps

before the closing
[code]
return true;
[/code]

ADD
[code]
$spaces = $maxPeople-$count;
$message = $spaces.JText::_("COM_RENTALOT_BOOKING_SPACES_LEFT");
[/code]

You'll need to add this to language/en-GB.com_rentalotplus.ini too

COM_RENTALOT_BOOKING_SPACES_LEFT=" spaces are left on this course."


and that's it :)

No comments: