0

I'm creating a custom Magento extension that includes a custom management area in Magento admin (a new tab under product management). As part of this new management area I would like to allow users to 'preview' a block of content based on data entered. Ideally this would be an in the management window that can reload a php script, sending the management attributes to that script so it can react accordingly.

My question is: What is the 'correct' way to setup and call on a custom PHP script from within Magento to fill this pop up?

It should have it's own URL within the Magento framework (I can pass attributes via the query string). The window.location for the would be updated to this URL (with query string) as triggered by the user to 'refresh' the content. What is the best way to incorporate the custom PHP script that produces the window content into Magento Admin so that I can call on it?

1 Answer 1

0

It's pretty simple. Not easy, necessarily, but simple. Create a new controller, and send the request to it. Do what you need to do in the controller, and spit back out output (I'm assuming you don't want to use the regular Magento admin interface for this, so you'll have to (likely) do your own templates and blocks...).

All in all, it's not that hard. Remember to register a route for your controller in adminhtml.xml, write your code, and you should be pretty much good to go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.