Splitting Address in Magento

0
Zend_Debug::dump($address->getStreet(1)); Zend_Debug::dump($address->getStreet(2)); Zend_Debug::dump($address->getStreet(3));

ERROR 1449 (HY000) at line 16982: The user specified as a definer (‘user’@’localhost’) does not exist

0
/*!50013 DEFINER=`some_user`@`some_host` SQL SECURITY DEFINER */ As far as I know, there is not yet a flag for mysqldump to avoid DEFINER export. So, a solution is to replace DEFINER=`some_user`@`some_host` with DEFINER=CURRENT_USER

How to retrieve eav attribute’s database tables dynamically in Magento

0
This is a sample or example code where attributes database tables are being retrieved dynamically.In the end of the loop there is an example code where by some storeview level of the attributes are being removed as maintanance procedure or whatever someones wants to do. P:S **Notice the DELETE SQL [...]

Retrieving Attribute Options in Magento

0
This becomes handy if you intend to build a drop-down based on attribute options: < ?php   ini_set('display_errors', 1); require_once dirname(__FILE__) . '/../app/Mage.php'; Mage::app();   $results = Mage::getModel('eav/entity_attribute_source_table') [...]

Dumps && Logs – SF2

0
Dumping: use Doctrine\Common\Util\Debug; Debug::dump(__METHOD__.'#'.__LINE__); Log: REF:Symfony\Bridge\Monolog\Logger $logger = $this->get('logger'); $logger->info("foo");

Search Magento Products not attached to Categories – SQL

0
< ?php   ini_set('display_errors', 1); require '../app/Mage.php';   //init admin store Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);   /** * @desc Search All Product that are not attached to Any Category in Magento */ $resource = Mage::getSingleton('core/resource'); $db = [...]
Screen Shot 2014-01-23 at 12.20.30

Configuration Dependency in system.xml

0
In system.xml the following setting(s) one is for production and one for testing/development.In this approach Magento reflects the UI based on the test mode, it will show the user which key to use.See screenshots for more clarification. Results in the backend – Development: Results in the backend [...]

Creating CSV Files in Magento – Quick && Clean

0
This is what works faster if I have to generate a csv document from Magento records: $collection = Mage::getResourceModel('catalog/product_collection'); $csvdata[] = array('ID'); foreach($collection as $product) { $csvdata[] = $product->getId(); } $file = new [...]

Video:Magento 2 Development Update

0

Upgrading The Kernel

0
This is how I got around again and this time put on a reference info for myself, as I do not do this very often. Copy old configurations to the new kernel /usr/src/linux/.config #make manuconfig #followed by exit {strange but works all the time here if not do make oldconfig} #make [...]
Go to Top