How to get some store information in my Magento 1?












0















I got the following two statements for my dutch store (Magento 1.9.3.4), with the following issues:



<?php $_BaseUrl=Mage::app()->getStore()->getHomeUrl() ; ?>


With this statement I am getting the home page plus '/nl', but I just need it without the 'nl'. Example: I get www.homepage.com/nl instead of www.homepage.com



<?php $countryId=Mage::app()->getStore()->getCode(); ?>


With this second statement, I get 'Netherlands' instead of 'nl'



Could you guys help me to achieve what I want? PHP version is 5.6.31



Thanks for your collaborations.










share|improve this question





























    0















    I got the following two statements for my dutch store (Magento 1.9.3.4), with the following issues:



    <?php $_BaseUrl=Mage::app()->getStore()->getHomeUrl() ; ?>


    With this statement I am getting the home page plus '/nl', but I just need it without the 'nl'. Example: I get www.homepage.com/nl instead of www.homepage.com



    <?php $countryId=Mage::app()->getStore()->getCode(); ?>


    With this second statement, I get 'Netherlands' instead of 'nl'



    Could you guys help me to achieve what I want? PHP version is 5.6.31



    Thanks for your collaborations.










    share|improve this question



























      0












      0








      0








      I got the following two statements for my dutch store (Magento 1.9.3.4), with the following issues:



      <?php $_BaseUrl=Mage::app()->getStore()->getHomeUrl() ; ?>


      With this statement I am getting the home page plus '/nl', but I just need it without the 'nl'. Example: I get www.homepage.com/nl instead of www.homepage.com



      <?php $countryId=Mage::app()->getStore()->getCode(); ?>


      With this second statement, I get 'Netherlands' instead of 'nl'



      Could you guys help me to achieve what I want? PHP version is 5.6.31



      Thanks for your collaborations.










      share|improve this question
















      I got the following two statements for my dutch store (Magento 1.9.3.4), with the following issues:



      <?php $_BaseUrl=Mage::app()->getStore()->getHomeUrl() ; ?>


      With this statement I am getting the home page plus '/nl', but I just need it without the 'nl'. Example: I get www.homepage.com/nl instead of www.homepage.com



      <?php $countryId=Mage::app()->getStore()->getCode(); ?>


      With this second statement, I get 'Netherlands' instead of 'nl'



      Could you guys help me to achieve what I want? PHP version is 5.6.31



      Thanks for your collaborations.







      magento-1.9 php stores






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 6 '17 at 19:43









      Rafael Corrêa Gomes

      4,28222962




      4,28222962










      asked Sep 6 '17 at 19:21









      Julian MurilloJulian Murillo

      1459




      1459






















          3 Answers
          3






          active

          oldest

          votes


















          0














          <?php $_BaseUrl = Mage::app()->getStore()->getHomeUrl(); ?> = www.homepage.com/nl



          <?php $_BaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?> = www.homepage.com/



          Happy coding :)






          share|improve this answer
























          • This worked out :) now trying to figure out how to get 'nl' instead of 'Netherlands' or 'nl_NL'

            – Julian Murillo
            Sep 7 '17 at 9:47











          • <?php $_codeStore = Mage::app()->getStore()->getCode() ?> OR <?php $_languageStore = Mage::app()->getStore()->getLanguageCode() ?>

            – PЯINCƏ
            Sep 7 '17 at 10:06





















          0














          Im guessing your looking to get the locale for this result or you could just do a preg_replace



          // Gets the current store's details
          $store = Mage::app()->getStore();

          // Gets the current store's id
          $storeId = Mage::app()->getStore()->getStoreId();

          // Gets the current store's code
          $storeCode = Mage::app()->getStore()->getCode();

          // Gets the current website's id
          $websiteId = Mage::app()->getStore()->getWebsiteId();

          // Gets the current store's group id
          $storeGroupId = Mage::app()->getStore()->getGroupId();

          // Gets the current store's name
          $storeName = Mage::app()->getStore()->getName();

          // Gets the current store's sort order
          $storeSortOrder = Mage::app()->getStore()->getSortOrder();

          // Gets the current store's status
          $storeIsActive = Mage::app()->getStore()->getIsActive();

          // Gets the current store's locale
          $storeLocaleCode = Mage::app()->getStore()->getLocaleCode();

          // Gets the current store's home url
          $storeHomeUrl = Mage::app()->getStore()->getHomeUrl();





          share|improve this answer
























          • Hi. I tried those but It did not work. Could you provide an example on how preg_replace should work?

            – Julian Murillo
            Sep 7 '17 at 9:46



















          0














          In Magento 1.9.4.0 and maybe all versions in 1.x use:



          Mage::getStoreConfig('general/store_information/address');



          and the following params, it depends what you want to get:




          • general/store_information/name

          • general/store_information/phone

          • general/store_information/merchant_country

          • general/store_information/address

          • general/store_information/merchant_vat_number






          share|improve this answer








          New contributor




          István Döbrentei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            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%2f192264%2fhow-to-get-some-store-information-in-my-magento-1%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









            0














            <?php $_BaseUrl = Mage::app()->getStore()->getHomeUrl(); ?> = www.homepage.com/nl



            <?php $_BaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?> = www.homepage.com/



            Happy coding :)






            share|improve this answer
























            • This worked out :) now trying to figure out how to get 'nl' instead of 'Netherlands' or 'nl_NL'

              – Julian Murillo
              Sep 7 '17 at 9:47











            • <?php $_codeStore = Mage::app()->getStore()->getCode() ?> OR <?php $_languageStore = Mage::app()->getStore()->getLanguageCode() ?>

              – PЯINCƏ
              Sep 7 '17 at 10:06


















            0














            <?php $_BaseUrl = Mage::app()->getStore()->getHomeUrl(); ?> = www.homepage.com/nl



            <?php $_BaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?> = www.homepage.com/



            Happy coding :)






            share|improve this answer
























            • This worked out :) now trying to figure out how to get 'nl' instead of 'Netherlands' or 'nl_NL'

              – Julian Murillo
              Sep 7 '17 at 9:47











            • <?php $_codeStore = Mage::app()->getStore()->getCode() ?> OR <?php $_languageStore = Mage::app()->getStore()->getLanguageCode() ?>

              – PЯINCƏ
              Sep 7 '17 at 10:06
















            0












            0








            0







            <?php $_BaseUrl = Mage::app()->getStore()->getHomeUrl(); ?> = www.homepage.com/nl



            <?php $_BaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?> = www.homepage.com/



            Happy coding :)






            share|improve this answer













            <?php $_BaseUrl = Mage::app()->getStore()->getHomeUrl(); ?> = www.homepage.com/nl



            <?php $_BaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?> = www.homepage.com/



            Happy coding :)







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 6 '17 at 21:35









            PЯINCƏPЯINCƏ

            7,75131137




            7,75131137













            • This worked out :) now trying to figure out how to get 'nl' instead of 'Netherlands' or 'nl_NL'

              – Julian Murillo
              Sep 7 '17 at 9:47











            • <?php $_codeStore = Mage::app()->getStore()->getCode() ?> OR <?php $_languageStore = Mage::app()->getStore()->getLanguageCode() ?>

              – PЯINCƏ
              Sep 7 '17 at 10:06





















            • This worked out :) now trying to figure out how to get 'nl' instead of 'Netherlands' or 'nl_NL'

              – Julian Murillo
              Sep 7 '17 at 9:47











            • <?php $_codeStore = Mage::app()->getStore()->getCode() ?> OR <?php $_languageStore = Mage::app()->getStore()->getLanguageCode() ?>

              – PЯINCƏ
              Sep 7 '17 at 10:06



















            This worked out :) now trying to figure out how to get 'nl' instead of 'Netherlands' or 'nl_NL'

            – Julian Murillo
            Sep 7 '17 at 9:47





            This worked out :) now trying to figure out how to get 'nl' instead of 'Netherlands' or 'nl_NL'

            – Julian Murillo
            Sep 7 '17 at 9:47













            <?php $_codeStore = Mage::app()->getStore()->getCode() ?> OR <?php $_languageStore = Mage::app()->getStore()->getLanguageCode() ?>

            – PЯINCƏ
            Sep 7 '17 at 10:06







            <?php $_codeStore = Mage::app()->getStore()->getCode() ?> OR <?php $_languageStore = Mage::app()->getStore()->getLanguageCode() ?>

            – PЯINCƏ
            Sep 7 '17 at 10:06















            0














            Im guessing your looking to get the locale for this result or you could just do a preg_replace



            // Gets the current store's details
            $store = Mage::app()->getStore();

            // Gets the current store's id
            $storeId = Mage::app()->getStore()->getStoreId();

            // Gets the current store's code
            $storeCode = Mage::app()->getStore()->getCode();

            // Gets the current website's id
            $websiteId = Mage::app()->getStore()->getWebsiteId();

            // Gets the current store's group id
            $storeGroupId = Mage::app()->getStore()->getGroupId();

            // Gets the current store's name
            $storeName = Mage::app()->getStore()->getName();

            // Gets the current store's sort order
            $storeSortOrder = Mage::app()->getStore()->getSortOrder();

            // Gets the current store's status
            $storeIsActive = Mage::app()->getStore()->getIsActive();

            // Gets the current store's locale
            $storeLocaleCode = Mage::app()->getStore()->getLocaleCode();

            // Gets the current store's home url
            $storeHomeUrl = Mage::app()->getStore()->getHomeUrl();





            share|improve this answer
























            • Hi. I tried those but It did not work. Could you provide an example on how preg_replace should work?

              – Julian Murillo
              Sep 7 '17 at 9:46
















            0














            Im guessing your looking to get the locale for this result or you could just do a preg_replace



            // Gets the current store's details
            $store = Mage::app()->getStore();

            // Gets the current store's id
            $storeId = Mage::app()->getStore()->getStoreId();

            // Gets the current store's code
            $storeCode = Mage::app()->getStore()->getCode();

            // Gets the current website's id
            $websiteId = Mage::app()->getStore()->getWebsiteId();

            // Gets the current store's group id
            $storeGroupId = Mage::app()->getStore()->getGroupId();

            // Gets the current store's name
            $storeName = Mage::app()->getStore()->getName();

            // Gets the current store's sort order
            $storeSortOrder = Mage::app()->getStore()->getSortOrder();

            // Gets the current store's status
            $storeIsActive = Mage::app()->getStore()->getIsActive();

            // Gets the current store's locale
            $storeLocaleCode = Mage::app()->getStore()->getLocaleCode();

            // Gets the current store's home url
            $storeHomeUrl = Mage::app()->getStore()->getHomeUrl();





            share|improve this answer
























            • Hi. I tried those but It did not work. Could you provide an example on how preg_replace should work?

              – Julian Murillo
              Sep 7 '17 at 9:46














            0












            0








            0







            Im guessing your looking to get the locale for this result or you could just do a preg_replace



            // Gets the current store's details
            $store = Mage::app()->getStore();

            // Gets the current store's id
            $storeId = Mage::app()->getStore()->getStoreId();

            // Gets the current store's code
            $storeCode = Mage::app()->getStore()->getCode();

            // Gets the current website's id
            $websiteId = Mage::app()->getStore()->getWebsiteId();

            // Gets the current store's group id
            $storeGroupId = Mage::app()->getStore()->getGroupId();

            // Gets the current store's name
            $storeName = Mage::app()->getStore()->getName();

            // Gets the current store's sort order
            $storeSortOrder = Mage::app()->getStore()->getSortOrder();

            // Gets the current store's status
            $storeIsActive = Mage::app()->getStore()->getIsActive();

            // Gets the current store's locale
            $storeLocaleCode = Mage::app()->getStore()->getLocaleCode();

            // Gets the current store's home url
            $storeHomeUrl = Mage::app()->getStore()->getHomeUrl();





            share|improve this answer













            Im guessing your looking to get the locale for this result or you could just do a preg_replace



            // Gets the current store's details
            $store = Mage::app()->getStore();

            // Gets the current store's id
            $storeId = Mage::app()->getStore()->getStoreId();

            // Gets the current store's code
            $storeCode = Mage::app()->getStore()->getCode();

            // Gets the current website's id
            $websiteId = Mage::app()->getStore()->getWebsiteId();

            // Gets the current store's group id
            $storeGroupId = Mage::app()->getStore()->getGroupId();

            // Gets the current store's name
            $storeName = Mage::app()->getStore()->getName();

            // Gets the current store's sort order
            $storeSortOrder = Mage::app()->getStore()->getSortOrder();

            // Gets the current store's status
            $storeIsActive = Mage::app()->getStore()->getIsActive();

            // Gets the current store's locale
            $storeLocaleCode = Mage::app()->getStore()->getLocaleCode();

            // Gets the current store's home url
            $storeHomeUrl = Mage::app()->getStore()->getHomeUrl();






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 6 '17 at 19:39









            Dava GordonDava Gordon

            59127




            59127













            • Hi. I tried those but It did not work. Could you provide an example on how preg_replace should work?

              – Julian Murillo
              Sep 7 '17 at 9:46



















            • Hi. I tried those but It did not work. Could you provide an example on how preg_replace should work?

              – Julian Murillo
              Sep 7 '17 at 9:46

















            Hi. I tried those but It did not work. Could you provide an example on how preg_replace should work?

            – Julian Murillo
            Sep 7 '17 at 9:46





            Hi. I tried those but It did not work. Could you provide an example on how preg_replace should work?

            – Julian Murillo
            Sep 7 '17 at 9:46











            0














            In Magento 1.9.4.0 and maybe all versions in 1.x use:



            Mage::getStoreConfig('general/store_information/address');



            and the following params, it depends what you want to get:




            • general/store_information/name

            • general/store_information/phone

            • general/store_information/merchant_country

            • general/store_information/address

            • general/store_information/merchant_vat_number






            share|improve this answer








            New contributor




            István Döbrentei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

























              0














              In Magento 1.9.4.0 and maybe all versions in 1.x use:



              Mage::getStoreConfig('general/store_information/address');



              and the following params, it depends what you want to get:




              • general/store_information/name

              • general/store_information/phone

              • general/store_information/merchant_country

              • general/store_information/address

              • general/store_information/merchant_vat_number






              share|improve this answer








              New contributor




              István Döbrentei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.























                0












                0








                0







                In Magento 1.9.4.0 and maybe all versions in 1.x use:



                Mage::getStoreConfig('general/store_information/address');



                and the following params, it depends what you want to get:




                • general/store_information/name

                • general/store_information/phone

                • general/store_information/merchant_country

                • general/store_information/address

                • general/store_information/merchant_vat_number






                share|improve this answer








                New contributor




                István Döbrentei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                In Magento 1.9.4.0 and maybe all versions in 1.x use:



                Mage::getStoreConfig('general/store_information/address');



                and the following params, it depends what you want to get:




                • general/store_information/name

                • general/store_information/phone

                • general/store_information/merchant_country

                • general/store_information/address

                • general/store_information/merchant_vat_number







                share|improve this answer








                New contributor




                István Döbrentei 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 answer



                share|improve this answer






                New contributor




                István Döbrentei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 2 days ago









                István DöbrenteiIstván Döbrentei

                1011




                1011




                New contributor




                István Döbrentei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                István Döbrentei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                István Döbrentei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    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%2f192264%2fhow-to-get-some-store-information-in-my-magento-1%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

                    An IMO inspired problem

                    Management

                    Has there ever been an instance of an active nuclear power plant within or near a war zone?