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
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
add a comment |
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
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
add a comment |
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
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
magento2 configuration
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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);
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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);
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
add a comment |
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);
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
add a comment |
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);
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);
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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