- Home
- Forum
- Community Forum
- Feature requests / Suggestions
- Implemented
- Experiences menu parameter: show upcoming items
- Forum
- Community Forum
- Feature requests / Suggestions
- Implemented
- Show the number of guests on invoice_customer_pdf.php
Show the number of guests on invoice_customer_pdf.php
- gmonamour
-
Topic Author
- Offline
Less
More
7 years 7 months ago #10197
by gmonamour
My site with Solidres www.gmonamour.it/
Show the number of guests on invoice_customer_pdf.php was created by gmonamour
Hi,
I need the number of guests on my personal invoice.
So I've tried to get it by using a piece of code kept from reservation_complete_customer_pdf.php fileBut it does not get the information.
I suppose that it is not supported on the invoice_customer_pdf.php file.
Could you help me to achieve that information?
Thanks a lot in advance
My best regards
I need the number of guests on my personal invoice.
So I've tried to get it by using a piece of code kept from reservation_complete_customer_pdf.php file
<?php foreach ($displayData['reservation']->reserved_room_details as $room) : ?>
<p>
<?php echo JText::_("SR_ADULT_NUMBER") . ': ' . $room->adults_number ?>
</p>
<?php if ($room->children_number > 0) : ?>
<p>
<?php echo JText::_("SR_CHILDREN_NUMBER") . ': ' . $room->children_number ?>
</p>
<?php foreach ($room->other_info as $info) : ?>
<ul>
<?php if (substr($info->key, 0, 5) == 'child') : ?>
<li>
<?php echo JText::_('SR_' . $info->key) . ': ' . JText::plural('SR_CHILD_AGE_SELECTION', $info->value) ?>
</li>
<?php endif; ?>
</ul>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
I suppose that it is not supported on the invoice_customer_pdf.php file.
Could you help me to achieve that information?
Thanks a lot in advance
My best regards
My site with Solidres www.gmonamour.it/
Please Log in or Create an account to join the conversation.
- solidres
-
- Offline
Less
More
- Posts: 2952
7 years 7 months ago #10205
by solidres
FAQ: www.solidres.com/support/frequently-asked-questions
Support Policy: www.solidres.com/support-policy
Replied by solidres on topic Show the number of guests on invoice_customer_pdf.php
Hi,
You can modify this file to query more information so that you can add it into your invoice template:
/plugins/solidres/invoice/invoice.php (method onSolidresGenerateInvoice())
Regards,
You can modify this file to query more information so that you can add it into your invoice template:
/plugins/solidres/invoice/invoice.php (method onSolidresGenerateInvoice())
Regards,
FAQ: www.solidres.com/support/frequently-asked-questions
Support Policy: www.solidres.com/support-policy
Please Log in or Create an account to join the conversation.
- gmonamour
-
Topic Author
- Offline
7 years 7 months ago #10223
by gmonamour
My site with Solidres www.gmonamour.it/
Replied by gmonamour on topic Show the number of guests on invoice_customer_pdf.php
Hi,
I'm not so good in PHP so your solution is too much difficult for me.
So, I thought to add this code in the invoice_customer_pdf.php fileIt works but I'm not be able to get the id of the reservation (that I need to put into $reservationId).
I've tried with thatBut the result is null
Could you help me to get the reservation id code, please?
Thanks a lot
I'm not so good in PHP so your solution is too much difficult for me.
So, I thought to add this code in the invoice_customer_pdf.php file
$database = &JFactory::getDBO();
$database->setQuery("SELECT children_number FROM #__sr_reservation_room_xref
WHERE reservation_id = '" . $reservationId . "'");
echo $database->loadResult();
I've tried with that
$reservationId = $displayData['reservation']->id;
Could you help me to get the reservation id code, please?
Thanks a lot
My site with Solidres www.gmonamour.it/
Please Log in or Create an account to join the conversation.
- solidres
-
- Offline
Less
More
- Posts: 2952
7 years 7 months ago #10225
by solidres
FAQ: www.solidres.com/support/frequently-asked-questions
Support Policy: www.solidres.com/support-policy
Replied by solidres on topic Show the number of guests on invoice_customer_pdf.php
Hi,
This variable is correct: $displayData->id
It is null because it need to be called via JLayout, not called directly, please refer to our existing code for more details.
Regards,
This variable is correct: $displayData->id
It is null because it need to be called via JLayout, not called directly, please refer to our existing code for more details.
Regards,
FAQ: www.solidres.com/support/frequently-asked-questions
Support Policy: www.solidres.com/support-policy
Please Log in or Create an account to join the conversation.
- gmonamour
-
Topic Author
- Offline
7 years 7 months ago #10230
by gmonamour
My site with Solidres www.gmonamour.it/
Replied by gmonamour on topic Show the number of guests on invoice_customer_pdf.php
Hi,
please, help me more, please!
Thanks a lot
please, help me more, please!
Thanks a lot
My site with Solidres www.gmonamour.it/
Please Log in or Create an account to join the conversation.
- gmonamour
-
Topic Author
- Offline
7 years 7 months ago #10231
by gmonamour
My site with Solidres www.gmonamour.it/
Replied by gmonamour on topic Show the number of guests on invoice_customer_pdf.php
Hi,
wait, maybe I am arrived!
wait, maybe I am arrived!
My site with Solidres www.gmonamour.it/
Please Log in or Create an account to join the conversation.
Moderators: solidres