Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount! Get 20% off now with code SPOOKY-2024!

[SOLVED] Multi-user subscription calculated using CB Promotions + based upon criteria in fields

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago #218857 by krileon

I don't need custom help or bug fixing I just don't know how to work your system cos the manual isn't comprehensive.

There is nothing special to use or work. It's simply a textarea that you supply a MYSQL query to. So we of course can't have a manual for this, but you're welcome to review the below MYSQL documentation that I use frequently for function usage information.

dev.mysql.com/doc/refman/5.6/en/functions.html

There's also some SQL tutorials found below.

www.w3schools.com/sql/default.asp

1. cb_maxsubs - integer field not visible to user with default value 3500

This is already implemented in my example query, but it's not going to do anything at registration because it's not set yet. At least not until you edit their profile and supply the value. So I suggest just changing `cb_maxsubs` to 3500 hardcoded.

2. cb_noofpartners - integer field for user to enter number into during registration

Using my above examples you'd replace `cb_field` with `cb_noofpartners` it seams.

3. cb_cityinvoice and cb_countryinvoice - query field with your code in (city is £185 times by cb_noofpartners field value and country is £185 if cb_noofpartners is 1 or £98 if cb_noofpartners is more than one - both codes are set to max 3500 which is the value in cb_maxsubs field. These two query fields are set to show as read only but they don't appear where they should.

The queries are examples. You need to adjust them for your specific usage as needed. They do not need to be read only as they're query fields. They also do not show in profile edit. Query fields only have a profile view display, which outputs the results of the query. Ensure debug mode and maximum error reporting is enabled within Joomla global configuration when testing to expose errors if there are any.

Please can you review for me? I've PMd login info

No, as I've explained to you we do not do this. If you need us to implement something for you then you need to purchase by the hour services to do just that. As a courtesy I've already spent hours writing and testing custom queries for you in my previous posts. If you can not implement them then you need to hire someone who can or purchase our by the hour services for us to do it for you.


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.

11 years 9 months ago #218941 by jodee.peevor
Hiya
It's not your code it's how I set up the promotion I think.
Should the plan show £185? I've set the promotion to get its discount from the cb field noofpartners as a fixed value, I've substituted cb_maxsubs for 3500 in your code.
However on finishing a test subs registration it just shows £185 despite me having put 7 in cb_noofpartners field during registration.
I've painstakingly read the manual again but I can't think what's possibly wrong ;(
Jodee

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago #218942 by krileon
I've no idea how you've setup your promotion or setup the query field. Test the results on profile view instead of registration and ensure the query field is giving you the output that you need/want. For example, login and supply 7 to the field and check to see if the query field displays on profile the value you expected. If not adjust the query to output as you want.


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.

11 years 9 months ago #218977 by jodee.peevor
Good idea, but neither of the query fields display on the profile so I cant see the output ;(

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

11 years 9 months ago #218978 by jodee.peevor
Dont I have one in-depth support ticket with my subscription? Should I use this now?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago #218989 by krileon

Good idea, but neither of the query fields display on the profile so I cant see the output ;(

Then set the field to display on profile.

Dont I have one in-depth support ticket with my subscription? Should I use this now?

It's no different then the support you have here except is completely private. As I've explained we do not configure things for you unless you pay the hourly rate for us to do just that. Configuring this for you is beyond the scope of support, it's not a bug for us to investigate for example.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum