Setting different `footer version` from admin panel/table Magento 2












0















By default, I have footer version as footer_1.
On looking upon the code footer.phtml , there are multiple footer version
footer_2, footer_3, footer_4
How can I enable each footer from my Admin panel and from which table also.



<?php // Get footer version ?>
<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?>
<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


and condition for footer version check goes on



 <?php if($footer == 'footer_1'): ?> // footer version check


I don't understand, from where did the $themeHelper is getting the footer versions, and how can I change with other footer versions like footer_2, footer_3 etc.
If it has both approaches from admin panel and from database table too(so that I can use MySQL query to update) kindly enlighten me.
I am new to Magento



enter image description here










share|improve this question









New contributor




summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • It looks like a ready-made theme. Better you refer their docs for this and don't change directly in the third party themes which makes upgrade difficult.

    – Rinto George
    Jan 21 at 6:53
















0















By default, I have footer version as footer_1.
On looking upon the code footer.phtml , there are multiple footer version
footer_2, footer_3, footer_4
How can I enable each footer from my Admin panel and from which table also.



<?php // Get footer version ?>
<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?>
<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


and condition for footer version check goes on



 <?php if($footer == 'footer_1'): ?> // footer version check


I don't understand, from where did the $themeHelper is getting the footer versions, and how can I change with other footer versions like footer_2, footer_3 etc.
If it has both approaches from admin panel and from database table too(so that I can use MySQL query to update) kindly enlighten me.
I am new to Magento



enter image description here










share|improve this question









New contributor




summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • It looks like a ready-made theme. Better you refer their docs for this and don't change directly in the third party themes which makes upgrade difficult.

    – Rinto George
    Jan 21 at 6:53














0












0








0








By default, I have footer version as footer_1.
On looking upon the code footer.phtml , there are multiple footer version
footer_2, footer_3, footer_4
How can I enable each footer from my Admin panel and from which table also.



<?php // Get footer version ?>
<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?>
<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


and condition for footer version check goes on



 <?php if($footer == 'footer_1'): ?> // footer version check


I don't understand, from where did the $themeHelper is getting the footer versions, and how can I change with other footer versions like footer_2, footer_3 etc.
If it has both approaches from admin panel and from database table too(so that I can use MySQL query to update) kindly enlighten me.
I am new to Magento



enter image description here










share|improve this question









New contributor




summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












By default, I have footer version as footer_1.
On looking upon the code footer.phtml , there are multiple footer version
footer_2, footer_3, footer_4
How can I enable each footer from my Admin panel and from which table also.



<?php // Get footer version ?>
<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?>
<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


and condition for footer version check goes on



 <?php if($footer == 'footer_1'): ?> // footer version check


I don't understand, from where did the $themeHelper is getting the footer versions, and how can I change with other footer versions like footer_2, footer_3 etc.
If it has both approaches from admin panel and from database table too(so that I can use MySQL query to update) kindly enlighten me.
I am new to Magento



enter image description here







magento2 footer footer-links






share|improve this question









New contributor




summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Jan 21 at 6:24







summu













New contributor




summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Jan 20 at 21:10









summusummu

104




104




New contributor




summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






summu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • It looks like a ready-made theme. Better you refer their docs for this and don't change directly in the third party themes which makes upgrade difficult.

    – Rinto George
    Jan 21 at 6:53



















  • It looks like a ready-made theme. Better you refer their docs for this and don't change directly in the third party themes which makes upgrade difficult.

    – Rinto George
    Jan 21 at 6:53

















It looks like a ready-made theme. Better you refer their docs for this and don't change directly in the third party themes which makes upgrade difficult.

– Rinto George
Jan 21 at 6:53





It looks like a ready-made theme. Better you refer their docs for this and don't change directly in the third party themes which makes upgrade difficult.

– Rinto George
Jan 21 at 6:53










1 Answer
1






active

oldest

votes


















0














As per your code you are using a ready made theme, which has many footer styles.



if you look at:



<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?> 


above code will instantiate helper in your phtml.
Once we get helper, we can access its function like:



<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


If you look into Data.php in helper folder of module, there will be a function getStoreConfig.



This function getting store configuration value based on parameter passed.



If you go to System->Configuration, there will be some theme related settings.



In your function mgstheme/footer/footer



mgstheme - Section name
footer - Group Name
footer - field name


So there is a dropdown in admin, where you can choose different footer.



Footer1 - footer_1
Footer2 - footer_2
Footer3 - footer_3

----


based on value of $footer, it is rendering footer design in your phtml.



Hope above will help!






share|improve this answer
























  • first, Configuration is inStores->Configuration not System->Configuration see my updated question , there is nothing in footer dropdown

    – summu
    Jan 21 at 6:23











  • Strange, you only notice System->Configuration in whole answer! Great!

    – Pawan
    Jan 21 at 16:26











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
});


}
});






summu is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f258484%2fsetting-different-footer-version-from-admin-panel-table-magento-2%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









