[DBTech] DragonByte eCommerce

[DBTech] DragonByte eCommerce [Paid] 3.4.0

No permission to buy ($29.95)
My guess is something is overwriting jQuery (maybe just partially), but the jQuery .on() method isn’t working as expected for whatever reason. If someone has a URL to share where it’s an issue I could probably work out what’s going on exactly.
I just ran that code into the developer console - and it causes the same error when hitting the Purchase button.
 
I just ran that code into the developer console - and it causes the same error when hitting the Purchase button.
Not sure exactly what's going on, but it has something to do with some annotation HTML comment being injected into the overlay. If you go to the helper_js_analytics template, and change this line:

HTML:
<xf:if is="$xf.options.baGeneral.overlay">$(document).on("xf:reinit",(c,a)=>{a&&a[0]&&a[0].querySelectorAll(".overlay[data-url]").forEach(b=>{gtag("event","page_view",{page_title:b.querySelector(".overlay-title").textContent,page_location:b.getAttribute("data-url")})})});</xf:if>
to this...
HTML:
<xf:if is="$xf.options.baGeneral.overlay">$(document).on("xf:reinit",(c,a)=>{if(a&&typeof(a)==='object'&&Object.prototype.toString.call(a)==='[object Object]'){for(const i of a){if(typeof(i.querySelectorAll)==='function'){i.querySelectorAll(".overlay[data-url]").forEach(b=>{gtag("event","page_view",{page_title:b.querySelector(".overlay-title").textContent,page_location:b.getAttribute("data-url")})});break;}}}});</xf:if>
It should (in theory) work around it. I haven't tested it firsthand because I don't have the addon, but let me know if that works.
 
DB Credits adds a payment profile which can be used in eCommerce. If someone has added a “Cash” payment profile that would work too.

Smashing it with these add-ons! I am not familiar with that, (not to be a pain in the butt, perhaps I should ask in DM) and I just don't see where or how we could allow someone to have their credits be used to purchase an item in lieu of having to use real money??

❤️
 
Smashing it with these add-ons! I am not familiar with that, (not to be a pain in the butt, perhaps I should ask in DM) and I just don't see where or how we could allow someone to have their credits be used to purchase an item in lieu of having to use real money??

❤️
I believe you need to set up the payment profile for the credit, and then when you're creating/editing the item you can choose which to use.

I haven't used this add-on in quite some time as it didn't fit my needs for digital currencies, or for physical goods (primarily API integration).
 
Not sure exactly what's going on, but it has something to do with some annotation HTML comment being injected into the overlay. If you go to the helper_js_analytics template, and change this line:

HTML:
<xf:if is="$xf.options.baGeneral.overlay">$(document).on("xf:reinit",(c,a)=>{a&&a[0]&&a[0].querySelectorAll(".overlay[data-url]").forEach(b=>{gtag("event","page_view",{page_title:b.querySelector(".overlay-title").textContent,page_location:b.getAttribute("data-url")})})});</xf:if>
to this...
HTML:
<xf:if is="$xf.options.baGeneral.overlay">$(document).on("xf:reinit",(c,a)=>{if(a&&typeof(a)==='object'&&Object.prototype.toString.call(a)==='[object Object]'){for(const i of a){if(typeof(i.querySelectorAll)==='function'){i.querySelectorAll(".overlay[data-url]").forEach(b=>{gtag("event","page_view",{page_title:b.querySelector(".overlay-title").textContent,page_location:b.getAttribute("data-url")})});break;}}}});</xf:if>
It should (in theory) work around it. I haven't tested it firsthand because I don't have the addon, but let me know if that works.
Yup, overlay correctly pops up first time now 👍
 
I had my store off for awhile and now that it's back on people have no option to check out and I'm getting these:
Code:
TypeError: Macro public:dbtech_payment_profile_macros :: payment_options() error: Cannot access offset of type string on string internal_data/code_cache/templates/l1/s2/public/dbtech_payment_profile_macros.php:36
Generated by: ABC123 Apr 19, 2024 at 6:57 AM

Stack trace
#0 src/XF/Template/Templater.php(828): XF\Template\Templater->{closure}(Object(NF\Calendar\XF\Template\Templater), Array, NULL)
#1 internal_data/code_cache/templates/l1/s2/public/dbtech_ecommerce_checkout_macros.php(26): XF\Template\Templater->callMacro('dbtech_payment_...', 'payment_options', Array, Array)
#2 src/XF/Template/Templater.php(828): XF\Template\Templater->{closure}(Object(NF\Calendar\XF\Template\Templater), Array, NULL)
#3 internal_data/code_cache/templates/l1/s2/public/dbtech_ecommerce_checkout_complete.php(19): XF\Template\Templater->callMacro('dbtech_ecommerc...', 'payment_options', Array, Array)
#4 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(NF\Calendar\XF\Template\Templater), Array, NULL)
#5 src/addons/MaZ/AUN/XF/Template/Templater.php(39): XF\Template\Templater->renderTemplate('dbtech_ecommerc...', Array, true, NULL)
#6 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('public:dbtech_e...', Array)
#7 src/XF/Mvc/Renderer/Json.php(86): XF\Template\Template->render()
#8 src/XF/Mvc/Renderer/Json.php(70): XF\Mvc\Renderer\Json->renderHtmlFallback('DBTech\\eCommerc...', 'public:dbtech_e...', Array)
#9 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Json->renderView('DBTech\\eCommerc...', 'public:dbtech_e...', Array)
#10 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(DBTech\eCommerce\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(DBTech\eCommerce\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#13 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 index.php(19): XF::runApp('XF\\Pub\\App')
#16 {main}

