Legacy Multiple prices/currences for an item & Custom script calling action for Custom Items

Status
Not open for further replies.

nte

Customer
Multiple prices/currences for an item & Custom script calling action for Custom Items

Hello,

Here are two features that I believe would push this great plugin to another level.

1) Multiple Prices/Currencies - RL Scenario:
We have a single currency called CHB (CH Points). Points can be achieved in two ways;
- By work (doing something for community - like helping new users, creating banner etc etc etc)
- By donation

In a shop we offer two types of items. Ones that are available to all and ones that are only available to those that donated (mainly VIP groups and VIP features). At the moment we are limiting access to them based upon group user has - I created a group called "A-Credited" where "premium" items are only visible to this group. I manually assign this group to any user that donates and then track and manually remove it when they purchase an item/spent their "donation" points. Truth to be told, it's a cumbersome approach and sadly quite abusable- since we have one currency thus sometimes they stack donation and freebie points and obtain something. I know there's various approaches to solve this from my end of things but I think following would be a more cleaner & nicer approach;

Request;
Ability to assign multiple prices to a the same item. As in this scenario I could add another currency called CHB+ which would in essence be donation points and then simply offer same item in two different prices without cloning/limiting access .. As in current scenario there are some items we do want to offerto all but in two different prices. Currently this can only is only doable via cloning an item and/or then limiting access on per-group basis so it's not duplicated in a shop as that confuses users.

2) Custom Script Call
It would be nice if custom items would have a field where I could call a URL. A simple GET request could then be used to invoke a custom action. In our case some items are tied to various game servers, those game servers use *SQL as backend. If this option would exist I could easily write a simple API for DB interaction via php and call it once item is purchased so whole process is automated.

That's about it. I assume there's quite some work tied to request num. 1 while second one is an easy one. In any case, if either would find its way to a plugin, I believe it would be a great addition to this already great plugin.

Thank you for taking your time reading this!

Kind regards,
Nate
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Hi Nate,

For Option #1, why not go with two different shops instead? As you may have noticed, you can sell different items at different price points in different shops. Provided I understand your request correctly, this would solve all your problems :)

For Option #2, this sounds like a very niche feature that could be wide open to abuse. I would, however, be open to adding a hook that you can use in vBulletin's hook system :)
 
Hello Fillip H.!

Well in essence it's a little bit simpler to have all on the one end and offer same item with two prices. It's a little easier for users to simply hover over an item and see two prices as they can faster summarize in their mind what makes more sense - to obtain an item via community contribution or just donate for it. But you are right, I will divide the shops (we already have multiple categories) and see how that feels for users. I guess I can always reopen the ticket if it shows as being to confusing for them (sadly most are younger audience so not really tech savvy).

As for second request. It has the potential to be abused but then again, a lot of things have if not configured right or available. Maybe adding a hook for permission could be a viable option? As that way in ACL permissions shop can be completely disabled for moderators and/or other low-level staff? While we are at it, that would I guess also solve the problem with manually adjusting points as currently any mod that can edit user over control panel can manually adjust points. I strictly forbidden this to my staff and vigorously track logs but there's always a risk. May sound foolishly and easily solvable but it's not a small community so sometimes loose cannons do escape screening process and find their way into staff where they lay dormant until they decided to act. Nature of the beast sadly.
 
For the second request, the only difference between my system and yours is that instead of us having to code a whole new permissions system to control access to one feature very few communities would use, you'd be responsible for programming the cURL call yourself.

Here's a basic example of how a cURL call is made in PHP, which you would then add to a new plugin in vBulletin: PHP: Basic curl example - Manual

If this sounds acceptable to you, I can go ahead and schedule this for an update next week :)
 
I am a c/c++/php programmer so I fully understand what's needed. I am just not familiar with VB API/plugin process and sadly do not have the time to dig into a code and adjust/create/write a hook so yes, a simple hook to call a script is all that's needed. Rest is naturally on my end and up to me.

In a nutshell: If you are willing to schedule it and add it that would be great!
I guess you can now also close this ticket. And thank you! :)

Kind regards,
Nate
 
To write a hook for vBulletin, all you need to do is go to the AdminCP -> Plugins & Products -> Add New Plugin.

The code you paste in the box there is eval()'d (yes, I know :P) so it doesn't require any specific syntax or anything.
 
I figured that much, just wasn't sure what else is tied to it. Time ago I played with (2.x) IPB plugin and it had a nasty habit to utilize globals and singletons that were not documented so it ended up working right but eating resources like a candy.. :D What I want to say is that there's always a vector/dimension tied to it so through previous experience I hate to go blindly into it as those "fast solutions" usually end up as "long term problems". >=|

Although Thanks for the tip! :)
 
In the next version, there will be a hook called dbtech_vbshop_purchase_complete which will be executed after every purchase :)

You can use $this->config['itemtypeid'] == 'custom' to limit it to only custom items :)
 
Status
Not open for further replies.
Back
Top