The default Magento catalog grid is set to display 3 products per column. Most users alter the number of columns by modifying the file
catalog/product/list.phtml. There’s actually a much cleaner approach to this task and you only need to modify an XML file.
I’ve been receiving a lot of inquiries on how to create a new customer record on the fly using
Mage.php or using the plugin Mage Enabler for WordPress. So, to save you time and also to provide a thread for this specific topic, here’s how to accomplish it.
If you’re thinking of creating a page that will display your customer list from Magento to a different PHP-based application, you can use the script below to do so.
First, let’s create a file called
index.php and inside it, create function (I named it getCustomers()) that will extract an array of customer list and their information. The function should be able to access the
Mage.php file of your Magento instance.
You might have a Magento based website running online and wanted to extend parts of it (also known as blocks, which may include some css and js in the code) to an external site which may either be a blog, another CMS or any other PHP based web application. If you have been following my previous posts, you will know that by adding the Mage.php file of your Magento instance to your application, you can actually pull the needed HTML blocks at any time. The only problem is that most of the examples available online asks you to use the getChildHtml(‘your-block-here’) in which most the time frustrates you because of its complexity and limited resources of how you can actually use it.
There are other ways of doing it. Oddly enough, some are pretty simple and straight forward.
This is a follow up post to a previous article I wrote on how to add products into Magento but this time the script includes custom options (attributes) of the product. I used Magento version 220.127.116.11 in this example. Just copy the whole script and save it as index.php.