[DBTech] DragonByte Shop

[DBTech] DragonByte Shop [Paid] 6.7.0

No permission to buy ($12.45)
Credits events are handled by DragonByte Tech Credits add-on, so you'll need the DB Tech Credits add-on for your needs.
 
Hi, I just have a question on this addon.

Right now for my xen 1 forum that I am about to upgrade, I have a money system that awards money points to people who make posts or I can award them points for doing something manually or just edit the points on their account via ACP.

Is that possible on this addon or would I need to get your other Credits addon?
If all you need is points for posts then the built-in earnings system in Shop could suffice. If you want more extensive features and better control over points, Credits is a good bet :)
 
Getting this error when I try to delete a Shop Item (it was created on the previous version, while still on XF 2.0, and now, after switching to the last version of the add-on as I'm running on XF 2.1, I get the following:

Code:
TypeError: Argument 1 passed to DBTech\Shop\Repository\Purchase::rebuildCacheForUser() must be an instance of XF\Entity\User, null given, called in .../src/addons/DBTech/Shop/Entity/Purchase.php on line 270 in src/addons/DBTech/Shop/Repository/Purchase.php at line 72

and I can't seem to be able to delete the item. I guess the add-on is being unable to remove the item from the user's inventory?

In the error I can also see:

Code:
DBTech\Shop\ItemType\AbstractHandler->discard() in src/addons/DBTech/Shop/Entity/Item.php at line1673

which seems indeed to be using a null variable, but I think being related to the error variable it's fine.
 
Last edited:
Getting this error when I try to delete a Shop Item (it was created on the previous version, while still on XF 2.0, and now, after switching to the last version of the add-on as I'm running on XF 2.1, I get the following:

Code:
TypeError: Argument 1 passed to DBTech\Shop\Repository\Purchase::rebuildCacheForUser() must be an instance of XF\Entity\User, null given, called in .../src/addons/DBTech/Shop/Entity/Purchase.php on line 270 in src/addons/DBTech/Shop/Repository/Purchase.php at line 72

and I can't seem to be able to delete the item. I guess the add-on is being unable to remove the item from the user's inventory?

In the error I can also see:

Code:
DBTech\Shop\ItemType\AbstractHandler->discard() in src/addons/DBTech/Shop/Entity/Item.php at line1673

which seems indeed to be using a null variable, but I think being related to the error variable it's fine.
Definitely could be. Check the Purchases page for a valid owner.
 
Database has 263 "buyers" for that item (I searched item_id in the database table) while the "Purchase" in the admin area returns only 2 buyers.

EDIT

Looks like the filter of the Purchase in the admin area filters only the current page shown. They are not just 2, but more. I'll have to find out how to display the buyers for that particular item in the admin area to find out if they match the 263 buyers from the database.
 
Ok I found it (both in database and admin area). There's a item purchased by "Unknown User" and in the database, the "buyer_username" is empty for that id. Is it a normal behavior of the add-on if users delete their accounts?

For those having a similar issues, the solution is to delete the line from the database and then trying to delete the item from the admin area again.
 
Another important error to report. This occurs when a user purchases currency using PayPal. Before the upgrade everything worked fine as it's not the first payment we get. I checked the event trigger and saved it (just in case) but the problem is not solved unfortunately. The user also reached me out to report he didn't receive any currency and he's quite upset about it (of course).

201398
 
And it looks like this is getting serious as even PayPal notified me about it:

201399

Account upgrades work fine, so I'd exclude a payment misconfiguration in the admin panel.
 
Another important error to report. This occurs when a user purchases currency using PayPal. Before the upgrade everything worked fine as it's not the first payment we get. I checked the event trigger and saved it (just in case) but the problem is not solved unfortunately. The user also reached me out to report he didn't receive any currency and he's quite upset about it (of course).

View attachment 201398
I can't assist with this as you have posted a screenshot of an error message instead of the error message itself. As you can tell by the screenshot, the information is heavily cut off and the important information is missing.
 
I can't assist with this as you have posted a screenshot of an error message instead of the error message itself. As you can tell by the screenshot, the information is heavily cut off and the important information is missing.

My bad, there you go:

Code:
 #0 src/addons/DBTech/Credits/EventTrigger/Purchase.php(46): XF\Mvc\Entity\Entity->save()
#1 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(609): DBTech\Credits\EventTrigger\Purchase->postSave(Object(DBTech\Credits\Entity\Transaction))
#2 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(258): DBTech\Credits\EventTrigger\AbstractHandler->trigger(Object(SV\WhoReplied\XF\Entity\User), 15479, false, Object(ArrayObject))
#3 src/addons/DBTech/Credits/Purchasable/Currency.php(232): DBTech\Credits\EventTrigger\AbstractHandler->apply(15479, Array, Object(SV\WhoReplied\XF\Entity\User))
#4 src/XF/Payment/AbstractProvider.php(164): DBTech\Credits\Purchasable\Currency->completePurchase(Object(XF\Payment\CallbackState))
#5 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#6 {main}
 
My bad, there you go:

Code:
 #0 src/addons/DBTech/Credits/EventTrigger/Purchase.php(46): XF\Mvc\Entity\Entity->save()
#1 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(609): DBTech\Credits\EventTrigger\Purchase->postSave(Object(DBTech\Credits\Entity\Transaction))
#2 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(258): DBTech\Credits\EventTrigger\AbstractHandler->trigger(Object(SV\WhoReplied\XF\Entity\User), 15479, false, Object(ArrayObject))
#3 src/addons/DBTech/Credits/Purchasable/Currency.php(232): DBTech\Credits\EventTrigger\AbstractHandler->apply(15479, Array, Object(SV\WhoReplied\XF\Entity\User))
#4 src/XF/Payment/AbstractProvider.php(164): DBTech\Credits\Purchasable\Currency->completePurchase(Object(XF\Payment\CallbackState))
#5 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#6 {main}
Great, thank you. I have applied a hot fix to RC1 that should resolve this issue. If you re-download the zip file and use the add-on installer to rebuild it, it should be fixed going forward.
 
Ran into this error when trying to Rebuild Transactions:

Server error log



XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'xf_tag_content.user_id' in 'on clause'

src/XF/Db/AbstractStatement.php:217

Generated by: May 1, 2019 at 9:52 AM

Stack trace
SELECT xf_tag_content., xf_user_AddUser_1.
FROM xf_tag_content
LEFT JOIN xf_user AS xf_user_AddUser_1 ON (xf_user_AddUser_1.user_id = xf_tag_content.user_id)
WHERE (xf_tag_content.tag_content_id > 0)
ORDER BY xf_tag_content.tag_content_id ASC

LIMIT 500
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1294): XF\Db\AbstractAdapter->query('
SELECT `xf_...')
#5 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(740): XF\Mvc\Entity\Finder->fetch('500')
#6 src/addons/DBTech/Credits/EventTrigger/AbstractHandler.php(694): DBTech\Credits\EventTrigger\AbstractHandler->getContentInRange(0, '500')
#7 src/addons/DBTech/Credits/Job/TransactionRebuild.php(84): DBTech\Credits\EventTrigger\AbstractHandler->rebuildRange(0, '500')
#8 src/XF/Job/Manager.php(253): DBTech\Credits\Job\TransactionRebuild->run(G)
#9 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#10 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#11 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#12 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#14 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#15 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#17 src/XF.php(390): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}

Request state

array(4) {
["url"] => string(27) "/xf/admin.php?tools/run-job"
["referrer"] => string(55) "https://www.website.com/xf/admin.php?tools/run-job"
["_GET"] => array(1) {
["tools/run-job"] => string(0) ""
}
["_POST"] => array(3) {
["_xfRedirect"] => string(65) "https://www.website.com/xf/admin.php?tools/rebuild&success=1"
["_xfToken"] => string(8) "****"
["only_ids"] => string(4) "4102"
}
}
 
On the subject of duplicating... I have both Shop and Credits showing the same currency on the navbar.

Before the latest version, I had Shop with no display currency. When I go into the settings to uncheck display currency, it doesn't save. The currencies are integrated.
 
On the subject of duplicating... I have both Shop and Credits showing the same currency on the navbar.

Before the latest version, I had Shop with no display currency. When I go into the settings to uncheck display currency, it doesn't save. The currencies are integrated.
The display currency setting shouldn't be force saved 🤔

To work around this for the time being, you can integrate the Credits navbar with the Shop via the XenForo Options for DB Credits.
 
Top Bottom