Forum Academy Marketplace Showcase Pricing Features

Specific question about deadline-based pricing

Hello,

I’m working on building a platform for paid event submissions and I’m trying to get the functionality to work where a user selects their category, then the price is automatically calculated based on that category as well as which deadline is coming up for that particular event. That’s where the actual pricing information is.

So in theory, I’m trying to get it to dynamically pull that information in and compare the next deadline to the current date, factor in the user’s category and let that determine the submission price.

This sounds complicated but I don’t think it should be. Any help is appreciated!

In theory, we can set the deadline and price of category in the database, retrieve the deadline and compare that date to current date, then retrieve the price of the category to do the calculation (like date difference multiply by price).

Samson @ Plugin Developer
Plugin Page
Plugin Forum

@samsonlcl
Hmm. This sounds right, but how do I make that comparison of different types of data? So if I’m associating a text (name of the deadline) with a date (date of the deadline) comparing that to the current date and attaching that to a number (price of the deadline) I don’t think I know how to.

I appreciate the help, but could you dumb it down for me even more? Thank you so much!

sounds like you store your deadlines with prices. Then you just need to do a search for deadlines that match the selected category End date formatted as DDMMYYHHSS > Current date (makes a RG list of buttons for each category or use a dropdown)

@nfisher
Thanks for the reply!

Right now, my database structure for this is broken up like this:
-Deadline date (list of dates)
-Deadline name (list of texts)
-Deadline price (list of numbers)

So based on that: How should I be structuring the RG list?

Thank you in advance!

Is that in one data type? If not it should be, you should have a deadlines data type, which will hold all of the data on each deadline, including start date, end date, name, price
Each deadline should be separate, you have no way of relating the data otherwise.

@nfisher

Right now those three fields are within the data type “Festival” along with all the other info for each given festival – You’re saying I should make a separate data type called “Deadline” and add those three fields in that one? Then would I add one field within “Festival” called Deadline to call on the data from that other type?

Yes you’ve nailed it. This is intrinsic to a relations database, either a one to one or one to many relationship if a festival can only have one or multiple deadlines.

Ah, okay this makes sense! I’m working on it now.

One more question: Should the “Category” field be in the “Festival” data type or the “Deadline” data type? This will be the other aspect that affects pricing.

Well I presume that the category would be in the same data type as the price if they are linked. Remember to do the category’s by option sets if that works for you.

@nfisher

Ah, okay. How come option sets? – The problem is, I’m trying to make it so festival-owners can upload their own events. So in theory, they need to be able to set their own categories and associate that with deadline pricing.
I’ve successfully gotten the deadline pricing to set itself based on the current date - But this category implementation is confusing me. With that information, is option set still the way to go? Or should category be a field in “deadline” data type?

Again, thank you so much for the help so far.