How to add checkbox field in Admin custom module form and populate the checkbox
-
zendnwar
-
June 16, 2015
-
Magento
-
0 Comments
$fieldset->addField(‘checkbox_name’, ‘checkbox’, array( ‘name’ => ‘ checkbox_name ‘, ‘onclick’ => ‘this.value = this.checked ? 1 : 0;’, ‘tabindex’ => 1 )); How to re-populate the checkbox on Edit page: Just add the extra line in ablove code like below: $fieldset->addField(‘checkbox_name’, ‘checkbox’, array( ‘name’ => ‘ checkbox_name ‘, ‘onclick’ => ‘this.value = this.checked ? 1 : 0;’, ‘tabindex’ => 1 ))->setIsChecked($model->getCheckboxName());
Continue Reading
How to disable Merge JavaScript Files on db in magento
-
zendnwar
-
June 16, 2015
-
Magento
-
0 Comments
Table: core_config_data path:dev/js/merge_files path:dev/css/merge_css_files
Continue Reading
Database server does not support the InnoDB storage engine in Magento
-
zendnwar
-
May 30, 2015
-
Magento
-
0 Comments
It is very simple solution. Please follow the below step: Go To the file app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php Replace : public function supportEngine() { $variables = $this->_getConnection() ->fetchPairs(‘SHOW VARIABLES’); return (!isset($variables‘have_innodb’) || $variables‘have_innodb’ != ‘YES’) ? false : true; } With : public function supportEngine() { $variables = $this->_getConnection() ->fetchPairs(‘SHOW ENGINES’); return (isset($variables‘InnoDB’) && $variables‘InnoDB’ != ‘NO’); }
Continue Reading
Track Visitor’s Information in Magento
-
zendnwar
-
April 23, 2015
-
Magento
-
215 Comments
<?php $visitorInfo = Mage::getSingleton(‘core/session’)->getVisitorData(); print_r($visitorInfo); // Array // ( // => // server_addr => 167772437 // remote_addr => 167772437 // http_secure => // http_host => 127.0.0.1 // http_user_agent => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) //AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10 // http_accept_language => en-US,en;q=0.8 // http_accept_charset => ISO-8859-1,utf-8;q=0.7,*;q=0.3 // request_uri => /magento/index.php/catalog/category/view/id/22 // session_id => 13qm5u80238vb15lupqcac97r5 // …
Continue Reading
Get products id, name, price, quantity, etc. present in your cart in Magento
-
zendnwar
-
April 23, 2015
-
Magento
-
0 Comments
<?php $items = Mage::getSingleton(‘checkout/session’)->getQuote()->getAllItems(); foreach($items as $item) { echo ‘ID: ‘.$item->getProductId().'<br />’; echo ‘Name: ‘.$item->getName().'<br />’; echo ‘Sku: ‘.$item->getSku().'<br />’; echo ‘Quantity: ‘.$item->getQty().'<br />’; echo ‘Price: ‘.$item->getPrice().'<br />’; echo “<br />”; } ?>
Continue Reading
getBaseUrl – Magento URL Path in Magento
-
zendnwar
-
April 23, 2015
-
Magento
-
0 Comments
<?php // http://domainname.com/ echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); // http://domainname.com/js/ echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); // http://domainname.com/index.php/ echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); // http://domainname.com/media/ echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); // http://domainname.com/skin/ echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>
Continue Reading
Get Customer Shipping/Billing Address in Magento
-
zendnwar
-
April 23, 2015
-
Magento
-
0 Comments
<?php $customerAddressID = Mage::getSingleton(‘customer/session’)->getCustomer()->getDefaultShipping(); if ($customerAddressID ){ $address = Mage::getModel(‘customer/address’)->load($customerAddressID ); }
Continue Reading
Get Current Store Details (ID, Code, Name and Status) in Magento
-
zendnwar
-
March 30, 2015
-
Magento
-
0 Comments
// Gets the current store’s details $store = Mage::app()->getStore(); // Gets the current store’s id $storeId = Mage::app()->getStore()->getStoreId(); // Gets the current store’s code $storeCode = Mage::app()->getStore()->getCode(); // Gets the current website’s id $websiteId = Mage::app()->getStore()->getWebsiteId(); // Gets the current store’s group id $storeGroupId = Mage::app()->getStore()->getGroupId(); // Gets the current store’s name $storeName = Mage::app()->getStore()->getName(); // Gets the current store’s …
Continue Reading
What is the purpose of each of the fields in the core_url_rewrite table?
-
zendnwar
-
March 24, 2015
-
Magento
-
250 Comments
– url_rewrite_id: increment id – store_id: id of the related store – id_path: internal Magento URL: module/controller/action/parameters…
Continue Reading
When does Magento created the rewrite records for categories and products?
-
zendnwar
-
March 24, 2015
-
Magento
-
0 Comments
When create or update a category or product and reindex.
Continue Reading