14 votes
Accepted

How to get store config inside a theme template

I suggest you create your own block, which will extend the Magento\Framework\View\Element\Template class. As the Magento\Framework\App\Config\ScopeConfigInterface is part of Magento\Framework\View\...
user avatar
14 votes

Get config value for specific store from admin area

=> For Magento 1.9 : Get Store Id : Mage::app()->getStore()->getStoreId(); Get Config Value : $configValue = Mage::getStoreConfig('sectionName/groupName/fieldName'); as per store vise : $...
user avatar
  • 16.6k
12 votes
Accepted

Magento 2: Get admin config values

First of all, the system config admin in Magento 2 has a separate system.xml config. It is put under etc/adminhtml/system.xml Second, If you want to get the custom value. You need to use \Magento\...
user avatar
10 votes

dynamic key => value pair adminhtml setting for custom module

So, user can create as many key ==> value pair matching as they want. For this I would recommend the "Array" frontend and backend models, which work similar to the tier price definition in products. ...
user avatar
10 votes
Accepted

How is the start page of System Configuration (admin/system_config/index) defined?

This depends on the sort_order of the sections in the system.xml, some extensions put very low value on this making their "important" configuration open instead the "General" page
user avatar
  • 1,198
10 votes
Accepted

system.xml dependencies across groups/fieldsets

After consulting the appropriate core file a cross group/fieldset <depends> looks like this: <!-- … --> <hello_message> <label>Message</label> <frontend_type&...
user avatar
  • 761
9 votes
Accepted

Role resource tree not displaying in magento2

After long research, I am able to resolve this problem. A mistake was in the format of XML . Initial code : <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
user avatar
  • 3,018
9 votes

How is the start page of System Configuration (admin/system_config/index) defined?

Thanks to Zifius' answer I wrapped my head around it. Many modules make this mistake when adding a configuration group to an existing section (here: adding "orderexport" to "advanced > admin"): <...
user avatar
9 votes
Accepted

Magento 2 : How to check multiple if config in layout?

ifconfig supports only one value. In order to solve your problem, I suggest creating your own block that extends Magento\Framework\View\Element\Html\Link and add the conditions in the _toHtml method. ...
user avatar
  • 195k
8 votes

Magento2.2.3 - Admin store configuration is save but not display in admin panel

I get the solution to this problem. If anyone faces this problem, Require to remove var/page_cache and var/session folder. After saving the configuration, you can able to see changes in the admin ...
user avatar
7 votes
Accepted

System configuration custom source model error

Dropdown cannot get it Source model macerier_test/system_config_source_dropdown_values that why it showing the error May be you did not define model prefix. As per as your code macerier_test . ...
user avatar
  • 75.7k
7 votes
Accepted

Conditionally show block in layout XML

Yes you can but you cannot check a specific value using layout. So for example, you can do the following that checks to make sure the contacts page is enabled; <block class="Magento\Framework\View\...
user avatar
  • 3,190
6 votes
Accepted

Custom admin module system configuration not working - 404 Error

Okay, I figured it out (thanks to http://alanstorm.com/custom_magento_system_configuration). Silly mistake on the ACL definition. This is the correct XML: <acl> <resources> &...
user avatar
  • 1,018
6 votes

How to get store config inside a theme template

We can directly get a store config in the template by getting instance of Magento\Framework\App\Config\ScopeConfig: \Magento\Framework\App\ObjectManager::getInstance() ->get('Magento\Framework\...
user avatar
6 votes
Accepted

How to add a multiselect field to system config field table?

I haven't tested this, so I'm just taking a wild guess. The link you mentioned from integer-net explains how to use a select field using a class ...
user avatar
  • 195k
6 votes

Get system config option inside source model of another option

The way you approach to make the custom configuration fields dependant will be achieved through the steps suggested by @Piyush and @Lez(Using source models with request library). However, this ...
user avatar
  • 1,148
6 votes

Implement "Use system value" in custom module

canRestore property etc/adminhtml/system.xml <field id="some" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> ... </...
user avatar
  • 599
6 votes
Accepted

Magento 2 : Specific Range Validation in system configuration field

Add this code in your system.xml : <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
user avatar
  • 16.6k
5 votes
Accepted

Dependent Groups on System Configuration

You can put JavaScript in the comment area. It can be something like this: <comment><![CDATA[ <script type="text/javascript"> document.observe("dom:loaded",function(){ ...
user avatar
  • 583
5 votes
Accepted

Set Magento Config Data For Script Duration Only

The problem with setNode() is that it does not refresh the config cache in Mage_Core_Model_Store. This is not the Magento cache but a PHP array, populated at runtime on store initialization for store ...
user avatar
5 votes

Magento 2 - How to config mail sending?

Mailing in Magento 2 isn't sended by smtp by default, it uses mail PHP function. To use smtp you have to install extension, ie. Extension1 (paid) or Extension2 (free) You can also write your own ...
user avatar
5 votes

Magento 2 - How to config mail sending?

Without adding an extention, the best way is to add and configure PostFix for Gmail account (Tested on Mac & Linux): SASL Authentication Connecting to the Gmail SMTP server requires both SSL and ...
user avatar
5 votes
Accepted

Undefined index: label vendor/magento/framework/Data/Form/Element/Select.php on line 68

Was just a typo in my custom payment method's /etc/config.xml <group>Offline</group> Should be <group>offline</group>
user avatar
  • 2,707
5 votes
Accepted

Magento1 Mage::getStoreConfig non cached value

I do not believe this is possible. You could look into querying the database directly for the value in core_config_data but you should really let Magento handle the full configuration and merging as ...
user avatar
  • 4,392
5 votes
Accepted

Magento 2 toggle switch (yes/no) in admin config of custom module using system.xml or in any programmatic way

After several research, I come up with this solution. (Not a clean code but still able to come up with the expected results) I ended up creating a block to be inserted in the admin system config using ...
user avatar
  • 4,482
4 votes
Accepted

Config value not rendering in Magento 2

Finally I have achieved by updating Customer.php file from Helper class <?php namespace Learning\Custom\Helper; class Customer { const XML_PATH = 'custom_customer/custom_customer_nav_api/...
user avatar
  • 3,896
4 votes

Only one base currency is displaying in magento admin panel?

What I think has happened here is that the list of installed currencies has been edited. You can see this list under Advanced->System->Currency->Installed Currencies. What you can do here is ...
user avatar
4 votes
Accepted

Page not found 404 when accessing custom module in system configuration

Most likely it's cache playing the role. Just Log Out and Log In again. See this why you need to do this. Also, consider adding ACL role, if you haven't already added. Learn how to add ACL here.
user avatar
4 votes
Accepted

Admin config with extendable amount of fields

To add an "Add field" button to you config field, you can use this: app/code/POOL/My/Module/etc/system.xml <delay_by_country translate="label"> <label>Email delay per country</...
user avatar
  • 11.5k
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 $...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible