Developer Center

Defining Custom Function for Admin Area

When naming the function you will create in the class, you must use use_adminArea_ in its prefix.

Custom Function Usage Areas
  • Used to display a content you will reflect without including the site theme.
  • Used to get a process done and get a result when the buttons are clicked.
public function use_adminArea_custom_function()
{
    if(Filter::POST("var2"))
    {
        echo  Utility::jencode([
            'status' => "successful",
            'message' => 'Successful message',
        ]);
    }
    else
    {
        echo "Content Here...";
    }

    return true;
}

See the following examples for its use in pages/order-detail.php file.

Javascript Ajax Method

<a href="javascript:void 0;" onclick="run_transaction('custom_function',this);" data-fields='{"var1":"test1","var2":"test2"}'>Example Custom Function</a>

Page Refreshing Method

<a href="<?php echo $module->area_link; ?>?operation=operation_special_automation&use_method=custom_function">Example Custom Function</a>
Multi-Purpose Admin Area Buttons Creating Action Log and Module Log

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top

New Year's Special Discount

"Startup Lifetime" and "Professional Lifetime" licenses are 30% off!

Coupon Code:
HAPPYYEARS30 Copied!
Discount Rate 30%
Expiration Date December 31, 2024