[TH] Donate [Deleted]

How can I change the "Donate" link in the top breadcrumb to say "No Ads"? If someone donates they don't see ads for a year.
Add donation benefits in the campaign description in Donate > Campaigns > Add or Edit campaign > Description.
 
I have a good suggestion for this addon.

It would be really interesting to be able to choose this addon as a payment profile.

That way, when a user tries to upgrade their account, instead of being directed to an existing standard payment profile, they will be directed to a custom URL to make a donation.

I don't use payment profiles on my forum, but I need to have one active so that I can make the option and the explanatory texts related to it available. Paypal has fees that are a bit high in my country, so I prefer the PIX system that is free here, but there is no option of that type in Xenforo's options.

I would really like to use the Profile Upgrades option WITHOUT the payment profiles that Xenforo offers. There are few options and none of them are useful to me.

The idea is to use [TH]Donate to be a redirecting URL to the main donation page.

In the image below, I always put a warning that no one should use Paypal, only the PIX system that is shown on the addon's main page.

I only leave this option available because I use the upgrades in the accounts.


1729540345105.webp
 
It would essentially need an entirely new addon to do that as the Donate addon itself uses XenForo’s payment providers the same as user upgrades do. For it to be a payment provider itself, the addon would have to essentially be mostly rewritten and would have to interface with PIX, which would be a very specific integration for it to be based around.

What you need is a payment provider built for PIX. It would be easy enough to redirect users there (which is how PayPal works), the thing you’d need to figure out is if it has webhooks to notify XenForo of payments. If it does, then you’d be able to use it as the payment provider for both Donate and user upgrades, and it would be a fully native payment provider. That would be the correct way to achieve what you’re trying to do here.
 
In Brazil, PIX is not a specific payment provider. It is a system. It is used by all banks here. If you have an account at a bank in Brazil, you can create a "Pix Key" which can be a phone number, an email or even a randomly generated key. People can use this key to send payments instead of a regular bank transfer.

With PIX, in addition to there being no fees, it can be for any amount, and the money is instantly deposited into the destination account, even on weekends. It has become the best payment method because it is integrated with all banks here and for free. So for this reason, there are no webhooks because it is a system that is only available at banks.

My idea would be to simply redirect Payment Profiles to the Donates page, without anything as complex as integrations or webhooks. I just wish I could not need to use Paypal, which I currently use in Xenforo, because there is no option to create an upgrade for profiles without using a Payment Profile.

I say this because sometimes some people try to upgrade using Paypal before reading the Donate page.

As a result, out of the 5.00 I could receive as a donation, I receive 4.16 because of Paypal's fees. And because I have a non-corporate account, Paypal does not provide an option for Xenforo to automatically process the payment for an upgrade to me.

In the end, it makes no difference whether someone pays via Pix or Paypal for them. They have to let me know anyway because there is no automatic upgrade from the system.

And with Pix it is still free for me. That's why I don't want to use Paypal.
 
In Brazil, PIX is not a specific payment provider. It is a system. It is used by all banks here. If you have an account at a bank in Brazil, you can create a "Pix Key" which can be a phone number, an email or even a randomly generated key. People can use this key to send payments instead of a regular bank transfer.

With PIX, in addition to there being no fees, it can be for any amount, and the money is instantly deposited into the destination account, even on weekends. It has become the best payment method because it is integrated with all banks here and for free. So for this reason, there are no webhooks because it is a system that is only available at banks.
Seems like there is: https://developers.openpix.com.br/docs/webhook/platform/webhook-platform-api
My idea would be to simply redirect Payment Profiles to the Donates page, without anything as complex as integrations or webhooks
That's what I'm saying though, it's just not how the payment process works in XenForo. Donate uses payment profiles to take the donations, for it to try and act as one itself would be fundamentally changing the architectural concept of the addon. The donations only get created when the payment webhook comes in and there would be no way to know if a payment has been made otherwise. Using this or really any other addon to take the payment isn't the right approach and isn't something we'd be looking to do I'm afraid.

As it does seem that Pix does offer webhooks, a fully native payment provider would be the far better approach, and then you wouldn't need to have PayPal set up, you'd just add Pix. Or, just edit the templates for the user upgrade list, remove the button to go to PayPal, and add a link to the donations page if that would do what you need.
 
I had never heard of this open pix. I'll check it out. Thanks for the tips.

