This was an interesting one the other day – we had the simple products created, and we had the configurable…
Magento
<?phpinclude “app/Mage.php”;Mage::app(); error_reporting(E_ALL);ini_set(“display_errors”, 1); // The Id you just marked from the transactional email template id$templateId = 1; // Define…
You can try this: $collection->getSelect()->distinct(true);But this will retrieve distinct values based on id. If you want to retrieve videos using…
This code is add button export to csv in form same as grid page. public function getElementHtml(){ $buttonBlock = $this->getForm()->getParent()->getLayout()->createBlock(‘adminhtml/widget_button’);…
In this tutorial, i will show you all different magento admin form fields we can use in admin forms. Magento…
UPDATE your_table SET your_field = REPLACE(your_field, ‘articles/updates/’, ‘articles/news/’) WHERE your_field LIKE ‘%articles/updates/%’
By deafult, when customer/user log in Magento, he/she is redirected to its account page. But if you’d like to redirect…
Get all disabled products from Magento using product collection: <?phpset_time_limit(0);error_reporting(E_ALL ^ E_NOTICE);ini_set(“display_errors”,’On’); require_once ‘app/Mage.php’;umask(0);Mage::app(‘default’); $products = Mage::getModel(‘catalog/product’)->getCollection() ->addAttributeToSelect(‘*’) ->addFieldToFilter(‘status’,Mage_Catalog_Model_Product_Status::STATUS_DISABLED); $products->load();foreach($products…
A collection is a Model type containing other Models, it is basically used in Magento to handle product lists (ie….
Creating a module which interact with a database table is quite simple. Most of the developers use magento module creator…