Skip to Content Skip to Menu

A new substitution in CBSubs

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
2 years 8 months ago #328070 by rbuelund
A new substitution in CBSubs was created by rbuelund
To use in the workflow e-mails in CBSubs there are theese substitutions amongst others: [SUBSCRIPTION_VALIDITY_PERIOD] and [SUBSCRIPTION_EXPIRY_DATE] - i really need also dynamically to show the start date of a plan period in mails (I have plans that last a calendar year). So something like [SUBSCRIPTION_VALIDITY_PERIOD_START] would be nice.. is that possible to add ?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 8 months ago #328079 by krileon
Replied by krileon on topic A new substitution in CBSubs
Only way to use CBSubs substitutions outside those specific locations is to use the functionality included by CBSubs system plugin. It adds support for CBSubs substitutions anywhere Joomla content plugins are supported. So for whatever email you're sending you'll need to first enable support for content plugins. Next you can use the below format to get expiration date for example.

[cbsubs:subscriptions plan="PLAN_ID_HERE" output="expiry_date" /]

Replace PLAN_ID_HERE with the ID of your plan. See the description of the "cbpaidsubsbot" system plugin in Extensions > Plugins for further usage information for this content plugin.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
2 years 8 months ago #328080 by rbuelund
Replied by rbuelund on topic A new substitution in CBSubs
I think I have not expressed my problem correct. I do not want to use substitutions in other places, I am asking for a new substitution variable.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 8 months ago #328083 by krileon
Replied by krileon on topic A new substitution in CBSubs
I believe [SUBSCRIPTION_VALIDITY_PERIOD_START] would just be the value of [SUBSCRIPTION_SIGNUP_DATE], which should be the date they subscribed on.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • rbuelund
  • rbuelund
  • OFFLINE
  • Posts: 565
  • Thanks: 40
  • Karma: 4
2 years 8 months ago #328086 by rbuelund
Replied by rbuelund on topic A new substitution in CBSubs
But if the start date of the plan is eg the 1. of april, would that then be shown if they first sign up eg on the 5. of april ? I want to show 1. of april regardles of the actual signup date, but i want it also to change if the period later on is changed in the plan.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48424
  • Thanks: 8274
  • Karma: 1443
2 years 8 months ago #328089 by krileon
Replied by krileon on topic A new substitution in CBSubs
It should be set to whenever the subscription started. In the _cbsubs_subscriptions database table it'd be the value of subscription_date column, [SUBSCRIPTION_LAST_RENEWAL_DATE] would be the value of last_renewed_date column, and [SUBSCRIPTION_EXPIRY_DATE] would be the value of expiry_date column. There isn't much more information to go off of here. [SUBSCRIPTION_VALIDITY_PERIOD] for example is a calculation based off their subscription_date and expiry_date and the subscribed plans validity period.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum