To get all the ordered items of the order use the following code. <?php $order_id = 2314; //use your own…..
A collection of Code Snippets and articles of the latest
Technology and Open Source.
In Magento Config.xml file is used to setup the module details. We used to setup config.xml file in PackageName/ModuleName/etc/. Magento collect all the config data from different modules and combine it all into a single file named config.xml. To view this file simply paste this code in any controllers, run it and see the magic. A huge tree with lots of nodes. <?php header('Content-Type: text/xml'); //header('Content-Type: text/plain'); echo $config = Mage::getConfig() ->loadModulesConfiguration('config.xml') ->getNode() ->asXML(); exit(); ?>
Slug is the seo friendly format of any text string. A slug is a text string contains alpha-numeric characters only,…..
We have customer email id and we want to get the other details of the customer. <?php $customer_email = “email@example.com”;…..
Magento is a complete and awesome MVC application. It’s fully moduler and easy to extend its features and functionality. All…..
Magento uses blocks terminology in its architecture to display the views. Blocks are classes in Magento modules which handles the…..
Removing or Adding top links in the header section of the theme is very easy via Layout.xml files. However we…..
This code will help to remove non alpha numeric characters from string.
<?php $string = "string containing # and @"; $clean_string = preg_replace("/[^a-z0-9\s]/", "", $string); ?>