Magento 2 | get value from system.xml The Next CEO of Stack OverflowMagento2 -How to get data from system configurationHow can i rewrite TierPrice Block in Magento2Saving properties of external platform in custom admin page in magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2 Add new field to Magento_User admin formMagento 2: How to get system.xml config values?Magento 2 custom module system configuration translationMagento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

What is ( CFMCC ) on ILS approach chart?

What's the best way to handle refactoring a big file?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Why didn't Khan get resurrected in the Genesis Explosion?

How do we know the LHC results are robust?

Complex fractions

Contours of a clandestine nature

Is it professional to write unrelated content in an almost-empty email?

Different harmonic changes implied by a simple descending scale

Written every which way

Won the lottery - how do I keep the money?

How does the mv command work with external drives?

How do I go from 300 unfinished/half written blog posts, to published posts?

Do I need to enable Dev Hub in my PROD Org?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

Unreliable Magic - Is it worth it?

Giving the same color to different shapefiles in QGIS

Why do remote companies require working in the US?

MessageLevel in QGIS3

What does convergence in distribution "in the Gromov–Hausdorff" sense mean?

What benefits would be gained by using human laborers instead of drones in deep sea mining?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin



Magento 2 | get value from system.xml



The Next CEO of Stack OverflowMagento2 -How to get data from system configurationHow can i rewrite TierPrice Block in Magento2Saving properties of external platform in custom admin page in magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2 Add new field to Magento_User admin formMagento 2: How to get system.xml config values?Magento 2 custom module system configuration translationMagento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options










2















I have created a menu in the configuration menu.




system.xml:




I have an observer and I want to get the values of those two fields.



How can I do that?



Thanks for any help!










share|improve this question
























  • Check that link you will get answer of your question by help of this . magento.stackexchange.com/questions/87789/…

    – Ansar Husain
    Jul 27 '18 at 9:33
















2















I have created a menu in the configuration menu.




system.xml:




I have an observer and I want to get the values of those two fields.



How can I do that?



Thanks for any help!










share|improve this question
























  • Check that link you will get answer of your question by help of this . magento.stackexchange.com/questions/87789/…

    – Ansar Husain
    Jul 27 '18 at 9:33














2












2








2








I have created a menu in the configuration menu.




system.xml:




I have an observer and I want to get the values of those two fields.



How can I do that?



Thanks for any help!










share|improve this question
















I have created a menu in the configuration menu.




system.xml:




I have an observer and I want to get the values of those two fields.



How can I do that?



Thanks for any help!







magento2 configuration






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 12 mins ago







k33n

















asked Jul 27 '18 at 9:19









k33nk33n

455110




455110












  • Check that link you will get answer of your question by help of this . magento.stackexchange.com/questions/87789/…

    – Ansar Husain
    Jul 27 '18 at 9:33


















  • Check that link you will get answer of your question by help of this . magento.stackexchange.com/questions/87789/…

    – Ansar Husain
    Jul 27 '18 at 9:33

















Check that link you will get answer of your question by help of this . magento.stackexchange.com/questions/87789/…

– Ansar Husain
Jul 27 '18 at 9:33






Check that link you will get answer of your question by help of this . magento.stackexchange.com/questions/87789/…

– Ansar Husain
Jul 27 '18 at 9:33











1 Answer
1






active

oldest

votes


















1














Try to use this below code in your observer :



protected $scopeConfig;

const XML_PATH_CREDIT_CARD = 'uv_email/general/uv_email_kredit';
const XML_PATH_SALES_TEAM = 'uv_email/general/uv_email_vertrieb';

public function __construct(
......
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
......
)
......
$this->scopeConfig = $scopeConfig;
......


public function execute(MagentoFrameworkEventObserver $observer)

$storeScope = MagentoStoreModelScopeInterface::SCOPE_STORE;
$credit_card_value = $this->scopeConfig->getValue(self::XML_PATH_CREDIT_CARD, $storeScope);
$sales_team_value = $this->scopeConfig->getValue(self::XML_PATH_SALES_TEAM, $storeScope);






share|improve this answer

























  • Use this updated answer.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 9:46











  • Fatal error: Uncaught TypeError: Argument 1 passed to UOCheckCartSpecialProductsObserverAfterPurchaseObserver::__construct() must implement interface MagentoFrameworkAppConfigScopeConfigInterface, none given,

    – k33n
    Jul 27 '18 at 10:09











  • Remove var/generation or generated/ folder after add this code.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:12











  • Go to core_config_data table in database. Then, search "uv_email/general/uv_email_kredit" in path column and check value is available or not.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:19











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f236210%2fmagento-2-get-value-from-system-xml%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Try to use this below code in your observer :



