How to add Enable/Disable extention functionality in admin side in custom extention magento 2.3Custom Magento Extension Enable and Disable by my custom admin moduleHow to Enable and Disable Custom Magento Extension?How to disable a magento extension from admin?Custom extension disable functionality is not workingMagento 2 - Create Admin Grid and show Custom Module list with Enable/Disable optionMagento 2 - add Enable / Disable field for custom moduleMagento 2 how to add custom tab in admin order view page left sideHow to add custom media gallery upload functionality in magento2?Add module Enable/disable functionality in Magento 2How to add new field to Admin User Info in Magento 2?
Should I prioritize my 401k over my student loans?
Trainee keeps missing deadlines for independent learning
How does a blind passenger not die, if driver becomes unconscious
Suggested order for Amazon Prime Doctor Who series
How many people are necessary to maintain modern civilisation?
Can humans ever directly see a few photons at a time? Can a human see a single photon?
Count All Possible Unique Combinations of Letters in a Word
What reason would an alien civilization have for building a Dyson Sphere (or Swarm) if cheap Nuclear fusion is available?
Should developer taking test phones home or put in office?
Interaction between Leyline of Anticipation and Teferi, Time Raveler
What exactly is the 'online' in OLAP and OLTP?
Is there a term for the belief that "if it's legal, it's moral"?
What did River say when she woke from her proto-comatose state?
What is "industrial ethernet"?
Is it illegal to withhold someone's passport and green card in California?
Who are the remaining King/Queenslayers?
How do I turn off a repeating trade?
How to make clear to people I don't want to answer their "Where are you from?" question?
Parameterize chained calls to a utility program in Bash
What was the Shuttle Carrier Aircraft escape tunnel?
Why is prior to creation called holy?
Helping ease my back pain when I'm studying 13 hours everyday, even weekends
Why does Linux list NVMe drives as /dev/nvme0 instead of /dev/sda?
How dangerous are set-size assumptions?
How to add Enable/Disable extention functionality in admin side in custom extention magento 2.3
Custom Magento Extension Enable and Disable by my custom admin moduleHow to Enable and Disable Custom Magento Extension?How to disable a magento extension from admin?Custom extension disable functionality is not workingMagento 2 - Create Admin Grid and show Custom Module list with Enable/Disable optionMagento 2 - add Enable / Disable field for custom moduleMagento 2 how to add custom tab in admin order view page left sideHow to add custom media gallery upload functionality in magento2?Add module Enable/disable functionality in Magento 2How to add new field to Admin User Info in Magento 2?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
We want to create one custom extension which has functionality in admin side for Enable/Disable.
Any one help me how to add this functionality in my custom extension.
magento2 admin extensions enable-disable
add a comment |
We want to create one custom extension which has functionality in admin side for Enable/Disable.
Any one help me how to add this functionality in my custom extension.
magento2 admin extensions enable-disable
How you want to use this setting is the main thing? Custom Plugin, Events, Preferences still will be executed.
– MagePsycho
Jun 13 at 13:39
We use this custom plugin only for overwrite phtml files of product.
– Anil
Jun 13 at 14:07
add a comment |
We want to create one custom extension which has functionality in admin side for Enable/Disable.
Any one help me how to add this functionality in my custom extension.
magento2 admin extensions enable-disable
We want to create one custom extension which has functionality in admin side for Enable/Disable.
Any one help me how to add this functionality in my custom extension.
magento2 admin extensions enable-disable
magento2 admin extensions enable-disable
edited Jun 14 at 6:56
Muhammad Farzam
7916
7916
asked Jun 13 at 13:11
AnilAnil
969
969
How you want to use this setting is the main thing? Custom Plugin, Events, Preferences still will be executed.
– MagePsycho
Jun 13 at 13:39
We use this custom plugin only for overwrite phtml files of product.
– Anil
Jun 13 at 14:07
add a comment |
How you want to use this setting is the main thing? Custom Plugin, Events, Preferences still will be executed.
– MagePsycho
Jun 13 at 13:39
We use this custom plugin only for overwrite phtml files of product.
– Anil
Jun 13 at 14:07
How you want to use this setting is the main thing? Custom Plugin, Events, Preferences still will be executed.
– MagePsycho
Jun 13 at 13:39
How you want to use this setting is the main thing? Custom Plugin, Events, Preferences still will be executed.
– MagePsycho
Jun 13 at 13:39
We use this custom plugin only for overwrite phtml files of product.
– Anil
Jun 13 at 14:07
We use this custom plugin only for overwrite phtml files of product.
– Anil
Jun 13 at 14:07
add a comment |
3 Answers
3
active
oldest
votes
For this, you need to Create a System.xml in the folder like etc/adminhtml/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.xsd">
<system>
<tab id="ModuleName" translate="label" sortOrder="10">
<label>ModuleName</label>
</tab>
<section id="customproductdata" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>Custom Product Data</label>
<tab>ModuleName</tab>
<resource>ModuleName_Customproductdata::customproductdata_configuration</resource>
<group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>General Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
</section>
</system>
Than Create Config.xml file as the Same location and Put Below code into that.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<customproductdata>
<general>
<enable>1</enable>
<title>ModuleName Customproductdata</title>
</general>
</customproductdata>
</default>
</config>
Now you will See this custom Yes no option in Magento 2 admin section.
Thanks. It's work perfectly.
– Anil
Jun 14 at 7:34
If answer was correct or satisfy with answer please approved answer.
– Vijay-CyberLocker
Jun 14 at 9:12
add a comment |
Create system.xml in your module.
etc/adminhtml/system.xml
Add the following content to have enable disable module configuration.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="yourmodulename" translate="label" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
<resource>Vendor_YourModuleName::configuration</resource>
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Enable Module</label>
<source_model>MagentoConfigModelConfigSourceEnabledisable</source_model>
</field>
</group>
</section>
</system>
</config>
In admin site where this setting show ? Enable or Disable
– Hafiz Arslan
Jun 13 at 14:04
add a comment |
Add below code in etc/adminhtml/system.xml
<group id="general" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="20">
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
Using below code in helper file.
public function isEnabled()
return (boolean) $this->getConfig('namespace_modulename/general/enable');
And call this function whenever you want.
That's it, i hope it helps!
If any possible way to create extension with enable/disable option ?
– Anil
Jun 13 at 14:44
I have a post answer for that. but I think you are confused. can you explain more what do you want exactly?
– Chirag Patel
Jun 14 at 4:38
we want to create one custom extension. Which in manage from admin side. It means any person enable/disable it from admin side. Main purpose for create this extension is overwrite phtml files for product view page.
– Anil
Jun 14 at 5:53
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%2f278261%2fhow-to-add-enable-disable-extention-functionality-in-admin-side-in-custom-extent%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
For this, you need to Create a System.xml in the folder like etc/adminhtml/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.xsd">
<system>
<tab id="ModuleName" translate="label" sortOrder="10">
<label>ModuleName</label>
</tab>
<section id="customproductdata" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>Custom Product Data</label>
<tab>ModuleName</tab>
<resource>ModuleName_Customproductdata::customproductdata_configuration</resource>
<group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>General Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
</section>
</system>
Than Create Config.xml file as the Same location and Put Below code into that.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<customproductdata>
<general>
<enable>1</enable>
<title>ModuleName Customproductdata</title>
</general>
</customproductdata>
</default>
</config>
Now you will See this custom Yes no option in Magento 2 admin section.
Thanks. It's work perfectly.
– Anil
Jun 14 at 7:34
If answer was correct or satisfy with answer please approved answer.
– Vijay-CyberLocker
Jun 14 at 9:12
add a comment |
For this, you need to Create a System.xml in the folder like etc/adminhtml/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.xsd">
<system>
<tab id="ModuleName" translate="label" sortOrder="10">
<label>ModuleName</label>
</tab>
<section id="customproductdata" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>Custom Product Data</label>
<tab>ModuleName</tab>
<resource>ModuleName_Customproductdata::customproductdata_configuration</resource>
<group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>General Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
</section>
</system>
Than Create Config.xml file as the Same location and Put Below code into that.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<customproductdata>
<general>
<enable>1</enable>
<title>ModuleName Customproductdata</title>
</general>
</customproductdata>
</default>
</config>
Now you will See this custom Yes no option in Magento 2 admin section.
Thanks. It's work perfectly.
– Anil
Jun 14 at 7:34
If answer was correct or satisfy with answer please approved answer.
– Vijay-CyberLocker
Jun 14 at 9:12
add a comment |
For this, you need to Create a System.xml in the folder like etc/adminhtml/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.xsd">
<system>
<tab id="ModuleName" translate="label" sortOrder="10">
<label>ModuleName</label>
</tab>
<section id="customproductdata" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>Custom Product Data</label>
<tab>ModuleName</tab>
<resource>ModuleName_Customproductdata::customproductdata_configuration</resource>
<group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>General Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
</section>
</system>
Than Create Config.xml file as the Same location and Put Below code into that.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<customproductdata>
<general>
<enable>1</enable>
<title>ModuleName Customproductdata</title>
</general>
</customproductdata>
</default>
</config>
Now you will See this custom Yes no option in Magento 2 admin section.
For this, you need to Create a System.xml in the folder like etc/adminhtml/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.xsd">
<system>
<tab id="ModuleName" translate="label" sortOrder="10">
<label>ModuleName</label>
</tab>
<section id="customproductdata" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>Custom Product Data</label>
<tab>ModuleName</tab>
<resource>ModuleName_Customproductdata::customproductdata_configuration</resource>
<group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>General Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
</section>
</system>
Than Create Config.xml file as the Same location and Put Below code into that.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<customproductdata>
<general>
<enable>1</enable>
<title>ModuleName Customproductdata</title>
</general>
</customproductdata>
</default>
</config>
Now you will See this custom Yes no option in Magento 2 admin section.
answered Jun 14 at 7:32
NikulNikul
75511122
75511122
Thanks. It's work perfectly.
– Anil
Jun 14 at 7:34
If answer was correct or satisfy with answer please approved answer.
– Vijay-CyberLocker
Jun 14 at 9:12
add a comment |
Thanks. It's work perfectly.
– Anil
Jun 14 at 7:34
If answer was correct or satisfy with answer please approved answer.
– Vijay-CyberLocker
Jun 14 at 9:12
Thanks. It's work perfectly.
– Anil
Jun 14 at 7:34
Thanks. It's work perfectly.
– Anil
Jun 14 at 7:34
If answer was correct or satisfy with answer please approved answer.
– Vijay-CyberLocker
Jun 14 at 9:12
If answer was correct or satisfy with answer please approved answer.
– Vijay-CyberLocker
Jun 14 at 9:12
add a comment |
Create system.xml in your module.
etc/adminhtml/system.xml
Add the following content to have enable disable module configuration.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="yourmodulename" translate="label" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
<resource>Vendor_YourModuleName::configuration</resource>
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Enable Module</label>
<source_model>MagentoConfigModelConfigSourceEnabledisable</source_model>
</field>
</group>
</section>
</system>
</config>
In admin site where this setting show ? Enable or Disable
– Hafiz Arslan
Jun 13 at 14:04
add a comment |
Create system.xml in your module.
etc/adminhtml/system.xml
Add the following content to have enable disable module configuration.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="yourmodulename" translate="label" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
<resource>Vendor_YourModuleName::configuration</resource>
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Enable Module</label>
<source_model>MagentoConfigModelConfigSourceEnabledisable</source_model>
</field>
</group>
</section>
</system>
</config>
In admin site where this setting show ? Enable or Disable
– Hafiz Arslan
Jun 13 at 14:04
add a comment |
Create system.xml in your module.
etc/adminhtml/system.xml
Add the following content to have enable disable module configuration.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="yourmodulename" translate="label" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
<resource>Vendor_YourModuleName::configuration</resource>
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Enable Module</label>
<source_model>MagentoConfigModelConfigSourceEnabledisable</source_model>
</field>
</group>
</section>
</system>
</config>
Create system.xml in your module.
etc/adminhtml/system.xml
Add the following content to have enable disable module configuration.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="yourmodulename" translate="label" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
<resource>Vendor_YourModuleName::configuration</resource>
<group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Configuration</label>
<field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Enable Module</label>
<source_model>MagentoConfigModelConfigSourceEnabledisable</source_model>
</field>
</group>
</section>
</system>
</config>
answered Jun 13 at 13:29
Kazim NooraniKazim Noorani
1,1551824
1,1551824
In admin site where this setting show ? Enable or Disable
– Hafiz Arslan
Jun 13 at 14:04
add a comment |
In admin site where this setting show ? Enable or Disable
– Hafiz Arslan
Jun 13 at 14:04
In admin site where this setting show ? Enable or Disable
– Hafiz Arslan
Jun 13 at 14:04
In admin site where this setting show ? Enable or Disable
– Hafiz Arslan
Jun 13 at 14:04
add a comment |
Add below code in etc/adminhtml/system.xml
<group id="general" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="20">
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
Using below code in helper file.
public function isEnabled()
return (boolean) $this->getConfig('namespace_modulename/general/enable');
And call this function whenever you want.
That's it, i hope it helps!
If any possible way to create extension with enable/disable option ?
– Anil
Jun 13 at 14:44
I have a post answer for that. but I think you are confused. can you explain more what do you want exactly?
– Chirag Patel
Jun 14 at 4:38
we want to create one custom extension. Which in manage from admin side. It means any person enable/disable it from admin side. Main purpose for create this extension is overwrite phtml files for product view page.
– Anil
Jun 14 at 5:53
add a comment |
Add below code in etc/adminhtml/system.xml
<group id="general" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="20">
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
Using below code in helper file.
public function isEnabled()
return (boolean) $this->getConfig('namespace_modulename/general/enable');
And call this function whenever you want.
That's it, i hope it helps!
If any possible way to create extension with enable/disable option ?
– Anil
Jun 13 at 14:44
I have a post answer for that. but I think you are confused. can you explain more what do you want exactly?
– Chirag Patel
Jun 14 at 4:38
we want to create one custom extension. Which in manage from admin side. It means any person enable/disable it from admin side. Main purpose for create this extension is overwrite phtml files for product view page.
– Anil
Jun 14 at 5:53
add a comment |
Add below code in etc/adminhtml/system.xml
<group id="general" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="20">
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
Using below code in helper file.
public function isEnabled()
return (boolean) $this->getConfig('namespace_modulename/general/enable');
And call this function whenever you want.
That's it, i hope it helps!
Add below code in etc/adminhtml/system.xml
<group id="general" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="20">
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1">
<label>Enable</label>
<source_model>MagentoConfigModelConfigSourceYesno</source_model>
</field>
</group>
Using below code in helper file.
public function isEnabled()
return (boolean) $this->getConfig('namespace_modulename/general/enable');
And call this function whenever you want.
That's it, i hope it helps!
answered Jun 13 at 13:32
Chirag PatelChirag Patel
3,382627
3,382627
If any possible way to create extension with enable/disable option ?
– Anil
Jun 13 at 14:44
I have a post answer for that. but I think you are confused. can you explain more what do you want exactly?
– Chirag Patel
Jun 14 at 4:38
we want to create one custom extension. Which in manage from admin side. It means any person enable/disable it from admin side. Main purpose for create this extension is overwrite phtml files for product view page.
– Anil
Jun 14 at 5:53
add a comment |
If any possible way to create extension with enable/disable option ?
– Anil
Jun 13 at 14:44
I have a post answer for that. but I think you are confused. can you explain more what do you want exactly?
– Chirag Patel
Jun 14 at 4:38
we want to create one custom extension. Which in manage from admin side. It means any person enable/disable it from admin side. Main purpose for create this extension is overwrite phtml files for product view page.
– Anil
Jun 14 at 5:53
If any possible way to create extension with enable/disable option ?
– Anil
Jun 13 at 14:44
If any possible way to create extension with enable/disable option ?
– Anil
Jun 13 at 14:44
I have a post answer for that. but I think you are confused. can you explain more what do you want exactly?
– Chirag Patel
Jun 14 at 4:38
I have a post answer for that. but I think you are confused. can you explain more what do you want exactly?
– Chirag Patel
Jun 14 at 4:38
we want to create one custom extension. Which in manage from admin side. It means any person enable/disable it from admin side. Main purpose for create this extension is overwrite phtml files for product view page.
– Anil
Jun 14 at 5:53
we want to create one custom extension. Which in manage from admin side. It means any person enable/disable it from admin side. Main purpose for create this extension is overwrite phtml files for product view page.
– Anil
Jun 14 at 5:53
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%2f278261%2fhow-to-add-enable-disable-extention-functionality-in-admin-side-in-custom-extent%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
How you want to use this setting is the main thing? Custom Plugin, Events, Preferences still will be executed.
– MagePsycho
Jun 13 at 13:39
We use this custom plugin only for overwrite phtml files of product.
– Anil
Jun 13 at 14:07