Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
Credit system documentation
musiccreatures



Joined: 20 Jun 2009
Posts: 344
Location: Portland Oregon

Posted: 10/08/10 19:59 
I realize that you guys are busy writing new and exciting features for the next Jamroom release/update, but i was wondering if you plan on updating the Developer docs or function references to cover the new credit system? I have received a number of feature request for mcClassifiedAds that involve supporting the new credit system. Also I have a couple of projects that are almost in testing, and I would love to be able to support the credit system, as well.

I imagine I can access the credits that a user has by accessing the $_user[] array, but I was wondering if there was any new functions that I can utilize to "spend" or reward credits?

BTW I love the new jamroom 4.2.x. GREAT JOB Smile

Thanks,
Tim

Back to top
musiccreatures



Joined: 20 Jun 2009
Posts: 344
Location: Portland Oregon

Posted: 09/23/11 18:41 
Is there no documentation on the credit system for developers? This post is almost a year old and still no answers?

Thanks,
Tim McCune

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/23/11 21:16 
take a look in jamroom-payment.inc.php at the available credit functions.


Quote:
The jrUserCredit_logger function is used for logging a credit action to the database



Quote:
The jrUserCredit_received_credit function will test to see if a User already received credit for a given action



Quote:
The jrUserCredit_adjust_credit function is used to adjust an incoming value back to it's "normal" amount by applying credit.



Quote:
The jrUserCredit_adjust_total function is used to apply User Credit to a checkout, and it will adjust the price of the tems accordingly so checkout can happen at the processor.



Quote:
The jrUserCredit_amount_convert function is used for converting a price into credits, or vice versa, for display.


See if any of those are useful. If not, might need to write your own.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
musiccreatures



Joined: 20 Jun 2009
Posts: 344
Location: Portland Oregon

Posted: 09/23/11 21:36 
Thanks for your response. I did look at the jamroom-payment.inc.php script. I guess I was just hoping their was some updated documentation on the credit system as well as cart, payment system. Or perhaps Function reference update. I just hope to avoid re-inventing the wheel if one already exists Smile

Anyway, Thanks again for taking the time to answer my post.

-Tim McCune

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/23/11 22:52 
take a look in jamroom-hooks.inc.php around line 250 for a credit changing SQL query.

then build that in to your custom function with the function above to log it and then always change it that way for consistency.

updateUserCreditCustomFunction($user_id, $and, $other, $params);


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
musiccreatures



Joined: 20 Jun 2009
Posts: 344
Location: Portland Oregon

Posted: 09/23/11 23:26 
Perfect. Thanks again for all your help. Been trying to get mcClassifiedAds V2.x finished. Kinda ran into a road block with this. You were a big help. Thanks again.

-Tim McCune

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.