Home » Archive

Articles tagged with: Magento

Magento »

[3 Dec 2009 | One Comment | 4,270 views]

We are not allowed to order configurable and bundle products directly. We have to select product options from product detail page of configurable or bundle product. Only then we can add the product to cart. The following code fetches the order option selected for configurable and bundle products:

Magento »

[2 Dec 2009 | 37 Comments | 52,867 views]

Attribute in Magento is like a property. All Products, Categories, Orders, Customers, etc. have attributes. For example, the attribute of a product is its name, sku, description, image, etc. This article will show you how to get attribute name and value for any product.

Magento »

[2 Dec 2009 | 16 Comments | 19,708 views]

The redirect functions are present in Mage_Core_Controller_Varien_Action class. /* Redirect to certain url  */ _redirectUrl($url) /* Redirect to certain path */ _redirect($path, $arguments=array())

Magento »

[27 Nov 2009 | 5 Comments | 5,117 views]

Suppose, you want to delete an attribute. But there is no delete option while you edit the attribute. This means that the attribute is system attribute. System attributes cannot be deleted. Only user defined attributes can be deleted. To delete the attribute, you have to make it user defined.

Magento »

[27 Nov 2009 | 9 Comments | 7,653 views]

Difference between EAV and Flat Catalog In EAV database model, data are stored in different smaller tables rather than storing in a single table. Like, product name is stored in catalog_product_entity_varchar table product id is stored in catalog_product_entity_int table product price is stored in catalog_product_entity_decimal table

Magento »

[27 Nov 2009 | One Comment | 2,229 views]

To be able to write your custom log message, you have to enable logging from Magento Admin. To enable logging, go to Admin Panel -> System -> Configuration -> Developer -> Log Settings -> Enabled = Yes

Magento »

[23 Nov 2009 | 2 Comments | 2,757 views]

Different stores can be set in Magento. A product can be made visible in selected stores.

Magento »

[23 Nov 2009 | 15 Comments | 14,339 views]

Scenario: A simple product is associated with a configurable product. You have the id of the simple product. Now, you need the id of the configurable product with which the simple product is associated. Get parent product id, i.e. get id of configurable product from a simple product.

Magento »

[23 Nov 2009 | 30 Comments | 22,318 views]

You can resize image with fixed height and variable width. Or, you can resize with fixed width and variable height. Following code shows how you do it in Magento. Fixed width of 600px

Magento »

[23 Nov 2009 | 7 Comments | 25,035 views]

The following code gives you the current url of the page you are:- $currentUrl = $this->helper(‘core/url’)->getCurrentUrl(); // Gives the base url of your magento installation $baseUrl = Mage::getBaseUrl();

Magento »

[23 Nov 2009 | 11 Comments | 5,364 views]

When you fetch product data, you get the price as integer. Now, you must display the price with currency suffix. You can do this with the following code:- // let $_finalPrice be the integer price fetched

Magento »

[23 Nov 2009 | 8 Comments | 5,951 views]

Set a custom session with Variable Name ‘testing_magento’. The session value here is ‘hello’. Mage::getSingleton(‘core/session’)->setTestingMagento(‘hello’); Get session testing_magento $test = Mage::getSingleton(‘core/session’)->getTestingMagento();

Magento »

[23 Nov 2009 | 3 Comments | 4,073 views]

You can choose the view option as grid only or list only. The default is Grid/List. You can change it to List/Grid as well. For this, you have to go to System->Configuration->Catalog->Frontend

Magento »

[7 Jul 2009 | 12 Comments | 31,063 views]

Problem: I had a new installation of magento. But I was unable to login as an administrator. I went to the admin login page, entered correct username and password but was redirected to the

Magento »

[7 Jul 2009 | 5 Comments | 3,181 views]

Remember that, Sample Data must be installed prior to the basic Magento Installation. But never mind if you forgot to install sample data before installing Magento. Here, I will show you how you can install sample data after you have installed Magento.