2 days deposit needed

More
6 years 6 months ago #5715 by kotsifas
2 days deposit needed was created by kotsifas
Hello, i want at the reservation process the customers always to pay 2 days deposit, (not percentage, not amount), as i have minimum stay 2 days. I mean to pay 2 days x room tariff.

First, is there a place to configure a minimum stay of 2 days?

Second, i guess i have to change the confirmationform.php from line 313 and below:
// Deposit amount, if enabled
					$isDepositRequired = $displayData['reservationDetails']->deposit_required;

					if ($isDepositRequired) :
							$depositAmountTypeIsPercentage = $displayData['reservationDetails']->deposit_is_percentage;
							$depositAmount = $displayData['reservationDetails']->deposit_amount;
							$depositTotal = $depositAmount;
							if ($depositAmountTypeIsPercentage) :
								$depositTotal = ($displayData['cost']['total_price_tax_excl_discounted'] + $displayData['cost']['tax_amount'] + $displayData['totalRoomTypeExtraCostTaxIncl']) * ($depositAmount / 100);
							endif;
							$depositTotalAmount = new SRCurrency($depositTotal, $displayData['reservationDetails']->currency_id);
							?>
							<tr class="nobordered">
								<td colspan="2" class="sr-align-right">
									<strong><?php echo JText::_("SR_DEPOSIT_AMOUNT") ?></strong>
								</td>
								<td class="sr-align-right gra noleftborder">
									<strong><?php echo $depositTotalAmount->format() ?></strong>
								</td>
							</tr>
							<?php
							JFactory::getApplication()->setUserState($displayData['context'] . '.deposit', array('deposit_amount' => $depositTotal));
						endif;

But i dont know how to do it. Could you please help?

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #5726 by vietvh
Replied by vietvh on topic 2 days deposit needed
Hi,

Yes, you can see option "Minimum length of stay" in Solidres Options page, the default value is 1.

You can use this code:
$depositTotal = ($displayData['cost']['total_price_tax_excl_discounted'] + $displayData['cost']['tax_amount'] + $displayData['totalRoomTypeExtraCostTaxIncl']) * 2;
$depositTotalAmount = new SRCurrency($depositTotal, $displayData['reservationDetails']->currency_id);

Hope this helps,

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #5732 by kotsifas
Replied by kotsifas on topic 2 days deposit needed
Hi,
we are almost there.... it is not
$displayData['totalRoomTypeExtraCostTaxIncl']) * 2
because this is multiplying the total cost of the reservation * 2.
I need the rooms' rate * 2.
(My rooms are per night, so if a rooms price is 44 euro, i need minimum deposit of two days, that is 44*2)

Thanks for your help, please help me just a little more ...

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #5733 by kotsifas
Replied by kotsifas on topic 2 days deposit needed
If it is something more complicated than i can imagine, then could you please send me a quote for this modification, as i needed so much?

Thank you

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #5735 by vietvh
Replied by vietvh on topic 2 days deposit needed
Hi,

Could you create a new support ticket with your website address, super admin account and FTP account, we are happy to check it for you.

Regards,

Please Log in or Create an account to join the conversation.

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?