Questions tagged [system.xml]

Denotes question related to the system.xml module configuration file.

Filter by
Sorted by
Tagged with
1
vote
0answers
26 views

How can we clone groups like clone field in system.xml in Mageno 2?

In system.xml file, for cloning the fields we use clone_fields and clone_model. Here is the example: <group id="placeholder" translate="label" sortOrder="300" showInDefault="1" showInWebsite="1" ...
0
votes
0answers
11 views

I want to add multi select state dropdown field in system configuration based on country selection in magento2

Hello I have custom module configuration , in that i want to add multiple state selection functionality based on selected country id .. I have used below code in my system.xml but i only got select ...
2
votes
2answers
33 views

Custom system.xml source model, ReflectionException class does not exist

Writing a new module and in my system.xml I can put the following: <field id="environment" translate="label" type="select" showInDefault="1" showInWebsite="1" showInStore="1"> <label>...
1
vote
0answers
17 views

Magento 2: How to implement method _saveSection() of vendor\magento\module-config\Controller\Adminhtml\System\Config\Save.php

The definition of function says it further checks the method _saveVendorModule in the current class ($this) for custom logic. Does anyone has used this before to add or override some logic? /** * ...
0
votes
1answer
46 views

Magento 2.3: system.xml and config.xml: Default values not showing up in the admin

I'm developing a module for Magento 2.3 and can't get default config values to show up in the admin. To the best of my knowledge, I've followed all the documentation I can find. It's kind of driving ...
0
votes
1answer
28 views

What does “clone_fields” and “clone_model” attribute mean in vendor\magento\module-catalog\etc\adminhtml\system.xml?

<group id="placeholder" translate="label" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Product Image Placeholders</label> <clone_fields>1&...
0
votes
1answer
22 views

Can you perform Magento UI_Component Validation with value from store config?

Is it possible to get the minimum text length value from store config system.xml? <field name="mytext" sortOrder="20" formElement="input"> <argument name="data" xsi:type="array"> ...
0
votes
1answer
29 views

How to get only one Specific Country's States/Province in dropdown?

I'm working on Magento 2.3.2, I override a Shipping Method file which is system.xml for adding custom fields. Here it is: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1
vote
1answer
42 views

Dynamic element in system.xml field

I have a list of elements printed with a field type='checkboxes' but when I try to save only one of the results saved. As a solution to this problem, we tried to print each element with a checkbox ...
0
votes
1answer
35 views

How to Set Store Config (system configuration)

We can get system configuration values using Mage::getStoreConfig($xmlPath); But how can we set such configuration field programatically? I would expect some method like Mage::setStoreConfig($...
0
votes
0answers
21 views

In System.xml Label inside <field> is compulsory magento2?

I have just try to save config in Magento backend <field id="index" showInDefault="1" showInStore="0" showInWebsite="1" sortOrder="50" translate="label comment tooltip"> <...
0
votes
0answers
27 views

Read data from config admin variable in xml file

Is it possible to read data in xml file ?. For example I create custom block like so: <referencecontainer name="sidebar.knowledge"> <block class="Magento\Cms\Block\Block" name="knowledge-...
0
votes
0answers
20 views

Magento 2.3 Dynamic comment in system.xml group?

I need a way of adding a group comment that is dynamic, as I need to pass the stores URL (it gets added as a return URL for a 3rd party service) It seems like it used to be possible, using a model ...
1
vote
1answer
43 views

Magento 2: Get value from Cron system.xml

I would like to take the value of the ahead schedule of this system.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:...
1
vote
1answer
52 views

How to Validate Comma Seprated Values in Admin Configuration

I want to Add Validation of Comma Separated Values in Admin Configurations I Know How to Add Custom Validation Using Js is just need the Regex (Regular Expression)
0
votes
0answers
13 views

Add dynamic mass action in sales grid order magento 2 [duplicate]

I wrote this system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file....
0
votes
1answer
28 views

Magento 2 system xml config get groups name programtically

I have a custom phtml file in system config and been added to 3 groups: group_1, group_2, group_3 in phtml I have: <input id="my_value" type="number" name="groups[group_1][groups][my_settings]...
3
votes
3answers
205 views

Unable to save blank multiselect value in system configuration in Magento 2

I have created multiselect in system.xml with backend_model and customize afterSave function and return parent::afterSave(). <field id="populatavailablebanknetbanking" translate="label" type="...
0
votes
0answers
22 views

Get configValue in _prepareToRender function of a block

I want to get the configValue of system.xml in this block <?php namespace Module\Vendor\Block\Adminhtml\Menu\Field; use Magento\Config\Block\System\Config\Form\Field\FieldArray\...
2
votes
0answers
39 views

Take value of a field in a block and place it in another field

I have a problem taking values from a system.xml field to show them in another field. This is the system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
0
votes
1answer
41 views

How to Create Cart Price Rule Conditon in backend Configrations(system.xml)?

How to Create Cart Price Rule Conditon in backend Configrations system.xml
1
vote
2answers
34 views

Email template 'test_email_template' is not defined in magento 2 admin

system.xml <?xml version="1.0"?> <!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
0answers
17 views

Magento2 config data

If I retrieve some data from config: $allowedCurrencies = explode( ',', $this->scopeConfig->getValue( \Magento\Directory\Model\Currency::XML_PATH_CURRENCY_ALLOW, ...
0
votes
4answers
582 views

Magento 2 system configuration state multiselect dropdown

First i have created country drop-down in back-end system configuration, using source model as <source_model>Magento\Directory\Model\Config\Source\Country</source_model> Next based on ...
1
vote
1answer
66 views

system.xml What is the difference in adding a new configuration option process for different option types (secret, file)?

From the official M2 Developer certification guide I'm stuck at this question. How would you add a new system configuration option? What is the difference in this process for different option ...
2
votes
1answer
26 views

Is there an official detailed documentation of the possible nodes,values and attributes than can be found in system.xml?

Is there an official detailed documentation of the possible nodes,values and attributes than can be found in system.xml I can figure out the meaning of some of them myself, but some of them elude me. ...
3
votes
1answer
76 views

Retrive Configuration data via API

Is Magento giving any default REST API for retrieving configuration (system.xml) data ?. If yes then share URL. Else share the best approach for retrieving configuration data via REST API.
0
votes
0answers
6 views

Magento 2 Create Url Rewrite from configuration system.xml

How to create url rewrite from system.xml configuration for particular store view when saved. Best!
7
votes
2answers
196 views

How to show Categories in System.xml in magento 2

I'm getting all the categories in System.xml using the class Vender\Module\Model\Config\Source\Category <?php namespace Vender\Module\Model\Config\Source; use Magento\Framework\Data\...
1
vote
2answers
66 views

getting 404 on system configuration

I am using Magento 1 to create a system configuration left menu is created successfully but when I click on that getting 404. what I have tried Re-logging into the dashboard. Using ACL. Clearing var/...
2
votes
2answers
122 views

How to create a table in configuration system.xml file in Magento 2?

How can i create table in system.xml file is there any way? I had searched around but can't find any solution want to create like this
1
vote
1answer
36 views

Magento 2 Configuration depends

In my configuration, I have two field number x and number y. I want to add a condition in which the number y must be less than the number x. How can I write this condition in a configuration file (...
1
vote
1answer
82 views

Magento 2 : toggle whole group in system.xml based on field in another group

I have created two groups in system.xml. I need to show/hide group 2 depending on the "Module Enable" field in group 1. But when I use the following code it hides both the sections and does not save ...
1
vote
0answers
206 views

how to set default value for multi select field e.g specificcountry?

I've a field in system.xml <field id="specificcountry" translate="label" type="multiselect" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> <label>Ship to ...
1
vote
3answers
571 views

How to implement Time Range Picker in Magento 2 Admin system.xml?

I found one similar solution that almost does what I want. DateTimePicker System.xml I have implemented its code and was able to display a DateTime Picker in my admin configuration. However, I ...
0
votes
1answer
107 views

Magento 2 Store View multiselect in system.xml

I am not able to add store view selection in system.xml I am only able to add in the ui form field component: When I tried to add in system.xml it gives the error: 1 exception(s): Exception #0 (...
0
votes
1answer
286 views

magento2 enable/disable value get and set value

I have a module which shows value in the frontend, and from admin system configuration I want to disable that module options are coming like yes/no no I want to get that value of enabling/ disable ...
1
vote
1answer
145 views

How to get Label and Value both from system.xml. Magento 2?

I want to get the value and label both from the system.xml I'm trying etc/adminhtml/system.xml <field id="link" translate="label" type="select" sortOrder="20" showInDefault="1" ...
1
vote
1answer
262 views

Magento2: How to disable password autofill on store-configuration?

I have 2 fields on my system.xml. The first one is an authentication key (obscured). The second one is an email. The thing is, because I use my email & it's also saved in my browser with a ...
2
votes
0answers
667 views

Exception #0 (Exception): Notice: Undefined index: id in \vendor\magento\module-config\Model\Config\Structure\Element\Iterator.php on line 63

1 exception(s): Exception #0 (Exception): Notice: Undefined index: id in C:\wamp64\www\codility-magento-market-place\vendor\magento\module-config\Model\Config\Structure\Element\Iterator.php on line 63 ...
1
vote
1answer
47 views

Detect change in system.xml field with observer

I need to config a observer to detect when a option created in system.xml change its value. The field is made by the code above: <config> <sections> <dev> &...
0
votes
1answer
19 views

Source Model for Catalog product tye

I am creating a bespoke extension and I want to allow the admin to choose to restrict by product types eg Simple, Configurable, Bundle etc The issue is I am not sure what source model to use. I have ...
1
vote
2answers
317 views

Display htmlContent in configuration in magento 2

i want to show some htmlContent in configuration. System.xml. how it could be?
0
votes
1answer
116 views

Magento 2. How to create StoreView in System.xml

How to create Store View in System.xml. I can explain it with image given below
2
votes
2answers
2k views

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

I understand that we can create a toggle switch using form with ui_component. However, I want to create an admin configuration for my custom module using system.xml configuration. Is there any way ...
0
votes
1answer
166 views

Render fields base on attributes to system.xml

Is there way to list all of catalog attributes in my custom catalog tab? each attribute as field label and a text input field, basically mapping a text to an attribute name / key or if there is a ...
-2
votes
1answer
202 views

Magento 2 How can I create two different sections under the same tab item in admin menu?

I have created two different modules, now I want to create one tab in admin system configuration and show both modules configurations in different tabs. I have two different modules within same "...
4
votes
1answer
304 views

Magento 2 Scope Interface Model

I have recently gone through magento's core ScopeInterface file which is located in Magento\Store\Model. My question is why magento define SCOPE_STORES & SCOPE_STORE similar as WEBSITE and for ...
1
vote
1answer
100 views

Magento 2 Saving store configuration programatically in upgrade script

I want to save store configuration programtically but I'm just getting one problem after another. Firstly I wanted to use Writer class but since it only updates core_config_data table it doesn't work ...
1
vote
2answers
468 views

How to add placeholder in system.xml for custom admin configuration fields in magento 2

I am creating field by using this code in my system.xml file of custom module <field id="SenderCity" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"&...