protected $scopeConfig;

const XML_PATH_CREDIT_CARD = 'uv_email/general/uv_email_kredit';
const XML_PATH_SALES_TEAM = 'uv_email/general/uv_email_vertrieb';

public function __construct(
......
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
......
)
......
$this->scopeConfig = $scopeConfig;
......


public function execute(MagentoFrameworkEventObserver $observer)

$storeScope = MagentoStoreModelScopeInterface::SCOPE_STORE;
$credit_card_value = $this->scopeConfig->getValue(self::XML_PATH_CREDIT_CARD, $storeScope);
$sales_team_value = $this->scopeConfig->getValue(self::XML_PATH_SALES_TEAM, $storeScope);






share|improve this answer

























  • Use this updated answer.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 9:46











  • Fatal error: Uncaught TypeError: Argument 1 passed to UOCheckCartSpecialProductsObserverAfterPurchaseObserver::__construct() must implement interface MagentoFrameworkAppConfigScopeConfigInterface, none given,

    – k33n
    Jul 27 '18 at 10:09











  • Remove var/generation or generated/ folder after add this code.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:12











  • Go to core_config_data table in database. Then, search "uv_email/general/uv_email_kredit" in path column and check value is available or not.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:19















1














Try to use this below code in your observer :



protected $scopeConfig;

const XML_PATH_CREDIT_CARD = 'uv_email/general/uv_email_kredit';
const XML_PATH_SALES_TEAM = 'uv_email/general/uv_email_vertrieb';

public function __construct(
......
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
......
)
......
$this->scopeConfig = $scopeConfig;
......


public function execute(MagentoFrameworkEventObserver $observer)

$storeScope = MagentoStoreModelScopeInterface::SCOPE_STORE;
$credit_card_value = $this->scopeConfig->getValue(self::XML_PATH_CREDIT_CARD, $storeScope);
$sales_team_value = $this->scopeConfig->getValue(self::XML_PATH_SALES_TEAM, $storeScope);






share|improve this answer

























  • Use this updated answer.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 9:46











  • Fatal error: Uncaught TypeError: Argument 1 passed to UOCheckCartSpecialProductsObserverAfterPurchaseObserver::__construct() must implement interface MagentoFrameworkAppConfigScopeConfigInterface, none given,

    – k33n
    Jul 27 '18 at 10:09











  • Remove var/generation or generated/ folder after add this code.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:12











  • Go to core_config_data table in database. Then, search "uv_email/general/uv_email_kredit" in path column and check value is available or not.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:19













1












1








1







Try to use this below code in your observer :



protected $scopeConfig;

const XML_PATH_CREDIT_CARD = 'uv_email/general/uv_email_kredit';
const XML_PATH_SALES_TEAM = 'uv_email/general/uv_email_vertrieb';

public function __construct(
......
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
......
)
......
$this->scopeConfig = $scopeConfig;
......


public function execute(MagentoFrameworkEventObserver $observer)

$storeScope = MagentoStoreModelScopeInterface::SCOPE_STORE;
$credit_card_value = $this->scopeConfig->getValue(self::XML_PATH_CREDIT_CARD, $storeScope);
$sales_team_value = $this->scopeConfig->getValue(self::XML_PATH_SALES_TEAM, $storeScope);






share|improve this answer















Try to use this below code in your observer :



protected $scopeConfig;

const XML_PATH_CREDIT_CARD = 'uv_email/general/uv_email_kredit';
const XML_PATH_SALES_TEAM = 'uv_email/general/uv_email_vertrieb';

public function __construct(
......
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
......
)
......
$this->scopeConfig = $scopeConfig;
......


public function execute(MagentoFrameworkEventObserver $observer)

$storeScope = MagentoStoreModelScopeInterface::SCOPE_STORE;
$credit_card_value = $this->scopeConfig->getValue(self::XML_PATH_CREDIT_CARD, $storeScope);
$sales_team_value = $this->scopeConfig->getValue(self::XML_PATH_SALES_TEAM, $storeScope);







share|improve this answer














share|improve this answer



share|improve this answer








edited Jul 27 '18 at 9:46

























answered Jul 27 '18 at 9:34









Emipro Technologies Pvt. Ltd.Emipro Technologies Pvt. Ltd.

2,6481825




