Where to upload PHP files that query data tables in Magento The Next CEO of Stack OverflowOverriding send email functions with custom functionsCopying data between tables via PHP not working?How Secure Are User Made PHP Files?Order emails not sending to Sales Representative (store email address)Sending order email when pragmatically updating an orderExport Orders from Magento MySQL DB without MagentoBlock/limit/filter addresses or email address?Past deleted order details being used by new ordersWhere magento store data from account info on order pageMagento1 order extra steps for custom items

Is there a difference between "Fahrstuhl" and "Aufzug"

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?

Why has the US not been more assertive in confronting Russia in recent years?

How to start emacs in "nothing" mode (`fundamental-mode`)

How to prevent changing the value of variable?

If a black hole is created from light, can this black hole then move at speed of light?

WOW air has ceased operation, can I get my tickets refunded?

Indicator light circuit

Why do we use the plural of movies in this phrase "We went to the movies last night."?

Make solar eclipses exceedingly rare, but still have new moons

Is micro rebar a better way to reinforce concrete than rebar?

Why do remote companies require working in the US?

Are there any limitations on attacking while grappling?

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

Can you replace a racial trait cantrip when leveling up?

"In the right combination" vs "with the right combination"?

What flight has the highest ratio of time difference to flight time?

Which kind of appliances can one connect to electric sockets located in an airplane's toilet?

Can I equip Skullclamp on a creature I am sacrificing?

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

What is the result of assigning to std::vector<T>::begin()?

Inappropriate reference requests from Journal reviewers

Return the Closest Prime Number

How did the Bene Gesserit know how to make a Kwisatz Haderach?



Where to upload PHP files that query data tables in Magento



The Next CEO of Stack OverflowOverriding send email functions with custom functionsCopying data between tables via PHP not working?How Secure Are User Made PHP Files?Order emails not sending to Sales Representative (store email address)Sending order email when pragmatically updating an orderExport Orders from Magento MySQL DB without MagentoBlock/limit/filter addresses or email address?Past deleted order details being used by new ordersWhere magento store data from account info on order pageMagento1 order extra steps for custom items










0















I have noticed that when exporting customer information through the admin panel it doesn't include all of the customers from the orders area.



I have been searching around for PHP code that does the job, although what I first need to understand is where I need to upload these PHP files for them to run successfully.



I am basically just wanting to export customer names and email addresses from the orders table so that I can import them into our email marketing application (and yes we do have permission to contact these people).



Do I need to upload PHP files to a specific folder in Magento for the queries to be able to access the data tables?