0














As per your code you are using a ready made theme, which has many footer styles.



if you look at:



<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?> 


above code will instantiate helper in your phtml.
Once we get helper, we can access its function like:



<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


If you look into Data.php in helper folder of module, there will be a function getStoreConfig.



This function getting store configuration value based on parameter passed.



If you go to System->Configuration, there will be some theme related settings.



In your function mgstheme/footer/footer



mgstheme - Section name
footer - Group Name
footer - field name


So there is a dropdown in admin, where you can choose different footer.



Footer1 - footer_1
Footer2 - footer_2
Footer3 - footer_3

----


based on value of $footer, it is rendering footer design in your phtml.



Hope above will help!






share|improve this answer
























  • first, Configuration is inStores->Configuration not System->Configuration see my updated question , there is nothing in footer dropdown

    – summu
    Jan 21 at 6:23











  • Strange, you only notice System->Configuration in whole answer! Great!

    – Pawan
    Jan 21 at 16:26
















0














As per your code you are using a ready made theme, which has many footer styles.



if you look at:



<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?> 


above code will instantiate helper in your phtml.
Once we get helper, we can access its function like:



<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


If you look into Data.php in helper folder of module, there will be a function getStoreConfig.



This function getting store configuration value based on parameter passed.



If you go to System->Configuration, there will be some theme related settings.



In your function mgstheme/footer/footer



mgstheme - Section name
footer - Group Name
footer - field name


So there is a dropdown in admin, where you can choose different footer.



Footer1 - footer_1
Footer2 - footer_2
Footer3 - footer_3

----


based on value of $footer, it is rendering footer design in your phtml.



Hope above will help!






share|improve this answer
























  • first, Configuration is inStores->Configuration not System->Configuration see my updated question , there is nothing in footer dropdown

    – summu
    Jan 21 at 6:23











  • Strange, you only notice System->Configuration in whole answer! Great!

    – Pawan
    Jan 21 at 16:26














0












0








0







As per your code you are using a ready made theme, which has many footer styles.



if you look at:



<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?> 


above code will instantiate helper in your phtml.
Once we get helper, we can access its function like:



<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


If you look into Data.php in helper folder of module, there will be a function getStoreConfig.



This function getting store configuration value based on parameter passed.



If you go to System->Configuration, there will be some theme related settings.



In your function mgstheme/footer/footer



mgstheme - Section name
footer - Group Name
footer - field name


So there is a dropdown in admin, where you can choose different footer.



Footer1 - footer_1
Footer2 - footer_2
Footer3 - footer_3

----


based on value of $footer, it is rendering footer design in your phtml.



Hope above will help!






share|improve this answer













As per your code you are using a ready made theme, which has many footer styles.



if you look at:



<?php $themeHelper = $this->helper('MGSMpanelHelperData') ?> 


above code will instantiate helper in your phtml.
Once we get helper, we can access its function like:



<?php $footer = $themeHelper->getStoreConfig('mgstheme/footer/footer');?>


If you look into Data.php in helper folder of module, there will be a function getStoreConfig.



This function getting store configuration value based on parameter passed.



If you go to System->Configuration, there will be some theme related settings.



In your function mgstheme/footer/footer



mgstheme - Section name
footer - Group Name
footer - field name


So there is a dropdown in admin, where you can choose different footer.



Footer1 - footer_1
Footer2 - footer_2
Footer3 - footer_3

----


based on value of $footer, it is rendering footer design in your phtml.



Hope above will help!







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 21 at 4:22









PawanPawan

1,6542515




1,6542515













  • first, Configuration is inStores->Configuration not System->Configuration see my updated question , there is nothing in footer dropdown

    – summu
    Jan 21 at 6:23











  • Strange, you only notice System->Configuration in whole answer! Great!

    – Pawan
    Jan 21 at 16:26



















  • first, Configuration is inStores->Configuration not System->Configuration see my updated question , there is nothing in footer dropdown

    – summu
    Jan 21 at 6:23











  • Strange, you only notice System->Configuration in whole answer! Great!

    – Pawan
    Jan 21 at 16:26

















first, Configuration is inStores->Configuration not System->Configuration see my updated question , there is nothing in footer dropdown

– summu
Jan 21 at 6:23





first, Configuration is inStores->Configuration not System->Configuration see my updated question , there is nothing in footer dropdown

– summu
Jan 21 at 6:23













Strange, you only notice System->Configuration in whole answer! Great!

– Pawan
Jan 21 at 16:26





Strange, you only notice System->Configuration in whole answer! Great!

– Pawan
Jan 21 at 16:26










summu is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















summu is a new contributor. Be nice, and check out our Code of Conduct.













summu is a new contributor. Be nice, and check out our Code of Conduct.












summu is a new contributor. Be nice, and check out our Code of Conduct.
















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%2f258484%2fsetting-different-footer-version-from-admin-panel-table-magento-2%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

William S. Burroughs

Eda skans

1924