Posts

Magento Cache

Magento uses cache at different levels in the system. These can be seen in the admin area under System -> Cache Management.

The main model responsible for Magento’s cache is the Mage_Core_Model_Cache class. You can retrieve an instance of the class using the below line of code.
The following methods can be found in ...

Magento Shipment Creation

Magento shipment creation occurs when a merchant, in the Magento admin, heads to Sales -> Orders, selecting an order and clicking the Ship button.
The Ship button can be seen or not seen due to the following code in the Mage_Adminhtml_Block_Sales_Order_View class.
The canShip() method belongs in the main sales order model.
Here we can ...

Magento Custom Payment Method

This article will guide you through the steps required to create a Magento custom payment method.
As with most things, Magento requires us to configure a custom module in order to register our payment method.
So to start with, add the custom module’s XML declaration file.
Then add the module’s config.xml file. Here, we’ll ...

Magento Store Configuration

Within Magento, we can use useful methods to return data that is saved within Magento’s configuration.
When using the getStoreConfig() method, we can pass in a single string parameter.
The sectionName, groupName and fieldName are present under the <sections>, <groups> and <fields> nodes respectively in the system.xml files of Magento.
As an example, ...

Magento SOAP API

The Magento SOAP API allows the merchant and third parties to manage resources such as customers, categories, products, and sales orders. It also allows you to manage shopping carts and inventory.
Magento provides URLs to view the methods available.

SOAP v1 – http://www.yoursite.com/api/soap?wsdl=1
SOAP v2 – http://www.yoursite.com/api/v2_soap?wsdl=1

Existing API calls include but are ...

Magento Checkout Flow

The Magento checkout flow involves templates, block classes and JavaScript to work together in order for the customer to successfully place an order. This article will explain what files are involved and how the checkout works.
To start with, it is worth looking at the checkout.xml layout file within the RWD theme and specifically looking ...

Magento Invoice Creation

Magento invoice creation is a feature in Magento whereby an invoice can be generated either by a payment being captured online or offline.
Capturing offline is simply generating the invoice via the admin panel. Within the admin area, by clicking on an order that hasn’t been invoiced yet in Sales -> Orders, an Invoice button ...

Magento Dispatch Process

Following on from the Magento Front Controller article, we now take a look at the Magento dispatch process within the dispatch() method. Let’s take a look at it.
Firstly, we check the base URL using the _checkBaseUrl() method. This method will redirect a visitor to the configured base URL if the current request does not ...

Magento Flat Tables

Within the admin area, Magento gives us the ability to enable Flat Catalog Product and Flat Catalog Category options.

Why would you want to enable these? Well, usually, these tables store information about category and product data in many different tables, and so querying for this information, such as when on a category page ...

Magento Varien_Db_Ddl_Table class

Since Magento 1.6 was released, Magento supports more database backends than just MySQL. So in order to make our module setup scripts cross-database compatible, Magento offers a DDL (Data Definition Language) Table object. The Magento Varien_Db_Ddl_Table class can be used to add, create or remove columns within setup scripts of modules. Coupled with the Mage_Core_Model_Resource_Setup ...