Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8253773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:59:26+00:00 2026-06-08T00:59:26+00:00

Are there any plugins or hacks that let me use alphauserpoints credits towards payments

  • 0

Are there any plugins or hacks that let me use alphauserpoints credits towards payments for adsmanager adverts in joomla?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:59:28+00:00Added an answer on June 8, 2026 at 12:59 am

    Here is my solution for Alphauserpoints 1.7.4, Adsmanager 2.7 RC3 and PaidSystem.

    Edit components\com_paidsystem\api.paidsystem.php

    After defined('_JEXEC') or die( 'Restricted access' ); add the below code

    //AlphaUserPoints start
    $api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
    if ( file_exists($api_AUP))
    {
        require_once ($api_AUP);            
    }
    //AlphaUserPoints end
    

    Next you need to edit function getBalance($userid). This is in api.paidsystem.php

    function getBalance($userid)
    {
        //Alphauserpoints substitute for value
        //Get the RefferreID of a user
        $referreid = AlphaUserPointsHelper::getAnyUserReferreID((int)$userid);
        $profil=AlphaUserPointsHelper:: getUserInfo ($referreid);
        $value=$profil->points;
        //Alphauserpoints substitute for value end
    
        //ORIGINAL CODE BELOW
        /*$db =JFactory::getDbo();
        //$db->setQuery( "SELECT credit FROM #__paidsystem_credits WHERE    userid=".(int)$userid );
        //To explicitly convert a value to integer, use either the (int) or     (integer) casts. 
        $value = $db->loadResult();*/
    
        if ($value == "")
            $value = 0;
        return $value;
    }
    

    Then edit the next function

    //EDIT this to debit credits from alphauserpoints
    //Use alphauserpoints rule to debit from alphauserpoints.
    
    function removeCredits($userid,$num,$description) 
    {   
        $db =JFactory::getDbo();
        //$db->setQuery( "SELECT credit FROM  #__paidsystem_credits WHERE userid=".(int)$userid );
        //$balance = (float) $db->loadResult();
        $referreid = AlphaUserPointsHelper::getAnyUserReferreID((int)$userid);
        $profil=AlphaUserPointsHelper:: getUserInfo ($referreid);
        $balance=$profil->points;
    
        //$db->setQuery( "UPDATE #__paidsystem_credits SET credit=credit-".(float)$num." WHERE userid=".(int)$userid );
        //$db->query();
        echo "removeCredits=$userid,$num";
        $obj = new stdClass();
        $obj->userid = $userid;
        $obj->balance = $balance;
        $obj->change = $num * -1;
        $obj->description = $description;
        $obj->date = date("Y-m-d H:i:s");
    
        AlphaUserPointsHelper::newpoints( 'plgaup_purchaseadvertising', '','', 'purchase advertising', $num*-1);
    
        $db->insertObject("#__paidsystem_history",$obj);        
    }
    

    REMEMBER: You will need to create a new rule in the administrator section of the alphauserpoints component in Joomla for this to work. In my code the new rule name was called plgaup_purchaseadvertising.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any plugins or hacks that allow assigning widgets to individual pages? EDIT:
Is there any plugins I can use for Eclipse that will show graphical view
Is there any plugin for VIM that I can use to index an C++
Are there any plugins for WordPress that allow users to create blog posts without
Are there any plugins or tools that can examine HTML and related CSS files
Are there any tools I can use so that if someone clicks on a
Are there any plugins for eclipse that add syntax highlighting and other niceties for
Aside from DeployerFTP, are there any plugins that offer the ability to deploy a
Are there any plugins or built-in methods in Vim for performing refactoring on C
Are there any plugins available which will commit the build artifact back to SVN?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.