Archive: PHP
-
May 13, 2010
1 CommentAnalysis & Usage of Collections in Magento
As a Magento Programmer I am fascinated by the use & simplicity of collection used in Magento. Simplicity, does not really mean being simple (it is rather complex structured) but easy to use. With the help of one of my colleague, I got down to understand how collection really represents the “collection” of data we...
-
May 04, 2010
No CommentsSolution: Error Message Not Showing up in Frontend in Magento
I recently got to a situation where I needed to add a new frontend template for some module and after some action show the error or success message. Not the first time though . Interesting thing was even if I added this code in the PHTML...
-
Mar 24, 2010
1 CommentGenerating Backend-Admin URL with Key and Parameters in Magento
When you log into adminstrator part of the Magento webshop, and look into the url you may see something like...
-
Mar 16, 2010
4 CommentsMagento Module Release: Uses Layout To List Post, made by AW Blog, on the basis of Category Identifier
I’ve always wanted to contribute something in Magento Community and I think today the day has arrived. The module is named as Sirius Blog Helper, just a name, Who cares about the “Name” unless it works . The basic function of the Module is to list the post made via AW Blog extension, categorized...
-
Mar 10, 2010
4 CommentsGetting Ordered Items and their Detail from Order ID in Magento
Here is a small snippet of code, yet useful, to get ordered items and its details. I’ve deviced this code a lot before and posted in Magento Commerce’s Forum as well. But felt like writting it again, so that I can have a quick refrence to it as well. Next thing, I’ve tried a lot...
-
Jan 18, 2010
2 CommentsGetting Customer’s Info Using Single Query Including Billing and Shipping Addresses
Query in Magento can be quite troublesome, if you are a starter..or non-starter. So I’ve tried to share some of the difficult queries using collection in Magento, so that it will be helpful to my blog readers and also a place where I can later refer to. Here is one of them, may not be...
-
Jan 14, 2010
10 CommentsGetting Configurable Attributes (Super Attributes) of a Configurable Product
In one of those time when you need to know what attributes of a product is used to make the current configurable product “configurable”, then here it goes Those configurable attributes are called as “Super Attributes”. Looking into the lower level at the Database level the attributes id are saved in the table...
-
Jan 13, 2010
5 CommentsCreating Custom Sourced Multiselect Product Attribute
Creating Multiselect type of product attribute whose source will be the Magento’s core tables is pretty simple. Just go to Manage Attributes and create a new one. But if you want the attribute’s source table be a custom table, then you need to think. Some times a case pops up that the store admin wants...
-
Dec 25, 2009
No CommentsCreating Block From the Code in Magento
Here are some methods of creating block by code in Magento. This type of code can be used directly in template, not need to create a layout file or add a child node inside already existing layout file. You can use this to echo a different type of block inside already loading block and...
-
Dec 22, 2009
29 CommentsAdding custom options to a product in Magento
Adding custom option in Magento is pretty easy! You just need to know the format of an array, which is taken by catalog/product_option Model to set the custom option. I’ve deviced a simple function (setCustomOption) that just does that. The function, according to the input type and values assigned creates an array, which is then...