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())
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. 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
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
Here, I will be demonstrating on showing or hiding a div when a link is clicked. I have done this with Javascript and CSS. I have called showHideDiv() Js function when the link is clicked. The display of the div where content is present, is visible or hidden on each click. For this, CSS styling [...]
Different stores can be set in Magento. A product can be made visible in selected stores.
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.
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
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();
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
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();
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