- Posts: 14
- Thank you received: 0
how can I attached an invoice to the email
- alex
- Topic Author
- Offline
- New Member
-
Less
More
10 years 1 month ago #76639
by alex
how can I attached an invoice to the email was created by alex
Hello,
Some of my events are free via coupon or membership group type discount so in some cases the invoice in amount of 0 I want to send the invoice in any case even if the amount of the invoice is 0.
how can I configure it ?
thank you/
Some of my events are free via coupon or membership group type discount so in some cases the invoice in amount of 0 I want to send the invoice in any case even if the amount of the invoice is 0.
how can I configure it ?
thank you/
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
10 years 1 month ago #76640
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic how can I attached an invoice to the email
Hi Alex
You will need to edit code to have that behavior. Please follow instructions below to edit the code:
1. Open the file components/com_eventbooking/helper/helper.php
2. Find this function
3. Change the code to
With that change, invoice will be always be generated. And it should solve your issue
Suggest that you download latest version and upgrade it to your site before making the change as I fixed an issue with invoice feature today
Regards,
Tuan
You will need to edit code to have that behavior. Please follow instructions below to edit the code:
1. Open the file components/com_eventbooking/helper/helper.php
2. Find this function
Code:
public static function needInvoice($row)
{
if ($row->amount > 0 || $row->total_amount > 0)
{
return true;
}
$config = self::getConfig();
if ($config->multiple_booking)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('SUM(total_amount)')
->from('#__eb_registrants')
->where('id=' . $row->id . ' OR cart_id=' . $row->id);
$db->setQuery($query);
$totalAmount = $db->loadResult();
if ($totalAmount > 0)
{
return true;
}
}
return false;
}
3. Change the code to
Code:
public static function needInvoice($row)
{
return true;
}
With that change, invoice will be always be generated. And it should solve your issue
Suggest that you download latest version and upgrade it to your site before making the change as I fixed an issue with invoice feature today
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- alex
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 0
10 years 1 month ago #76642
by alex
Replied by alex on topic how can I attached an invoice to the email
I haven't made the changes yet but are you sure you made any changes?
please see the screenshot it after the last update from today
:blink:
please see the screenshot it after the last update from today
:blink:
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
10 years 1 month ago #76643
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic how can I attached an invoice to the email
I am going to check it tonight my time to see whether I made any changes to the extension causes this issue. I will get back to you in the next few hours
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
10 years 1 month ago #76704
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic how can I attached an invoice to the email
Hi Alex
I fixed this issue in latest download package on server. Could you please access to My Downloads menu item, download latest version from My Downloads section, upgrade it to your site and check it again ?
Regards,
Tuan
I fixed this issue in latest download package on server. Could you please access to My Downloads menu item, download latest version from My Downloads section, upgrade it to your site and check it again ?
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.