EDIT: Oh, I saw it here. It's also something paid. It's not "official", but a company that provides this kind of service. :(
 
When I try to rebuild all cache, the addon is giving an error.

Error: Call to a member function getCommentTitle() on null in src/addons/ThemeHouse/Donate/Entity/Comment.php at line 294
  1. ThemeHouse\Donate\Entity\Comment->getCommentTitle() in src/addons/ThemeHouse/Donate/Search/Data/Comment.php at line 33
  2. ThemeHouse\Donate\Search\Data\Comment->getIndexData() in src/XF/Search/Search.php at line 63
  3. XF\Search\Search->index() in src/XF/Search/Search.php at line 89
  4. XF\Search\Search->indexEntities() in src/XF/Search/Search.php at line 126
  5. XF\Search\Search->indexRange() in src/XF/Job/SearchRebuild.php at line 69
  6. XF\Job\SearchRebuild->run() in src/XF/Job/Manager.php at line 275
  7. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 205
  8. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 121
  9. XF\Job\Manager->runByIds() in src/XF/Admin/Controller/ToolsController.php at line 146
  10. XF\Admin\Controller\ToolsController->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 362
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
  12. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2813
  15. XF\App->run() in src/XF.php at line 802
  16. XF::runApp() in admin.php at line 15

When the addon is activated, it is breaking the entire forum layout. I don't know what is happening. I can only use the forum and browse normally when I deactivate the addon.

1732229285660.webp
 
I managed to solve the layout problem. The forum returned to normal after completely disabling the Addon.

I will post the error message here.

  • Error: Call to a member function getCommentTitle() on null
  • src/addons/ThemeHouse/Donate/Entity/Comment.php:294
  • Generated by: Hareon
  • 21 de Novembro de 2024 às 19:46

Rastreamento de pilha​

#0 src/addons/ThemeHouse/Donate/Search/Data/Comment.php(33): ThemeHouse\Donate\Entity\Comment->getCommentTitle()
#1 src/XF/Search/Search.php(63): ThemeHouse\Donate\Search\Data\Comment->getIndexData(Object(ThemeHouse\Donate\Entity\Comment))
#2 src/XF/Search/Search.php(89): XF\Search\Search->index('thdonate_commen...', Object(ThemeHouse\Donate\Entity\Comment))
#3 src/XF/Search/Search.php(126): XF\Search\Search->indexEntities('thdonate_commen...', Object(XF\Mvc\Entity\ArrayCollection))
#4 src/XF/Job/SearchRebuild.php(69): XF\Search\Search->indexRange('thdonate_commen...', 0, 5000)
#5 src/XF/Job/Manager.php(275): XF\Job\SearchRebuild->run(8)
#6 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#8 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#9 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#11 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#12 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2813): XF\Mvc\Dispatcher->run()
#14 src/XF.php(802): XF\App->run()
#15 admin.php(15): XF::runApp('XF\\Admin\\App')
#16 {main}

Estado da solicitação​

array(4) {
["url"] => string(30) "/forum/admin.php?tools/run-job"
["referrer"] => string(48) "*/admin.php?tools/run-job"
["_GET"] => array(1) {
["tools/run-job"] => string(0) ""
}
["_POST"] => array(3) {
["_xfRedirect"] => string(58) "*/admin.php?tools/rebuild&success=1"
["_xfToken"] => string(8) "********"
["only_ids"] => string(6) "103870"
}
}
 
But this is the best resource... The most useful...

This is sad because I found this addon to be a great solution to the problem of upgrades and profile controls on my forum.
For me it is perfect.
 
I put a couple of tickets for this after my XF upgrade to 2.3 over on TH but in case you're reading here.

Issue 1: With latest TH Donate enabled I cannot rebuild XFES index (not sure about other jobs).
Issue 2: thdonate_campaign_view has template mods that cannot be merged (1.1.8 pl2)


When rebuilding my XFES search index I'm getting this hard stop on the rebuild job. Seems to be TH Donate related (yes I did upgrade it to the latest). Appreciate any help
ErrorException: [E_WARNING] Attempt to read property "username" on null src/addons/ThemeHouse/Donate/Entity/Donation.php:258 Generated by: Nik
Nov 30, 2024 at 6:01 AM
Stack trace #0 src/addons/ThemeHouse/Donate/Entity/Donation.php(258): XF::handlePhpError(2, '[E_WARNING] Att...', '/home/nginx/dom...', 258) #1 src/addons/ThemeHouse/Donate/Entity/Comment.php(294): ThemeHouse\Donate\Entity\Donation->getCommentTitle(Object(ThemeHouse\Donate\Entity\Comment))
#2 src/addons/ThemeHouse/Donate/Search/Data/Comment.php(33): ThemeHouse\Donate\Entity\Comment->getCommentTitle()
#3 src/XF/Search/Search.php(63): ThemeHouse\Donate\Search\Data\Comment->getIndexData(Object(ThemeHouse\Donate\Entity\Comment))
#4 src/XF/Search/Search.php(89): XF\Search\Search->index('thdonate_commen...', Object(ThemeHouse\Donate\Entity\Comment))
#5 src/XF/Search/Search.php(126): XF\Search\Search->indexEntities('thdonate_commen...', Object(XF\Mvc\Entity\ArrayCollection))
#6 src/XF/Job/SearchRebuild.php(69): XF\Search\Search->indexRange('thdonate_commen...', 0, 5000)
#7 src/XF/Job/Manager.php(275): XF\Job\SearchRebuild->run(8)
#8 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#9 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 8)
#10 src/XF/Admin/Controller/ToolsController.php(165): XF\Job\Manager->runQueue(true, 8)
#11 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#13 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#14 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#16 src/XF.php(806): XF\App->run()
#17 admin.php(15): XF::runApp('XF\\Admin\\App') #18 {main}

Request state array(4) { ["url"] => string(24) "/admin.php?tools/run-job" ["referrer"] => string(58) "https://mysite.com/admin.php?tools/run-job" ["_GET"] => array(1) { ["tools/run-job"] => string(0) "" } ["_POST"] => array(3) { ["_xfRedirect"] => string(44) "https://mysite.com/admin.php" ["_xfToken"] => string(8) "********" ["only_ids"] => string(0) "" }
 
For the template, if you haven't made any changes to it you can just revert it to default. If you have made changes, make a note of them, revert the template and then re-apply them.

For the indexing issue, have pushed a new version which should fix that.
 
For the template, if you haven't made any changes to it you can just revert it to default. If you have made changes, make a note of them, revert the template and then re-apply them.

For the indexing issue, have pushed a new version which should fix that.

You're a champ, I'll give it a go.


EDIT: Works now. Thank you.
 
Last edited:
XenForo promotions will be applied for as long as the criteria you've configured remain true, so it would depend what the criteria was.
 
Back
Top Bottom