Articles in the Magento Category
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.
Difference between EAV and Flat Catalog
In EAV database model, data are stored in different smaller tables rather than storing in a single table.
product name is stored in catalog_product_entity_varchar table
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
Different stores can be set in Magento. A product can be made visible in selected stores.
* get store id
$storeId = Mage::app()->getStore()->getId();
* call the Magento catalog/product model
* set the current store ID
* load the product
$product = Mage::getModel('catalog/product')
Hope it helps. Thanks.
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.
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
Getting URL of a current page you are visiting or working on is a common requirement in any web development project. There are various ways you can get the current URL of a page in Magento. Here are some :-
From Mage_Core_Helper_Url class
When you fetch product data, you get the price as integer. Now, you have to display the price with currency suffix. You can format price with the following code.
Let $_finalPrice be the integer price fetched.
Here are code to Get, Set, and Unset Session in Magento.
Set session with variable Name ‘testing_magento‘. The session value here is ‘hello‘.
You can choose the Catalog view option as grid only or list only. The default is Grid/List. You can change it to List/Grid as well.
To do so:
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 same login page. I could not enter the dashboard page. Error message is displayed when I enter wrong username or password. But nothing is displayed and I am redirected to the same login page when I insert correct username and password.
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.
I am installing a fresh magento 22.214.171.124 in my Windows XP computer. I have Xampp installed. While installing magento, I had a problem at the configuration step where I had to fill database host, username, password etc. When I click continue after filling the required fields, the installation process doesn’t move forward. I am redirected to the same page.
I was installing Magento 126.96.36.199 in my Windows XP computer. I am using Xampp. I encountered the following errors during the installation.
PHP Extension “curl” must be loaded
PHP Extension “mcrypt” must be loaded
PHP Extension “pdo_mysql” must be loaded