I am creating a certificate for my users that incorporates data from Community Builder, CB Subs and an other form building add-on. I am able to populate information using substitutions from Community Builder and my form builder add-on, but I can't figure out how to include data from the user's CB Subs data. Specifically, I need to show start date and expiration data for their subscription in the Joomla article. Is it possible? If so, what is the syntax to use?
Last edit: 3 years 6 months ago by krileon. Reason: Added [SOLVED] tag to subject
CBSubs also has substitutions as well. Review the description of the cbpaidsubsbot plugin within Extensions > Plugins for full usage information. Few examples provided below.
You can even condition content to show/hide based off their subscription state. Example shown below.
[cbsubs:if plan="PLAN_ID" and status="A"]CONTENT[/cbsubs:if]
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.
it is possible to show the Start Date and Expiration if the user themselves is viewing the article. But if a different user is viewing it, the information is blank. How can I specify the user field to be referenced in these examples? With Community Builder fields I can include user="#displayed" in the code (for example: [cb:userdata field="lastname" user="#displayed"/]. But this does not seem to work with the CBSubs substitutions.
#displayed only works when directly viewing a profile as it's meant to substituted in the displayed user. In your case you need to use user="#me" so it always shows the information of the user viewing the article. This will work fine with CBSubs substitutions as well. The order however is important. For CBSubs substitutions user should come first. Example as follows.
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.
Actually, I wanted to show the plan begin and end dates for the profile being viewed. Changing the order fixed the problem.
Membership Term:
From [cbsubs:subscriptions user="#displayed" plan="2" output="signup_date"/] To [cbsubs:subscriptions user="#displayed" plan="2" output="expiry_date" /]
Worked as needed.
It would probably save you some answering questions time if the order was the same for cbsubs:subscriptions as it is for cb:, i.e., cbsubs:subscriptions should be the same order as cb:userdata. Meaning, if "user=" were the first or last item for both substitution types.