share|improve this question




























    0















    I have noticed that when exporting customer information through the admin panel it doesn't include all of the customers from the orders area.



    I have been searching around for PHP code that does the job, although what I first need to understand is where I need to upload these PHP files for them to run successfully.



    I am basically just wanting to export customer names and email addresses from the orders table so that I can import them into our email marketing application (and yes we do have permission to contact these people).



    Do I need to upload PHP files to a specific folder in Magento for the queries to be able to access the data tables?










    share|improve this question


























      0












      0








      0








      I have noticed that when exporting customer information through the admin panel it doesn't include all of the customers from the orders area.



      I have been searching around for PHP code that does the job, although what I first need to understand is where I need to upload these PHP files for them to run successfully.



      I am basically just wanting to export customer names and email addresses from the orders table so that I can import them into our email marketing application (and yes we do have permission to contact these people).



      Do I need to upload PHP files to a specific folder in Magento for the queries to be able to access the data tables?










      share|improve this question
















      I have noticed that when exporting customer information through the admin panel it doesn't include all of the customers from the orders area.



      I have been searching around for PHP code that does the job, although what I first need to understand is where I need to upload these PHP files for them to run successfully.



      I am basically just wanting to export customer names and email addresses from the orders table so that I can import them into our email marketing application (and yes we do have permission to contact these people).



      Do I need to upload PHP files to a specific folder in Magento for the queries to be able to access the data tables?







      magento-enterprise orders php






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 45 mins ago









      Teja Bhagavan Kollepara

      3,01241949




      3,01241949










      asked Feb 3 '14 at 14:09









      user3182742user3182742

      85




      85




















          2 Answers
          2






          active

          oldest

          votes


















          0














          Just as long as you can get to the mage application from your script, it doesn't really matter where. Within reason of course - some will tell you to create a module in the local codebase, I prefer a "scripts" folder in the Magento root for simple data access. It depends on how involved you want to get with it.



          In your script in the scripts folder, you can access the Application like so:



          require_once("../app/Mage.php");


          Once you have that, you can access the orders collection:



          $orders = Mage::getModel('sales/order')->getCollection();


          The reason you are not seeing all customers from orders is likely guest orders - if a customer checks out as a guest they are not saved in the list of customers.






          share|improve this answer























          • Lovely stuff - thanks Ben. I have now been able to push on with this and create a PHP script that accesses the Sales Order table and writes all of the customer names and email addresses to a downloadable CSV file. I've password protected this PHP file for obvious reasons. If anyone would like me to post the code then please let me know and I'll be happy to do so. Thanks again - the Stack Exchange community are the best!

            – user3182742
            Feb 4 '14 at 18:25


















          1














          As Ben already said, you can put them anywhere.
          We usually create a folder called tools for this kind of scripts which is located in the document root.






          share|improve this answer























            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%2f14330%2fwhere-to-upload-php-files-that-query-data-tables-in-magento%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Just as long as you can get to the mage application from your script, it doesn't really matter where. Within reason of course - some will tell you to create a module in the local codebase, I prefer a "scripts" folder in the Magento root for simple data access. It depends on how involved you want to get with it.



            In your script in the scripts folder, you can access the Application like so:



            require_once("../app/Mage.php");


            Once you have that, you can access the orders collection:



            $orders = Mage::getModel('sales/order')->getCollection();


            The reason you are not seeing all customers from orders is likely guest orders - if a customer checks out as a guest they are not saved in the list of customers.






            share|improve this answer























            • Lovely stuff - thanks Ben. I have now been able to push on with this and create a PHP script that accesses the Sales Order table and writes all of the customer names and email addresses to a downloadable CSV file. I've password protected this PHP file for obvious reasons. If anyone would like me to post the code then please let me know and I'll be happy to do so. Thanks again - the Stack Exchange community are the best!

              – user3182742
              Feb 4 '14 at 18:25















            0














            Just as long as you can get to the mage application from your script, it doesn't really matter where. Within reason of course - some will tell you to create a module in the local codebase, I prefer a "scripts" folder in the Magento root for simple data access. It depends on how involved you want to get with it.



            In your script in the scripts folder, you can access the Application like so:



            require_once("../app/Mage.php");


            Once you have that, you can access the orders collection:



            $orders = Mage::getModel('sales/order')->getCollection();


            The reason you are not seeing all customers from orders is likely guest orders - if a customer checks out as a guest they are not saved in the list of customers.






            share|improve this answer























            • Lovely stuff - thanks Ben. I have now been able to push on with this and create a PHP script that accesses the Sales Order table and writes all of the customer names and email addresses to a downloadable CSV file. I've password protected this PHP file for obvious reasons. If anyone would like me to post the code then please let me know and I'll be happy to do so. Thanks again - the Stack Exchange community are the best!

              – user3182742
              Feb 4 '14 at 18:25













            0












            0








            0







            Just as long as you can get to the mage application from your script, it doesn't really matter where. Within reason of course - some will tell you to create a module in the local codebase, I prefer a "scripts" folder in the Magento root for simple data access. It depends on how involved you want to get with it.



            In your script in the scripts folder, you can access the Application like so:



            require_once("../app/Mage.php");


            Once you have that, you can access the orders collection:



            $orders = Mage::getModel('sales/order')->getCollection();


            The reason you are not seeing all customers from orders is likely guest orders - if a customer checks out as a guest they are not saved in the list of customers.






            share|improve this answer













            Just as long as you can get to the mage application from your script, it doesn't really matter where. Within reason of course - some will tell you to create a module in the local codebase, I prefer a "scripts" folder in the Magento root for simple data access. It depends on how involved you want to get with it.



            In your script in the scripts folder, you can access the Application like so:



            require_once("../app/Mage.php");


            Once you have that, you can access the orders collection:



            $orders = Mage::getModel('sales/order')->getCollection();


            The reason you are not seeing all customers from orders is likely guest orders - if a customer checks out as a guest they are not saved in the list of customers.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 3 '14 at 15:12









            Ben TrubyBen Truby

            506311




            506311












            • Lovely stuff - thanks Ben. I have now been able to push on with this and create a PHP script that accesses the Sales Order table and writes all of the customer names and email addresses to a downloadable CSV file. I've password protected this PHP file for obvious reasons. If anyone would like me to post the code then please let me know and I'll be happy to do so. Thanks again - the Stack Exchange community are the best!

              – user3182742
              Feb 4 '14 at 18:25

















            • Lovely stuff - thanks Ben. I have now been able to push on with this and create a PHP script that accesses the Sales Order table and writes all of the customer names and email addresses to a downloadable CSV file. I've password protected this PHP file for obvious reasons. If anyone would like me to post the code then please let me know and I'll be happy to do so. Thanks again - the Stack Exchange community are the best!

              – user3182742
              Feb 4 '14 at 18:25
















            Lovely stuff - thanks Ben. I have now been able to push on with this and create a PHP script that accesses the Sales Order table and writes all of the customer names and email addresses to a downloadable CSV file. I've password protected this PHP file for obvious reasons. If anyone would like me to post the code then please let me know and I'll be happy to do so. Thanks again - the Stack Exchange community are the best!

            – user3182742
            Feb 4 '14 at 18:25





            Lovely stuff - thanks Ben. I have now been able to push on with this and create a PHP script that accesses the Sales Order table and writes all of the customer names and email addresses to a downloadable CSV file. I've password protected this PHP file for obvious reasons. If anyone would like me to post the code then please let me know and I'll be happy to do so. Thanks again - the Stack Exchange community are the best!

            – user3182742
            Feb 4 '14 at 18:25













            1














            As Ben already said, you can put them anywhere.
            We usually create a folder called tools for this kind of scripts which is located in the document root.






            share|improve this answer



























              1














              As Ben already said, you can put them anywhere.
              We usually create a folder called tools for this kind of scripts which is located in the document root.






              share|improve this answer

























                1












                1








                1







                As Ben already said, you can put them anywhere.
                We usually create a folder called tools for this kind of scripts which is located in the document root.






                share|improve this answer













                As Ben already said, you can put them anywhere.
                We usually create a folder called tools for this kind of scripts which is located in the document root.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 3 '14 at 20:01









                Anna VölklAnna Völkl

                15.6k347134




                15.6k347134



























                    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%2f14330%2fwhere-to-upload-php-files-that-query-data-tables-in-magento%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

                    Disable / Remove link to Product Items in Cart Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How can I limit products that can be bought / added to cart?Remove item from cartHide “Add to Cart” button if specific products are already in cart“Prettifying” the custom options in cart pageCreate link in cart sidebar to view all added items After limit reachedLink products together in checkout/cartHow to Get product from cart and add it againHide action-edit on cart page if simple productRemoving Cart items - ObserverRemove wishlist items when added to cart

                    Helsingin valtaus Sisällysluettelo Taustaa | Yleistä sotatoimista | Osapuolet | Taistelut Helsingin ympäristössä | Punaisten antautumissuunnitelma | Taistelujen kulku Helsingissä | Valtauksen jälkeen | Tappiot | Muistaminen | Kirjallisuutta | Lähteet | Aiheesta muualla | NavigointivalikkoTeoksen verkkoversioTeoksen verkkoversioGoogle BooksSisällissota Helsingissä päättyi tasan 95 vuotta sittenSaksalaisten ylivoima jyräsi punaisen HelsinginSuomalaiset kuvaavat sotien jälkiä kaupungeissa – katso kuvat ja tarinat tutuilta kulmiltaHelsingin valtaus 90 vuotta sittenSaksalaiset valtasivat HelsinginHyökkäys HelsinkiinHelsingin valtaus 12.–13.4. 1918Saksalaiset käyttivät ihmiskilpiä Helsingin valtauksessa 1918Teoksen verkkoversioTeoksen verkkoversioSaksalaiset hyökkäävät Etelä-SuomeenTaistelut LeppävaarassaSotilaat ja taistelutLeppävaara 1918 huhtikuussa. KapinatarinaHelsingin taistelut 1918Saksalaisten voitonparaati HelsingissäHelsingin valtausta juhlittiinSaksalaisten Helsinki vuonna 1918Helsingin taistelussa kaatuneet valkokaartilaisetHelsinkiin haudatut taisteluissa kaatuneet punaiset12.4.1918 Helsingin valtauksessa saksalaiset apujoukot vapauttavat kaupunginVapaussodan muistomerkkejä Helsingissä ja pääkaupunkiseudullaCrescendo / Vuoden 1918 Kansalaissodan uhrien muistomerkkim

                    Adjektiivitarina Tarinan tekeminen | Esimerkki: ennen | Esimerkki: jälkeen | Navigointivalikko