Here's a quick core change. What I need to do was to add a column in the Finacial Report view in Rentalotplus. it's as easy as this
OPEN
administrator/components/com_rentalotplus/views/finacial/view.html.php
FIND
[code]<th class="title" nowrap="nowrap"><?php echo JText::_('COM_RENTALOTPLUS_FROM_DATE');?></th>[/code]
AND BEFORE IT ADD
[code]<th class="title" width="20"><?php echo JText::_('COM_RENTALOTPLUS_ID'); ?></th>[/code]
FIND
[code]echo "<tr class='row$k'>
<td>$row->date_from</td>[/code]
REPLACE WITH
[code]echo "<tr class='row$k'>
<td>$row->id</td>
<td>$row->date_from</td>[/code]
Monday, 27 February 2012
Monday, 20 February 2012
how do i find out my sandbox paypal account tokens
how do i find out my sandbox paypal account tokens
paypal secure merchant account id
Whilst setting up a test account I needed a Paypal Account token, but thanks to Payals help search being broken this took longer than I expected.
The solution was that after creating a Paypal Sandbox account
> login
> on the left hand menu click on 'API credentials'
> then in the main screen copy the code that is in your signature.
paypal secure merchant account id
Whilst setting up a test account I needed a Paypal Account token, but thanks to Payals help search being broken this took longer than I expected.
The solution was that after creating a Paypal Sandbox account
> login
> on the left hand menu click on 'API credentials'
> then in the main screen copy the code that is in your signature.
Sunday, 19 February 2012
Changes to Rentalotplus that I'd like to make.
Merging the Calendar with the Availability Check
Stage1: Login ->
Stage1: Login ->
Stage 2: click on the training link ->
Stage 3: -> click on 'book now'
Stage 4: and then choose the dates you want and check availability.
###############
what I'd like to happen is for Stage 3 &4 to be merged. and the page to look like this.
The two view pages that need to be merged are here.
the Check is called from inside the Daily view in the scenario above.
Thursday, 16 February 2012
Changing Joomla Rentalotplus component to take multiple bookings on each unit
Suitable for single user booking systems only
The aim here is to take have a unit/training centre where we can book multiple places ( number set in admin ) on various dates.
As rentalot is a booking system it's designed to book for groups and families, in my scenario users will only be booking for themselves and never for groups .
If your system is for booking groups then the following hack is of no use.
When installed and using the Daily view the process works like
> You see the calendar that shows you available dates
> You see the calendar that shows you available dates
> on the next page you select the dates and click on the 'availability' check
> this then activates the check. it's this check that I've changed and therefor
allowing multiple bookings on the same unit on the same day.
Following the breadcrumbs back from the view I found where to enter the solution in
administrator/components/com_rentalotplus/models/booking.php
if you add the following function to this class
[code]
function maxPeople()
{
$unit_id = $this->_data->unit_id;
$sql="SELECT max_people FROM m37hf_rentalot_plus_units WHERE id='".$unit_id."' ";
$this->_db->setQuery($sql);
$Result = $this->_db->loadObjectList();
//echo "$sql";
//print_r($Result);
return $Result;
}
[/code]
and then find 'function checkForBookingOverlaps'
UNDER $count = count($rows);
ADD
[code]
//find out how many spaces in the unit
$unitspaces = $this->maxPeople(); //DJ
$maxPeople=$unitspaces[0]->max_people;
$maxPeople=$maxPeople-1;
[/code]
then find the condition ($count != 0' )
and change this to
($count > $maxPeople)
Here's a pdf of Changing Joomla Rentalotplus component to take multiple bookings on each unit if it helps anyone.
Wednesday, 15 February 2012
Rentalot Plus calendar not working in Joomla 1.7
I've installed rentalotplus on a joomla 1.7 installation and did not have the calendar when checking for Availability.
It was working on a 2.5 installation but I've had to go back to 1.7 as the commumnity builder component would not install on 2.5
Here's an image of what was happening.
the solution is to log into the admin area.
Go to
> components
> rentalot
> configuration
> general
and then navigate down to the 'Site date picker' dropdown and change this. One of them should work for your site. For me it was JQuery
It was working on a 2.5 installation but I've had to go back to 1.7 as the commumnity builder component would not install on 2.5
Here's an image of what was happening.
the solution is to log into the admin area.
Go to
> components
> rentalot
> configuration
> general
and then navigate down to the 'Site date picker' dropdown and change this. One of them should work for your site. For me it was JQuery
Tuesday, 14 February 2012
Making some changes on a Joomla MVC Component.
I thought I'd write a blog about some changes paid to get made to the Rentalotplus component last week. To be honest my requirements must have been lost in translation as the results weren't a working example of what I needed. However I do feel the code is of note.
The result of the changes do this . * make a row check of bookings in the database
* if there has been too many bookings then the 'Book Now' button will not show.
Here's the code changes.
OPEN models/classic.php
in the function &getData
ADD
$result = $this->totalBooking($unit_id);
UNDERNEATH
$this->stats_hit($unit_id);
AFTER THE CLOSING BRACKET OF THAT FUNCTION ADD
function totalBooking($unit_id)
{
$sql="SELECT COUNT(unit_id) AS totalRecord FROM m37hf_rentalot_plus_bookings WHERE unit_id='".$unit_id."'";
$this->_db->setQuery($sql);
$Result = $this->_db->loadObjectList();
//print_r($Result);
return $Result;
}
// --
the OPEN views/daily/view.html.php
FIND the line
$classic_model = $this->getModel('classic');
AFTER ADD
$itemstext = $classic_model->totalBooking($unit_id); //GHRIX
$totalBooking=$itemstext[0]->totalRecord;
$unit_model = $this->getModel('unit');
$unit_data = $unit_model->getOne($unit_id);
$max_people = $unit_data->max_people - 1;
if($totalBooking<$max_people) { $book_button = $menu_params->get('book_button', 'yes');
}
else
{
$
book_button = '';
}
#####
Basically in the Model view we load the data with the information about how many reservations have been made for this unit.
Then in the view we retrieve that information .
$classic_model has already been used to load the data from the model
* so we then use $itemstext to get the 'totalBooking' infromation from that data.
* its an array though so using $itemstext[0] gets the number we're after
* using the getModel('unit') we can access the unit information that we need for comparison.
* the comparrison is done and button displayed if we need it to be.
the only thing is that it doesn't really do anything as for it to be in anyway of use I'll need to put a date check on the mysql call and we'll need to change the check on the availability check on the following page.
The result of the changes do this . * make a row check of bookings in the database
* if there has been too many bookings then the 'Book Now' button will not show.
Here's the code changes.
OPEN models/classic.php
in the function &getData
ADD
$result = $this->totalBooking($unit_id);
UNDERNEATH
$this->stats_hit($unit_id);
AFTER THE CLOSING BRACKET OF THAT FUNCTION ADD
function totalBooking($unit_id)
{
$sql="SELECT COUNT(unit_id) AS totalRecord FROM m37hf_rentalot_plus_bookings WHERE unit_id='".$unit_id."'";
$this->_db->setQuery($sql);
$Result = $this->_db->loadObjectList();
//print_r($Result);
return $Result;
}
// --
the OPEN views/daily/view.html.php
FIND the line
$classic_model = $this->getModel('classic');
AFTER ADD
$itemstext = $classic_model->totalBooking($unit_id); //GHRIX
$totalBooking=$itemstext[0]->totalRecord;
$unit_model = $this->getModel('unit');
$unit_data = $unit_model->getOne($unit_id);
$max_people = $unit_data->max_people - 1;
if($totalBooking<$max_people) { $book_button = $menu_params->get('book_button', 'yes');
}
else
{
$
book_button = '';
}
#####
Basically in the Model view we load the data with the information about how many reservations have been made for this unit.
Then in the view we retrieve that information .
$classic_model has already been used to load the data from the model
* so we then use $itemstext to get the 'totalBooking' infromation from that data.
* its an array though so using $itemstext[0] gets the number we're after
* using the getModel('unit') we can access the unit information that we need for comparison.
* the comparrison is done and button displayed if we need it to be.
the only thing is that it doesn't really do anything as for it to be in anyway of use I'll need to put a date check on the mysql call and we'll need to change the check on the availability check on the following page.
Tuesday, 7 February 2012
joomla 1.7 cb install Unable to find install package
the first thing you should try if you get the message 'Unable to find install package' while installing Community Builder on 1.7 is upload the folder 'com_comprofiler' into your 'tmp' folder . And then use the install from folder function in Component installer.
It work for me anyway :)
It work for me anyway :)
Subscribe to:
Posts (Atom)