2,6481825












  • Use this updated answer.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 9:46











  • Fatal error: Uncaught TypeError: Argument 1 passed to UOCheckCartSpecialProductsObserverAfterPurchaseObserver::__construct() must implement interface MagentoFrameworkAppConfigScopeConfigInterface, none given,

    – k33n
    Jul 27 '18 at 10:09











  • Remove var/generation or generated/ folder after add this code.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:12











  • Go to core_config_data table in database. Then, search "uv_email/general/uv_email_kredit" in path column and check value is available or not.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:19

















  • Use this updated answer.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 9:46











  • Fatal error: Uncaught TypeError: Argument 1 passed to UOCheckCartSpecialProductsObserverAfterPurchaseObserver::__construct() must implement interface MagentoFrameworkAppConfigScopeConfigInterface, none given,

    – k33n
    Jul 27 '18 at 10:09











  • Remove var/generation or generated/ folder after add this code.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:12











  • Go to core_config_data table in database. Then, search "uv_email/general/uv_email_kredit" in path column and check value is available or not.

    – Emipro Technologies Pvt. Ltd.
    Jul 27 '18 at 10:19
















Use this updated answer.

– Emipro Technologies Pvt. Ltd.
Jul 27 '18 at 9:46





Use this updated answer.

– Emipro Technologies Pvt. Ltd.
Jul 27 '18 at 9:46













Fatal error: Uncaught TypeError: Argument 1 passed to UOCheckCartSpecialProductsObserverAfterPurchaseObserver::__construct() must implement interface MagentoFrameworkAppConfigScopeConfigInterface, none given,

– k33n
Jul 27 '18 at 10:09





Fatal error: Uncaught TypeError: Argument 1 passed to UOCheckCartSpecialProductsObserverAfterPurchaseObserver::__construct() must implement interface MagentoFrameworkAppConfigScopeConfigInterface, none given,

– k33n
Jul 27 '18 at 10:09













Remove var/generation or generated/ folder after add this code.

– Emipro Technologies Pvt. Ltd.
Jul 27 '18 at 10:12





Remove var/generation or generated/ folder after add this code.

– Emipro Technologies Pvt. Ltd.
Jul 27 '18 at 10:12













Go to core_config_data table in database. Then, search "uv_email/general/uv_email_kredit" in path column and check value is available or not.

– Emipro Technologies Pvt. Ltd.
Jul 27 '18 at 10:19





Go to core_config_data table in database. Then, search "uv_email/general/uv_email_kredit" in path column and check value is available or not.

– Emipro Technologies Pvt. Ltd.
Jul 27 '18 at 10:19

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f236210%2fmagento-2-get-value-from-system-xml%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Best approach to update all entries in a list that is paginated?Best way to add items to a paginated listChoose Your Country: Best Usability approachUpdate list when a user is viewing the list without annoying themWhen would the best day to update your webpage be?What should happen when I add a Row to a paginated, sorted listShould I adopt infinite scrolling or classical pagination?How to show user that page objects automatically updateWhat is the best location to locate the comments section in a list pageBest way to combine filtering and selecting items in a listWhen one of two inputs must be updated to satisfy a consistency criteria, which should you update (if at all)?

Вунгтау (аеропорт) Загальні відомості | Див. також | Посилання | Навігаційне меню10°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.0833310°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.083337731608Vinh AirportVinh airport facelift improves serviceвиправивши або дописавши їївиправивши або дописавши їїр

Тонконіг бульбистий Зміст Опис | Поширення | Екологія | Господарське значення | Примітки | Див. також | Література | Джерела | Посилання | Навігаційне меню1114601320038-241116202404kew-435458Poa bulbosaЭлектронный каталог сосудистых растений Азиатской России [Електронний каталог судинних рослин Азіатської Росії]Малышев Л. Л. Дикие родичи культурных растений. Poa bulbosa L. - Мятлик луковичный. [Малишев Л. Л. Дикі родичи культурних рослин. Poa bulbosa L. - Тонконіг бульбистий.]Мятлик (POA) Сем. Злаки (Мятликовые) [Тонконіг (POA) Род. Злаки (Тонконогові)]Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Description from Flora of China) [Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Опис від Флора Китаю)]Poa bulbosa L. – lipnice cibulkatá / lipnica cibulkatáPoa bulbosa в базі даних Poa bulbosa на сайті Poa bulbosa в базі даних «Global Biodiversity Information Facility» (GBIF)Poa bulbosa в базі даних «Euro + Med PlantBase» — інформаційному ресурсі для Євро-середземноморського розмаїття рослинPoa bulbosa L. на сайті «Плантариум»