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
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
add a comment |
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
add a comment |
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
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
magento-enterprise orders php
edited 45 mins ago
Teja Bhagavan Kollepara
3,01241949
3,01241949
asked Feb 3 '14 at 14:09
user3182742user3182742
85
85
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
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
add a comment |
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.
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%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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Feb 3 '14 at 20:01
Anna VölklAnna Völkl
15.6k347134
15.6k347134
add a comment |
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%2f14330%2fwhere-to-upload-php-files-that-query-data-tables-in-magento%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