Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 31)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Auto action triggered by payment

  • edb1
  • edb1
  • OFFLINE
  • Posts: 5
  • Thanks: 2
  • Karma: 0
11 years 3 months ago - 11 years 3 months ago #233882 by edb1
Hi all.

Initially users are registered on a free plan.
I have some code that needs to run when users upgrade to a paid plan.
So, I am looking for the auto action that would be triggered by an upgrade to a paid plan.
I can`t see the trigger for this in the list of triggers.
I am sure its there, i don`t want to experiment, find the wrong trigger that seems to work and end up with problems later.
Hope you can help..
Last edit: 11 years 3 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
11 years 3 months ago #233894 by krileon
Replied by krileon on topic Auto action triggered by payment
There's a generalized trigger for this. So you'll need to use conditionals with it to make it specific. You'll need to use the trigger onCPayUserStateChange with the below conditionals.

Conditional 1: [var2] Equal To A
Conditional 2: [var3] Equal To PLAN_ID_HERE

The above conditionals check that the subscription status change is to Active and the second conditional checks to ensure it's to a specific plan.

Please note this will fire anytime they obtain an active subscription to that plan. If you only want it to occur if it's an upgrade then you can add the 3rd conditional as follows

Conditional 3: [var7] Equal To U


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.
The following user(s) said Thank You: edb1

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

  • edb1
  • edb1
  • OFFLINE
  • Posts: 5
  • Thanks: 2
  • Karma: 0
11 years 3 months ago #233916 by edb1
Replied by edb1 on topic Auto action triggered by payment
Wow, thank you for the quick reply.
Your response is clear and the solution does just what I need.

insane support!!
The following user(s) said Thank You: nant, krileon

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

  • beat
  • beat
  • ONLINE
  • Posts: 2174
  • Thanks: 463
  • Karma: 352
11 years 3 months ago #233917 by beat
Replied by beat on topic Auto action triggered by payment
Thanks!

All our users are really welcome to leave a review at Joomla Extensions Directory . They make our day! :)

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

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

Moderators: beatnantkrileon
Powered by Kunena Forum