In this post I’m going to explain a nifty (and simple) little trick for accessing Magento functionality from an external PHP script. This is something I use all the time when developing Magento sites, and hopefully you will find it useful too!
There are plenty of applications for this, here are some of the common tasks I use it for…
It’s surprisingly easy, just 3 neat little lines…
The example above assumes the script is placed in the root of your Magento install. If you’re including this elsewhere you will have to update ‘app/Mage.php’ with the correct path to that file.
At Big Eye Deers, we have a vast amoutn of experience in both Magento eCommerce and bespoke WordPress web design and web development. Our technical director, Zak, is Magento certified and we keep up to date with the latest trends in the digital world to ensure we are always giving our clients the best solutions out there.
If you do have any questions about running magento code in an external PHP file or about your current site or an upcoming project, feel free to get in touch and we would be more than happy to help out! Head to our contact page for the details to get in touch with the team in either our Cardiff or Cornwall offices!
Magento is the leading solution for eCommerce, and we’re specialists. Magento is easy-to-use, completely customisable and endlessly scalable.
We offer custom web development services for any requirement. Manufacturing from scratch, we deliver a project entirely tailored to your needs.
Working with brands nationally from our offices in Cardiff and Exeter, our tenacious team of designers and developers deliver sophisticated results every time.