- Posts: 3
- Thank you received: 0
Campaign Title instead of 'JD_DONATION'
- schnön
- Topic Author
- Offline
- New Member
-
Less
More
12 years 8 months ago - 12 years 8 months ago #23378
by schnön
Campaign Title instead of 'JD_DONATION' was created by schnön
Hi there,
is there a way to output the title of the current campaign (which can be entered if you
start a new campaign in the Joomla BE) over the Donation Form?
I tried an override of:
com_jdonations/views/donation/tmpl/donation/default.php
Line 19, JText::_('JD_DONATION') gives us here the given string of the language
file. I am looking something like (pseudo code -> )
Kind regards,
tony
is there a way to output the title of the current campaign (which can be entered if you
start a new campaign in the Joomla BE) over the Donation Form?
I tried an override of:
com_jdonations/views/donation/tmpl/donation/default.php
Code:
<h1 class="title"><?php echo JText::_('JD_DONATION'); ?></h1>
Line 19, JText::_('JD_DONATION') gives us here the given string of the language
file. I am looking something like (pseudo code -> )
Code:
<h1 class="title"><?php echo JText::_('JD_campaignTitle); ?></h1>
Kind regards,
tony
Last edit: 12 years 8 months ago by schnön.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 8 months ago #23399
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Campaign Title instead of 'JD_DONATION'
Hi Tony
Do you know PHP ? If Yes, please follow the instruction below :
1. Open the file components/com_jdonation/views/donation/tmpl/default.php (I think you know that file).
2. Add the php code below to the top of file :
3. After that, change the code to :
Hope this help .
Tuan
Do you know PHP ? If Yes, please follow the instruction below :
1. Open the file components/com_jdonation/views/donation/tmpl/default.php (I think you know that file).
2. Add the php code below to the top of file :
Code:
$db = JFactory::getDBO();
$sql = 'SELECT title FROM #__jd_campaigns WHERE id='.(int) $this->campaignId;
$db->setQuery($sql);
$campaignTitle = $db->loadResult();
3. After that, change the code to :
Code:
<h1 class="title"><?php echo $campaignTitle ? $campaignTitle : JText::_('JD_DONATION'); ?></h1>
Hope this help .
Tuan
Please Log in or Create an account to join the conversation.
- schnön
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
12 years 8 months ago - 12 years 8 months ago #23420
by schnön
Replied by schnön on topic Re: Campaign Title instead of 'JD_DONATION'
Hi Tuan,
thanks a lot for your reply.
It´s nearly working but.
has always value 0. Thus I always get the same title.
Any clue?
Kind Regards,
Toni
thanks a lot for your reply.
It´s nearly working but.
Code:
$this->campaignId;
has always value 0. Thus I always get the same title.
Any clue?
Kind Regards,
Toni
Last edit: 12 years 8 months ago by schnön.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 8 months ago #23462
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Campaign Title instead of 'JD_DONATION'
Hi Toni
I think in this case, you should submit a support ticket sending me administrator and FTP account of your site so that I can check and solve it for you.
Tuan
I think in this case, you should submit a support ticket sending me administrator and FTP account of your site so that I can check and solve it for you.
Tuan
Please Log in or Create an account to join the conversation.
- schnön
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
12 years 8 months ago #23463
by schnön
Replied by schnön on topic Re: Campaign Title instead of 'JD_DONATION'
Hi Tuan,
thanks for your reply and help!
Will open a ticket!
Cheers,
Tony
thanks for your reply and help!
Will open a ticket!
Cheers,
Tony
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 8 months ago #23467
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Campaign Title instead of 'JD_DONATION'
Hi Tony
I had to edit the XML file under the components/com_jdonation/views/donation/tmpl folder alitle so that the campaign parameter can be saved. Everything works well now. Please go to your site to check it and let me know the result !
If it is possible, please help me by giving Joom Donation a 5 stars rating and a nice review at extensions.joomla.org/extensions/e-commerce/donations/7094 to support my development.
Tuan
I had to edit the XML file under the components/com_jdonation/views/donation/tmpl folder alitle so that the campaign parameter can be saved. Everything works well now. Please go to your site to check it and let me know the result !
If it is possible, please help me by giving Joom Donation a 5 stars rating and a nice review at extensions.joomla.org/extensions/e-commerce/donations/7094 to support my development.
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Dang Thuc Dam, Dang Dam
Support
Documentation
Information
Copyright © 2025 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.