Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

Godfather Program

  • 8me
  • 8me
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
12 years 2 months ago - 12 years 2 months ago #214904 by 8me
Godfather Program was created by 8me
Hi everybody,
I have developed a commercial website and to increase the sales I want to install a godfather program.
I use CBsubs for normal sales, not for subscription. I sale credits.

So,On the registration page, I want to add a field in the form, where the people can put the email or the name of their godfather. (this is easy to do).
But after that, when the member buy credit on the website, the godfather will also win a percentage of the credits..
I know that we can use on plan "integration >> Cbfield" but I don't want to change the field of the buyer but of his godfather... so I don't know how to do ?
Last edit: 12 years 2 months ago by 8me.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214975 by krileon
Replied by krileon on topic Re: Godfather Program
You'll need to use CBSubs SQL Actions to query the database and adjust the amount for that user. Example as follows
Code:
UPDATE `#__comprofiler` SET `cb_credits` = ( `cb_credits` + 50 ) WHERE `id` = ( SELECT `id` FROM `#__users` WHERE `email` = '[cb_godfather]' )


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