Skip to Content Skip to Menu

Cbsubs: Pass a variable inside a plan and make a Post request

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 8 months ago #240777 by dotcom22
hello

I need to make a Post request to external site when a specific plan is paid/activated. So I have set my Url request inside the field "path" of the First Subscription Activation section located in Plan > Integration > Url and this work well.

Now my goal would be to pass some more variable inside my request and I wondering how to do that. These variable value will always differ so I can not create CB fields for that because this would imply that the user must first edit his profile to select variables and then choose the plan. Then what I will do with these fields and their value ? They will no more necessary. So the best seem to insert some standard Html field in the plan description, but in that case how to pass these data in my Url request ?

have you a solution for that ??

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago #240828 by krileon
If the variable isn't changing simply add it to the URL if it's a GET request (e.g. &var=123) or add it to the POST textarea (e.g. var=123) if it's a POST request. If the value is constantly changing then it needs to be a CB field of some kind that you substitute in.


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.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 8 months ago #240851 by dotcom22

If the value is constantly changing then it needs to be a CB field of some kind that you substitute in.


The value will always change that the problem. What is annoying at my opinion is the fact I'm supposed to tell to users: If you want buy this plan, you must first edit your profile, fill in related field (could be published inside a dedicated tab that true) then go to Subscription page and choose/pay the plan. If fields could be inside the plan without need to edit profile, this will so much better and logic...

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago - 10 years 8 months ago #240855 by krileon
I don't understand what your constantly changing value is supposed to contain. If it's not something the user needs to provide you could query for it using CB Query Field or populate it with CB Auto Actions.

Fields inside the plan will not work. Profile Edit is significantly more complex than displaying fields. What happens if those fields are conditioned by another plan? Maybe by CB Conditional? What if those fields need further information added at profile edit by a trigger? It's just not as simple as displaying fields with a plan. We have to review the best way to approach this very delicately for a future release.


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.
Last edit: 10 years 8 months ago by krileon.

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

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 8 months ago #240860 by dotcom22
In fact is not a Plan is a Product.

So user want by a product and must choose some option for this product. I cannot create as many product needed with all option because this mean I will need dozen and dozen of product. Then according to option user choose, I want retrieve option value for insert these value in related POST request.

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago - 10 years 8 months ago #240866 by krileon
CBSubs is first and foremost a Subscription Management System. It is not a product store or anything of the sort. Forcing it to try and behave like one will result in issues like this. We of course are planning to expand on it with a cart system, etc.. but that's not going to happen anytime soon. You may want to look into something like VirtueMart if you need a digital store. Another option is to maybe use something like RSForms, which when submit sends them to the plan page. Your RSForm would collect the data you need and you can query for it with CB Query Field.


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.
Last edit: 10 years 8 months ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum