Crocoblock / suggestions

The suggestions for CrocoBlock project
195 stars 78 forks source link

Subscriptions Plugin with actions on different outcomes #4474

Open ALPSIT opened 2 years ago

ALPSIT commented 2 years ago

Hi There,

The recent introduction of JetFormbuilder and the Conditional Post Submit Actions has allowed us to be able to build very well featured membership systems, booking systems etc.

eg the following video on your youtube channel has left out two key components. Membership Expiry Meta for display conditions and Subscription payments - https://youtu.be/LPVzsnl5XQI

I've managed to succesfully maintain a membership expiry user meta using JetFormbuilder on various registration and renewal actions.

However, one really important component that I is missing to help complete the Crocoblock plugin suite is a Subscriptions Payment Plugin.

The key feature of this plugin wouldn't be just taking an automated payment. The key feature would be to tie in conditional actions to be processed dependant on the outcome of the payment.

some features to give you an idea

  1. Subscription Registration to be available as a JetFormbuilder post submit action with all the populated form details.

  2. Send automated reminder via email or sms of upcoming payment or overdue payment

    • Subscription payment for user is due in 7 days
    • Subscription payment is overdue
  3. If payment is succesful, have multiple actions be able to process:

    • update user meta field with a membership expiry date calculation - can be done numeric calculation using unix epoch timestamps
    • send email with payment confirmation
  4. If payment is not succesful, have multiple actions be able to process:

    • Change user role
    • or update user meta
    • send email

Please consider as this would enhance your feature set dramatically.

ALPSIT commented 2 years ago

Just commenting to bump this one back to top as it would be a great feature that I look forward to! Is Crocoblock considering this?

giacozama commented 2 years ago

+1

giacozama commented 2 years ago

@ALPSIT how did you manage to maintain a membership expiry user meta using JetFormbuilder?

ALPSIT commented 2 years ago

Hi There,

All of this is possible if you make numeric calculations with Timestamp.

eg. 1 month in Unix Timestamp is 2592000

image

See below for the different variables you need to consider and how to handle them.

Make sure to create a Customer User Meta with something like membership_expiry

image

image

image

ALPSIT commented 2 years ago

I might just add, this membership_expiry user meta field you can then use in dynamic visibility etc when you want to display content accordingly.

eg. if membership_expiry is greater than today > this means they are a current member and you can show Current Member content accordingly.

if membership_expiry is less than today < this means they are expired and you can show Expired Member content accordingly.

if membership_expiry does not exist - it means they never registered, prompt to Become a Member

ALPSIT commented 2 years ago

you an also show a progress circle with this data, you can use query builder to run the calculation and then grab this query result in dynamic tags.

you can do a calculation like the below to get remaining days amount and show in progress circle on their dashboard.

Dynamic Visibility condition to show progress circle: if membership_expiry is greater than today OR you can just check the below query, if it returns negative amount of days/less than 0, it means it is expired and can hide widget.

Calculate remaining days: (membership_expiry - Todays date (unix timestamp)) / 86400 (1 day in Unix Time)

that formula will give you the remaining days of membership

to make the progress circle decrease every day - you need to give it a reference point to decrease from.

In jetformbuilder when you update user meta - you can create another custom user meta to track the date membership_paid_date.

build a query that calculates the difference between membership_paid_date and membership_expiry

example: membership_expiry - membership_paid_date = total amount of days they have paid for.

and then you show in progress loader total amount of days they have paid for and total amount of days remaining.

ALPSIT commented 2 years ago

@Crocoblock this might actually be worthy of a knowledge base/How-to article article or video - because I am sure this is a very big extension of the offering of JetFormbuilder and was a huge component left out of the original how-to video.

ALPSIT commented 2 years ago

maybe I can help record it and present it to you to use? haha. get me some exposure.

ALPSIT commented 2 years ago

i also succesfully managed to implement a package/credits based booking system using similar theory where the user will have credit user meta and will update certain amount of credits and use certain amount of credits on purchase or booking form.

Ownatik commented 1 year ago

@ALPSIT Please do a tutorial I'm not able to make it work.

morosmo commented 1 year ago

@ALPSIT Can you please create a video about your idea to achive thsi system. Its helful for all of us :). Thankyou

KamelWP commented 5 months ago

Hi have you manged to make a video ? That would be awesome.. thx