Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

Custom folder not reflecting changes

Custom folder not reflecting changes

Hello, I have a problem changing the currency format.
According to the documentation, I created /custom/modules/Currencies/Currency.php copied the code from /modules/Currencies/Currency.php there and worked on the changes.
Unfortunately it looks like the app is still looking at the original folder and I can't see any changes.
If I change something in the original folder, the changes are visible immediately.
I tried rebuild and it didn't work either.

Version 7.11.20

Thanks for any help

Is this the first time you have changed anything in the custom directories - or have you got other changes to work.

Can you share

  • your file permissions for that new custom directory
  • what changes you make to the new file.

I have already edited the other folders successfully and my rights are currently set on the local environment to all granted.
I’m trying to change position of currency sybmol in function format_place_symbol.

function format_place_symbol($amount, $symbol, $symbol_space)
    if ($symbol != '') {
        if ($symbol_space == true) {
            $amount = $amount . ' ' . $symbol;
        } else {
            $amount = $amount . $symbol;
    return $amount;

Placing a file with the same name under custom folder is one way of customizing SuiteCRM, but it is not the only way, not even the preferred way.

It only works when the code that loads the file is prepared to look for a file under custom, so go find the place where that function’s file is required, and see if it’s looking for a possible custom version.

From a quick look I see a bunch of places where it’s not checking custom folder. Sometimes the solution in these cases is to customize one level before: customize the file with the require, and change that require to something like

require_once get_custom_file_if_exists('modules/Currencies/Currency.php');

I also see there’s a beanFiles definition for this module in include/modules.php. You can probably use the Extension mechanism to customize this. Search these forums for examples customizing beanFiles definitions.