56
votes
Accepted
Magento 2: available field types in system.xml
Magento 2 system configuration provides below fields type.
checkbox,
checkboxes,
column,
date,
editablemultiselect,
editor,
fieldset,
file,
gallery,
hidden,
image,
imagefile,
label,
link,
multiline,
...
43
votes
How can I decrypt an encrypted configuration value?
\Magento\Framework\App\Config\ScopeConfigInterface::getValue will return the decrypted value. When ScopeConfigInterface::getValue returns an encrypted value, the configuration option is setup ...
35
votes
Accepted
How can I decrypt an encrypted configuration value?
Finally Get Success In Decrypt code...
protected $_encryptor;
public function __construct(
\Magento\Framework\Encryption\EncryptorInterface $encryptor,
) {
$this->_encryptor = $encryptor;
...
27
votes
How can I decrypt an encrypted configuration value?
If you have n98-magerun2.phar installed, you can get a decrypted config value with something like:
php bin/n98-magerun2.phar config:store:get --decrypt payment/webpay/keyid
You can also set ...
21
votes
Magento 2 - Category list for custom magento system configuration section
VendorName/ModuleName/etc/adminhtml/system.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:...
19
votes
Magento 2: available field types in system.xml
Looking at the file /lib/internal/Magento/Framework/Data/Form/Element/Factory.php (sources on Github, for Magento 2.2 & 2.3), one can find the following default list of elements, as specified by ...
19
votes
Can we increase the system/security/session size at admin On Magento 2
Magento 2.4.3 introduces a setting for max session size with default value 256000.
To increase the max session size for admin and prevent Session size of 123456 exceeded allowed session max size of ...
11
votes
Accepted
Magento 2: How to get store logo in footer phtml?
You should inject the logo class \Magento\Theme\Block\Html\Header\Log on your footer block class then You can get $this->_logo->getLogoSrc()
See at https://www.mageplaza.com/how-get-logo-url-...
11
votes
Magento 2 : Remove Delete Image checkbox from image type system configuration
You should create a custom renderer for the image. and created a class in your module
[Namespace]_[Module]_Block_Adminhtml_Helper_Image_Required
with this content
class Required extends \Magento\...
10
votes
Error when saving configuration in Magento 2
I got the same error but my system.xml syntax was correct, so it was something else. Turns out it was the result of my cron_group being incorrectly configured, which caused errors when trying to save ...
8
votes
Accepted
Magento 2 - Category list for custom magento system configuration section
In system.xml file field for multi select of category is like:
<group id="bannerblock_setting" translate="label" type="text" default="1" sortOrder="3" showInDefault="1" showInWebsite="1" ...
7
votes
Accepted
Magento 2 : Get value from system configuration in layout XML
You have to write a "helper" (a method in any class of your module) and use xsi:type="helper as described here: How to get output from helper for path argument in layout?
You should do the same for ...
7
votes
Accepted
System Config Multiselect default all selected
Use DataScript to store data in config module.
How to create data script
http://inchoo.net/magento/magento-install-install-upgrade-data-and-data-upgrade-scripts/
In datascript simply call the core ...
6
votes
Accepted
Magento 2 custom module configuration settings not display in admin
Its because you haven't written the source_model node correctly, There should be no spaces while specifying its value.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/...
6
votes
Accepted
System Configuration field Validation
You can use this code for better output with validation :
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
6
votes
Accepted
Display Customer Groups Dropdown in admin system configurations in custom module of Magento 2
Here is the code which I have used in my custom module. Hope this will also help you.
Add below code in Vendor/Module/etc/adminhtml/system.xml file.
<?xml version="1.0"?>
<...
5
votes
Miscellaneous HTML not showing
Since Magento 2.1 Design settings was moved to Content/Design/Configuration
5
votes
System Configuration field Validation
Thank you for asking about this validation. Use this validation for your query:
<validate>validate-length maximum-length-50</validate>
For Example:
<group id="customer_service" ...
5
votes
Accepted
color picker in configuration Mismatched anonymous define() module in Magento 2
As per your error you want to add adminhtml_system_config_edit.xml on path Vendor/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml in your module and add below code:
<?xml version=&...
4
votes
Accepted
How to detect changed fields only in admin section?
If this custom field comes from your own module, you can use a backend model to do additional things before save:
Add this to the field definition in system.xml
<backend_model>your_module/...
4
votes
Accepted
Settings defined in website scopes are ignored
This is a core bug in 2.1.3 - https://github.com/magento/magento2/issues/7943
There is a fix for the issue here - https://github.com/magento/magento2/blob/develop/app/code/Magento/Store/Model/Config/...
4
votes
Magento 2: How to get store logo in footer phtml?
<?php echo $this->getLayout()->createBlock("Magento\Theme\Block\Html\Header\Logo")->setTemplate("Magento_Theme::html/header/logo.phtml")->toHtml(); ?>
You can try this one....
4
votes
getting config value in cms pages magento2
In Magento 2 you can only use a small set of config paths in the {{config}} directive in blocks or pages.
The story behind it (scroll lower for solution):
The class that handles the {{...}} ...
4
votes
get System configuration fields values - custom module
Recommended way
<?php
namespace QaisarSatti\HelloWorld\Helper;
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
public function getConfig($config_path)
{
return $...
4
votes
Accepted
Magento 2 : Remove Delete Image checkbox from image type system configuration
With the help of Muhammad Hasham's answer, I have manage to remove delete checkbox from system config
Image.php
<?php
namespace Demo\Generalconfiguration\Data\Form\Element;
use Magento\...
4
votes
Accepted
Change admin backend password minimum length
In any of your module you need to override admin edit validation
You need to add the validation JavaScript to the edit user page in the admin, create a adminhtml_user_edit.xml layout file, and ...
4
votes
Accepted
Magento 2.3.3 System Configuration Tab label Not Support Image Tag
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="...
3
votes
System Config Multiselect default all selected
<default>
<mytab>
<mysection>
<attributes><!-- ***WHAT SHOULD I WRITE HERE*** --></attributes>
</mysection>
</mytab>...
3
votes
System Config Multiselect default all selected
I give multiselect example.
<fields>
<view_style translate="label">
<label>Display Settings</label>
<frontend_type>multiselect</frontend_type>
...
3
votes
Magento 2 - Allow frontend run in frame
Open the env.php file and put
'x-frame-options' => 'SAMEORIGIN',
Magento wants this in env.php because they claim that it’s more secure than setting a value in the Magento Admin.
Possible ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
system-configuration × 117magento2 × 66
system.xml × 23
magento-1.9 × 18
system-config × 18
configuration × 9
admin × 7
module × 6
core-config-data × 6
magento2.3 × 5
magento-2.1 × 4
database × 4
category × 3
event-observer × 3
adminhtml × 3
backend × 3
admin-panel × 3
validation × 3
server-setup × 3
acl × 3
dependency × 3
magento2.2 × 2
xml × 2
multistore × 2
magento2.2.2 × 2