Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

[SOLVED] [#9091] Programmatically invoice a subscriber

  • 3by400Inc
  • 3by400Inc
  • OFFLINE
  • Posts: 119
  • Thanks: 11
  • Karma: 0
2 years 4 days ago - 2 years 4 days ago #331833 by 3by400Inc
Replied by 3by400Inc on topic Programmatically invoice a subscriber
The cb_ecms_fee_pmva field type is Decimal Number and in my test of the "a fixed amount A from a CB field" promotion the user had a field value of 100. I also tried a field value of 100.00, since the promotion amount field tool-tip says the amount must be in the currency.

Although, since then, I've also tried other promotion types such as a percentage off or a flat amount defined in the promotion config. I've tried applying the promotion on different plans. So far, no promotion has successfully applied to the basket.
Last edit: 2 years 4 days ago by 3by400Inc.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48572
  • Thanks: 8293
  • Karma: 1445
2 years 4 days ago #331835 by krileon
Replied by krileon on topic Programmatically invoice a subscriber
Very strange. No promotions at all work on your site? Ensure CBSubs Promotions is public access permission and published in CB > Plugin Management. Next within CBSubs > Settings > Promotions ensure "Promotions enabled" is set to "Yes". Your issue suggestions promotions are globally turned off.


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.

  • 3by400Inc
  • 3by400Inc
  • OFFLINE
  • Posts: 119
  • Thanks: 11
  • Karma: 0
2 years 4 days ago #331839 by 3by400Inc
Replied by 3by400Inc on topic Programmatically invoice a subscriber
That seems to be the case. I've verified that the CB Promotions plugin is enabled and Public. I've also just now tried to change it's order to last to see if that made a difference - no difference.

Promotions are also enabled in the CB Subs config.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48572
  • Thanks: 8293
  • Karma: 1445
2 years 4 days ago #331840 by krileon
Replied by krileon on topic Programmatically invoice a subscriber
Please PM backend super users login credentials and will take a look.


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: 3by400Inc

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48572
  • Thanks: 8293
  • Karma: 1445
2 years 4 days ago #331845 by krileon
Replied by krileon on topic Programmatically invoice a subscriber
Have reviewed your install and appears your promotion applies to the plan id 27 as per your configuration under the Basic tab. It then also requires the purchasing user to have a specific usergroup as per configuration under the Group tab. If the user doesn't meet these requirements the promotion won't apply.

The problem I'm seeing is plan id 27 is a child plan of plan id 23, which has "Allow access from site frontend" set to "No: this plan is not visible in site, only in admin backend" under Access. Plan id 27 is also set to the same. This means these plans are not visible on frontend. You can't buy them on frontend. Is this intended? That setting is meant to be used to have backend based plans which don't have payment processing and are just programmatically assigned to users.

The plan access is likely the cause, but could also be due to the access check on the promotion. Does your test user have the required usergroup?


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.

  • 3by400Inc
  • 3by400Inc
  • OFFLINE
  • Posts: 119
  • Thanks: 11
  • Karma: 0
2 years 4 days ago #331848 by 3by400Inc
Replied by 3by400Inc on topic Programmatically invoice a subscriber
The test user I was using did have the correct group assignment and plan added to the basket. I also tried removing the group assignment condition from the promotion, but that didn't resolve it.

Regarding that particular case, our goal was to limit the ability for a user to subscribe to plan 27 until we supplied the link for them to add it to their basket. We don't want them to be able to choose to subscribe to the plan on-demand because it represents a certification they must meet requirements to achieve. Is there a better way to control the exact moment a user is offered plan 27 for subscription and still be able to apply the promotion to adjust their fee for GDP?

Concerning promotions in general, I've also tested with the promotion named "Test ECMS Fee" and tried various settings from different promotion types to different plans, plans that are available on the frontend, to just a blanket percent promotion on any plan. The promotion was never applied in the basket. The only condition on that promotion is a specific user ID of a test user I was testing with.

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

Moderators: beatnantkrileon
Powered by Kunena Forum