Skip to Content Skip to Menu

Revert plan image to fallback on plan expiration

9 months 1 week ago #337089 by wintercorn
I've got each plan showing an image relevant to the plan when active but when the plan expires it obviously doesn't show. Can I either show an EXPIRED image or fallback to a default image like NO PLAN?

Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
9 months 1 week ago #337094 by krileon
There's no functionality for that. Best I can suggest is substitute it into a Custom HTML field then IF substitution against it. Example as follows.
Code:
[cb:if FIELD_NAME!=""][cb:userfield field="FIELD_NAME" /][cb:else]FALLBACK_IMAGE_HERE[/cb:else][/cb:if]

Replace FIELD_NAME with the name of your plans image field and replace FALLBACK_IMAGE_HERE with your fallback image HTML.


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

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

9 months 1 week ago #337113 by wintercorn
Replied by wintercorn on topic Revert plan image to fallback on plan expiration
Lovely. It works. This is what i now have. Tested with active and expired accounts.

[cb:if cb_planimage!=""][cb:userfield field="cb_planimage" /][cb:else]<a href="/manage-subscription">EXPIRED PLEASE RENEW</a>[/cb:else][/cb:if]

and a little reminder at the top of their profile.

[cb:if cb_planimage!=""][cb:else]<a href="/manage-subscription">YOUR SUBSCRIPTION HAS EXPIRED. PLEASE RENEW TO AVOID LOSING MEMBERSHIP BENEFITS</a>[/cb:else][/cb:if]

Only needs a bit of styling now.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum