LinkedIn Twitter RSS Reset

Getting the Product's Price in current currency format of store

Magento gives an option to have different currency defined for each store. To get the product’s price based on the current store you can use the following code. It uses the default Magento’s helper class to do. <?php /*...

Adding 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....

Getting all custom options of a product in Magento

Custom options are the options that can be added to any product, which gives an option for the user of the site to select what type of product they actually want. Here is a scenario where custom option can be helpful. If you have a product say...

Get all options of select or multiselect attribute in Magento by attribute code

One of the things that a Magento developer deal, time and again is finding out all the options of color or manufacturer or size attribute. You may also need to find out what are the options available for color attribute before you add new option...

Showing Breadcrumbs Anywhere in Magento

In Magento, by default there is a reference place where breadcrumbs get showed, that is just above the content reference! But, sometimes you need to show the breadcrumbs twice! above and below the content. Or sometimes you just need to show...

Debugging Technique in Magento – Chapter 1 :: Debugging Layout

I’ve been working in Magento, for 1 year now! During this whole year I have learnt a lot, and have been sharing my learnings through this Blog. One of the thing that strikes me a lot is the debugging technique. My collegue ask me a lot...

Adding Tabs in Product View Page Through Layout In Magento

One of my new colleague, today asked me how to add tabs in product view page in Magento. He told me earlier he had used his own tabs CSS and Javascript to do, but now he found out that Magento gives default Tab Javascript to do the same. Then,...

Using Custom Query in Magento

Magento has given us very good features to manage Models and Collection for interacting with Database tables. Nowonder, they are very helpful in most of the cases. Yet, we may need to write custom query in some cases (if you need it quick or...

General Workflow of Magento's Import/Export – Dataflow

Magento’s Dataflow (Inport/Export) is one of distinguishing feature that makes Magento the leader in eCommerce Software. But for a programmer to understand how it workes in Magento can be quite nasty. I tried to understand how it workes...

Converting Text to Image in PHP formatted by alignment

During one of my project works I came across a situation like changing the input of TINYMCE editor to image. Can you believe what can be the user’s requirement? Basically what the client needed was to change the text to image and text...