[DBTech] DragonByte Shop

[DBTech] DragonByte Shop [Paid] 6.6.4

No permission to buy ($12.45)
I've no idea if the person who initially requested the feature is still around (or using XF2), but in v6.1 I plan to deprecate the old "callback class" feature for hooking into various parts of the Shop.

These are the affected database fields that will be dropped from the xf_dbtech_shop_item table during upgrade:
Code:
                'prepurchase_callback_class',
                'prepurchase_callback_method',
                'postpurchase_callback_class',
                'postpurchase_callback_method',
                'sellback_callback_class',
                'sellback_callback_method',
                'configure_callback_class',
                'configure_callback_method',
                'gift_callback_class',
                'gift_callback_method',
                'discard_callback_class',
                'discard_callback_method'
In their place, I plan to use XF2's Code event system to replicate the functionality provided by these fields. This will ensure not only that XF2's standards are being followed, but will make the feature more dynamic as you will be able to extend your code to work with more items without needing to manually edit all of those items.

The callback signatures will (largely) be maintained, with the exception of certain parameters changing from array to the relevant Entity.

Any code that made use of these fields would no longer work come the v6.1 update anyway, so consider this an extremely early notice of things I find while going through the database and cleaning it up to be more in line with XF2's conventions :)

Casual 7 steps per upgrade per addon for the upcoming beta versions because of how many tables and columns are being renamed, I'm sure nothing can possibly go wrong here. Hehehe pls 2 not break I swear I'm a professional


Fillip
 
Double post because this is entirely separate: All per-category, per-item, per-lottery and per-shop permissions will be reset in the upgrade.

As you may or may not know, XF 2.0.4 onwards features a new content permission system I designed, which lets developers create content permissions for things that are not categories. I already take advantage of this system in our DragonByte eCommerce mod, but I plan to take full advantage of it in this mod as well.

If I make any more breaking changes I'll be sure to post back and keep you informed so you can be better prepared for the upgrade when it arrives.


Fillip
 
I've no idea if the person who initially requested the feature is still around (or using XF2), but in v6.1 I plan to deprecate the old "callback class" feature for hooking into various parts of the Shop.

These are the affected database fields that will be dropped from the xf_dbtech_shop_item table during upgrade:
Code:
                'prepurchase_callback_class',
                'prepurchase_callback_method',
                'postpurchase_callback_class',
                'postpurchase_callback_method',
                'sellback_callback_class',
                'sellback_callback_method',
                'configure_callback_class',
                'configure_callback_method',
                'gift_callback_class',
                'gift_callback_method',
                'discard_callback_class',
                'discard_callback_method'
In their place, I plan to use XF2's Code event system to replicate the functionality provided by these fields. This will ensure not only that XF2's standards are being followed, but will make the feature more dynamic as you will be able to extend your code to work with more items without needing to manually edit all of those items.

The callback signatures will (largely) be maintained, with the exception of certain parameters changing from array to the relevant Entity.

Any code that made use of these fields would no longer work come the v6.1 update anyway, so consider this an extremely early notice of things I find while going through the database and cleaning it up to be more in line with XF2's conventions :)

Casual 7 steps per upgrade per addon for the upcoming beta versions because of how many tables and columns are being renamed, I'm sure nothing can possibly go wrong here. Hehehe pls 2 not break I swear I'm a professional


Fillip


I'm not sure if I understood correctly, but could this be used to generate an array of possible credit amounts as rewards if people buy and use a custom item from the dbtech shop, so that they might receive for example 50 credits or 100 or even 0 after using it?
 
Double post because this is entirely separate: All per-category, per-item, per-lottery and per-shop permissions will be reset in the upgrade.

As you may or may not know, XF 2.0.4 onwards features a new content permission system I designed, which lets developers create content permissions for things that are not categories. I already take advantage of this system in our DragonByte eCommerce mod, but I plan to take full advantage of it in this mod as well.

If I make any more breaking changes I'll be sure to post back and keep you informed so you can be better prepared for the upgrade when it arrives.


Fillip


No ways to "migrate" the permissions from the old system to the newer one? It gets tricky when you have over 25 groups to customize again.
 
I'm not sure if I understood correctly, but could this be used to generate an array of possible credit amounts as rewards if people buy and use a custom item from the dbtech shop, so that they might receive for example 50 credits or 100 or even 0 after using it?
It is/was a developer tool, so if you create(d) callback classes in those locations you could do whatever you wanted in that code.

No ways to "migrate" the permissions from the old system to the newer one? It gets tricky when you have over 25 groups to customize again.
No, the storage method is vastly different so it is not feasible to attempt to port the permissions. The permissions themselves will also change, so there may not be a 1:1 relation.


Fillip
 
My transaction log gets 300,000+ entries per week concerning "interest". Can I turn interest off completely? I worry this is taking up server resources.

I've disabled the bank option.
Bank Interest is set to 0 (I only have one currency).
 
Last edited:
My transaction log gets 300,000+ entries per week concerning "interest". Can I turn interest off completely? I worry this is taking up server resources.

I've disabled the bank option.
Bank Interest is set to 0 (I only have one currency).
This may be a DB Credits event, in which case you can simply delete that event.


Fillip
 
Can you show me a screenshot of what you’re seeing in the transaction log?


Fillip

Sure! And like I said, anything related to banks & interest in both plugins is set to off / 0. This happened with the 1.5x version as well on my test sites.

If you'd like to poke around the server let me know, I'll open a ticket on dbtech's site.

interestspam.webp
 
Sure! And like I said, anything related to banks & interest in both plugins is set to off / 0. This happened with the 1.5x version as well on my test sites.

If you'd like to poke around the server let me know, I'll open a ticket on dbtech's site.

View attachment 180366
This means you have automatic interest collection turned on. Try setting the interest amount to 0% in the currency settings.


Fillip
 
This means you have automatic interest collection turned on. Try setting the interest amount to 0% in the currency settings.


Fillip
settings.webp

That's my only currency, I've checked the settings for both plugins several times and have turned off / 0% everything interest & bank related.
 
Last edited:
Interesting. I will look into it for the next version, however for now you should just ignore those events.


Fillip
Can I safely wipe xf_dbtech_shop_transactionlog? I worry about database issues when it gets into the millions, not sure if that's a rational worry though.
 
Last edited:
Can I safely wipe xf_dbtech_shop_transactionlog? I worry about database issues when it gets into the millions, not sure if that's a rational worry though.
I do believe so, yeah. As far as I can tell, there's nothing that explicitly relies on the shop's transactionlog table.


Fillip
 
follow-up on the transaction spam: turning on "(Pro) Require Manual Interest Collection" seems to have fixed the issue.
 
The "member_view" hooks of <!--[XF:tabs:end]--> and <!--[XF:tab_panes:end]--> conflict with several other addons which hook in the same place. XenCentral Feedback and Download Tracker are the two I've noticed, they conflict with each other as well.

This results in the tabs being invisible and breaking the links so it opens outside of the user's profile page.
I’m not sure what exactly you are reporting, can you clarify what you mean when you say they conflict?


Fillip
 
We're still really enjoying the shop, thank you Fillip. Unfortunately we've come across a bug:

1534980343343.webp

Deleted user's posts get a <div> wrapper around them. With posts that have a lot of [code] tags they become indecipherable.

I'm able to reproduce the issue on a default XF installation with default settings.
 
Top Bottom