I did search and found somebody posting about something similar in the Payment UI, which I also have, but this is from the ecomm add-on so not sure if related.
 
I had my store off for awhile and now that it's back on people have no option to check out and I'm getting these:
Code:
TypeError: Macro public:dbtech_payment_profile_macros :: payment_options() error: Cannot access offset of type string on string internal_data/code_cache/templates/l1/s2/public/dbtech_payment_profile_macros.php:36
Generated by: ABC123 Apr 19, 2024 at 6:57 AM

Stack trace
#0 src/XF/Template/Templater.php(828): XF\Template\Templater->{closure}(Object(NF\Calendar\XF\Template\Templater), Array, NULL)
#1 internal_data/code_cache/templates/l1/s2/public/dbtech_ecommerce_checkout_macros.php(26): XF\Template\Templater->callMacro('dbtech_payment_...', 'payment_options', Array, Array)
#2 src/XF/Template/Templater.php(828): XF\Template\Templater->{closure}(Object(NF\Calendar\XF\Template\Templater), Array, NULL)
#3 internal_data/code_cache/templates/l1/s2/public/dbtech_ecommerce_checkout_complete.php(19): XF\Template\Templater->callMacro('dbtech_ecommerc...', 'payment_options', Array, Array)
#4 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(NF\Calendar\XF\Template\Templater), Array, NULL)
#5 src/addons/MaZ/AUN/XF/Template/Templater.php(39): XF\Template\Templater->renderTemplate('dbtech_ecommerc...', Array, true, NULL)
#6 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('public:dbtech_e...', Array)
#7 src/XF/Mvc/Renderer/Json.php(86): XF\Template\Template->render()
#8 src/XF/Mvc/Renderer/Json.php(70): XF\Mvc\Renderer\Json->renderHtmlFallback('DBTech\\eCommerc...', 'public:dbtech_e...', Array)
#9 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Json->renderView('DBTech\\eCommerc...', 'public:dbtech_e...', Array)
#10 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(DBTech\eCommerce\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(DBTech\eCommerce\XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#13 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#14 src/XF.php(524): XF\App->run()
#15 index.php(19): XF::runApp('XF\\Pub\\App')
#16 {main}

I did search and found somebody posting about something similar in the Payment UI, which I also have, but this is from the ecomm add-on so not sure if related.
What version of XenForo are you running? Assuming you’re on the latest version of eCommerce. Make sure to revert any customised eCommerce templates.

I made a change to support the new 3p cookie policy in the latest version of XF and that’s the reason for this.
 
What version of XenForo are you running? Assuming you’re on the latest version of eCommerce. Make sure to revert any customised eCommerce templates.

I made a change to support the new 3p cookie policy in the latest version of XF and that’s the reason for this.
Currently 3.4, but was getting this on the previous versions as well. I don't recall what I upgraded from
 
Make sure all templates are stock and that you’re on the latest version of XF 2.2 as well.
Fresh 3.4 install and used the overwrite option.
Running 2.2.15

I forgot that I can't buy my own products, aside from that being kinda odd, thats not an issue.

When a regular user clicks purchase the site keeps trying to load and nothing happens on the screen, no errors in the log, but this in the console:
Code:
Uncaught TypeError: a[0].querySelectorAll is not a function
    <anonymous> <domain>/:2785
 
Fresh 3.4 install and used the overwrite option.
Running 2.2.15

I forgot that I can't buy my own products, aside from that being kinda odd, thats not an issue.

When a regular user clicks purchase the site keeps trying to load and nothing happens on the screen, no errors in the log, but this in the console:
Code:
Uncaught TypeError: a[0].querySelectorAll is not a function
    <anonymous> <domain>/:2785
That’s a bug in digitalpoint’s addon, scroll up :)
 
That’s a bug in digitalpoint’s addon, scroll up :)
Not entirely sure I'd call it a bug (something non-standard is happening with this addon), but it was easy enough to add some logic to skip the unexpected objects that get returned. Hard to say exactly what it is since I don't have access to this addon's source, maybe part of the DOM that shouldn't have an event attached to it that gets an event attached to it (like a text string vs. the expected DOM element). Either way, it's easy enough to ignore something that's supposed to be a DOM element when it's not actually a DOM element.
 
I've been very busy with other work at the moment so I haven't had a chance to respond as quickly as I used to, sorry.


If you mean separate downloads based on the license type, that is not currently supported, sorry.
Is this possible today? I have wanted to buy the addon but I wanted to wait a while to see if it would implement new features.
 
Is this possible today? I have wanted to buy the addon but I wanted to wait a while to see if it would implement new features.
No. I am out of the office travelling until the 8th of May, and furthermore no more feature updates will be added to the XF 2.2 version as future development will be focused on the XF 2.3 version.

Unfortunately I don’t have the bandwidth to support multiple XF versions with feature updates.
 
Top Bottom