Adding badge image on promotion use

7 years 2 months ago #291196 by bizguy
Adding badge image on promotion use was created by bizguy
I want to add a badge to a member's profile indicating they have used a promotion to upgrade their membership.
I couldn't find a way to do it from within the promotion or plan settings and wonder if there is a trigger I can use through auto actions?
If there is a better way accomplish this I am eager to try.

Thanks in advance.

Please Log in to join the conversation.

7 years 2 months ago #291242 by krileon
Replied by krileon on topic Adding badge image on promotion use
There's no integration for keeping track of that. It's also hard to determine a basket has used a promotion as it's stored in the parameters of the basket. Specifically they're stored as promotions_coupons in integrations params as |*| delimitered. Using the below usage just might work.

Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
3: [var5_promotions_coupons] Is Not Empty

You can use a REGEXP condition to look for a coupon code in [var5_promotions_coupons] more specifically if needed. var5 is the $integrationParams object for that trigger, which is where the promotion coupon codes are stored for a basket.


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: bizguy

Please Log in to join the conversation.

7 years 2 months ago #291258 by bizguy
Replied by bizguy on topic Adding badge image on promotion use
Thanks Kyle.
As I have only 1 promo coupon active at a time, if var5 is not empty, I'll assume that a coupon was used.
I'll try that and only post back here if it doesn't work.

Thanks again.
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.200 seconds

Facebook Twitter LinkedIn