[#8073] Setting a date and time to publish and unpublish a plan?

1 week 3 days ago #319350 by peterbatchelor
Is there a way that I can set a plan to automatically open for registrations at a particular date and time, and to automatically no longer accept registrations after another date and time?
Thanks, Peter

Please Log in to join the conversation.

1 week 2 days ago #319354 by beat
This functionality is currently not available easily without a bit of "coding" (see below). But it's a nice Feature Request. I have added a FR for it: #8073


You can make it work now already with a little bit of SQL "coding", by using 2 CB Auto-Actions of:

- Type "Query",
- triggering on "onBeforeRegisterForm"
- with condition CB field "[cb:date format="Y-m-d" /]" "greater than or equal to" "2020-07-30" (e.g. to start on 30th of July, and obvious "smaller than" condition for the second auto-action)
- and a query (adapt) like: "UPDATE #__cbsubs_plans SET allow_registration = 1 WHERE allow_registration = 0 AND id = 1;" (for plan id 1: adapt your plan id, and obviously the reverse for disallowing registrations at end date).

That's for registrations. For upgrades, it would be "allow_upgrade_to_this".

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: peterbatchelor

Please Log in to join the conversation.

1 week 2 days ago #319365 by peterbatchelor
Thanks Beat, I'll give it a try :)
Regards, Peter

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.413 seconds

Facebook Twitter LinkedIn