File: $MAGENTO_DIR/app/etc/local.xml The code you see should look very similar to the following. Simply modify the settings and save. Change the values within the CDATA brackets. <connection> <host><![CDATA[localhost]]></host> <username><![CDATA[database_username]]></username> <password><![CDATA[database_password]]></password> <dbname><![CDATA[database_name]]></dbname> <active>1</active> </connection>
Posted on March 24, 2016, 10:41 pm, by admin, under
Magento 1.x.
<?php /** * $storeCode is Store View Code */ public function getCsvProducts($storeCode=’default’) { $csvProducts = array(); if ($storeCode!==’default’) { $myStoreId = Mage::app()->getStore($storeCode)->getId(); if (isset($myStoreId) && $myStoreId>0) { Mage::app()->setCurrentStore($myStoreId); } } $products = Mage::getModel(’catalog/product’)->getCollection(); foreach($products as $product) { $csvProducts[] = array($product->getName(),$product->getDescription()); } }
Posted on March 15, 2016, 5:52 pm, by admin, under
Magento 1.x.
Step 1: Add the following to your plugin’s app/code/local/Vendorname/Modulename/etc/config.xml file <?xml version="1.0"?> <config> … … <crontab> <jobs> <hexacode_kleidoo> <schedule> <cron_expr>*/5 * * * *</cron_expr> </schedule> <run> <model>vendorname_modulename/observer::mymethod</model> </run> </hexacode_kleidoo> </jobs> </crontab> </config> Step 2: Create app/code/local/Vendorname/Modulename/Model/Observer.php file. We put it to Observer.php in this example but we could create a new class file for […]
Posted on March 14, 2016, 9:18 am, by admin, under
Magento 2.0.
Files involved: app/code/Mika/CustomListing/etc/module.xml // a file setup module app/code/Mika/CustomListing/Block/Rewrite/Product/ListingProduct.php // a block file used for rewriting ListingProduct.php
Posted on March 14, 2016, 9:16 am, by admin, under
Magento 2.0.
Step 1 Create Block File: $MAGENTO_DIR/app/code/Imran/Test/Block/Titles.php <?php namespace Imran\Test\Block; class Titles extends \Magento\Framework\View\Element\Template { public function getTitle() { return "Mr"; } } Step 2 Create Layout File: $MAGENTO_DIR/app/code/Imran/Test/view/layout/test_index_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <title/> </head> <body> <referenceContainer name="content"> <block class="Imran\Test\Block\Tiles" template="Imran_Test::landingpage.phtml"/> </referenceContainer> <referenceBlock name="test-block" remove="true"/> </body> </page> Step 3 Create Template phtml […]
Posted on March 14, 2016, 9:14 am, by admin, under
Magento 2.0.
Posted on March 14, 2016, 9:12 am, by admin, under
Magento 2.0.
In this tutorial, you’ll learn how-to create a database driven custom Magento 2.0 widget. It takes you through step by step creation of all necessary php, xml and template files…