How to create simple module magento2

Magento, Magento2
Here we go to create your first or very simple module in magento2. We are going to create module with Namespace is "Jwd" and Module Name is "WelcomeWorld". Step1: Create a module.xml file in app/code/Jwd/WelcomeWorld/etc/module.xml [sourcecode language="plain"] <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Jwd_WelcomeWorld" setup_version="1.0.0"> </module> </config> [/sourcecode]   Step2: Create app/code/Jwd/WelcomeWorld/registration.php [php] <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Jwd_WelcomeWorld', __DIR__ ); ?> [/php]   Step3: Create a frontend router in app/code/Jwd/WelcomeWorld/etc/frontend/routes.xml [sourcecode language="plain"] <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> <router id="standard"> <route id="welcomeworld" frontName="welcomeworld"> <module name="Jwd_WelcomeWorld"/> </route> </router> </config> [/sourcecode]   Step4: Create the file index.php for controller action in app/code/Jwd/WelcomeWorld/Controller/Index. This will map to http://127.0.0.1/magento2/welcomeworld/index/index welcomeworld: front name index: name of controller folder index: name of action file – index.php Each action is its own class extending \Magento\Framework\App\Action\Action. In every action file,…
Read More

Magento 2.0 what’s cooking up?

Magento
Much like the outside world, the world of internet is not devoid of its share of controversies and mysteries. Application development organizations in a bid to market their new product try to create hype and mystery before its launch. For them it might be a marketing gimmick, but it provides cannon fodder to the media to further fuel the fire and ignite the internet with a new sensational story and in the process the newly launched product becomes popular.   Magento 2.0 which is an open source CMS tool for managing content for ecommerce websites has been in the new since 2010, when it was announced to be released in 2011. But in 2011, Magento was acquired by eBay and the reorganization process took its toll on the release and…
Read More

Transactional Emails Variable Magento

Magento
This post help to find variable which used in magento email template. - For registration: {{var customer}} {{var customer.ID}} {{var customer.email}} {{var customer.firstname}} {{var customer.lastname}} {{var customer.name}} {{var customer.password}} {{var customer.created_in}} Store Name {{var customer.dob}} Date of Birth {{var customer.password_hash}} {{var customer.prefix}} {{var customer.middlename}} Initial {{var customer.suffix}} {{var customer.group_id}} {{var customer.taxvat}} {{var customer.store.name}} {{var customer.store.group.name}} - To subscribe/unsubscribe newsletter: {{var subscriber.getConfirmationLink()}} {{var subscriber.getUnsubscriptionLink()}} {{var subscriber.email}} - Send to a friend: {{var product_image}} {{var name}} Recipient’s Name {{var email}} Recipient’s Email {{var product_name}} Product Name {{var product_url}} Product Url {{var message}} Message Text {{var sender_name}} Sender’s Name {{var sender_email}} Sender’s Email {{var product_image}} Product Image - Depend Condition {{depend order.getIsNotVirtual()}} {{/depend}} {{depend salable}} {{/depend}} - If Condition {{if order.getIsNotVirtual()}} {{else}} {{/if}} (else is optional) - Skin {{skin url=”‘}} - Store {{store…
Read More

validation classes magento

Magento
find all classes which are defined in directory of magento root directory that is: /js/prototype/validation.js file. Example: <input id="email_address" name="email" type="text" /> So please follow below classes which are used magento for validation. validate-no-html-tags: (HTML tags are not allowed) validate-select: (Please select an option) required-entry: (This is a required field) validate-number: (Please enter a valid number in this field) validate-number-range: (The value is not within the specified range) validate-digits: (Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas) validate-digits-range: (The value is not within the specified range) validate-alpha: (Please use letters only (a-z or A-Z) in this field) validate-code: (Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter) validate-alphanum: (Please use only letters…
Read More

Is Your Magento Store Secure? Here’s the Solution of Your Concern

Magento
Magento, despite being one of the robust e-commerce platforms available for online business players, has often found itself at the recieving end of hacking attacks and unauthorized logins, which further lead to online frogeries. Due to its huge popularity and the fact that it involves a lot of monetary transactions, e-businesses are realising the vulnerability of the platform and are vying to safegaurd their store from security breaches and malware attacks. So, how would you plan to protect your Magento store against the threat of cyber criminals? Well, the process is not as tricky as you might be thinking of. You only need to follow some simple security tips and make sure that you have incorporated all these basic things to your Magento store. But before we proceed to the…
Read More

Add custom column and get custom renderer value in Magento grid

Magento
This post is helpful to add custom column and get custom renderer value in Magento grid admin. In /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php file. [php] <?php protected function _prepareCollection() { $collection = Mage::getResourceModel($this->_getCollectionClass()); //$collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id',array('postcode')); // Added my developer //$collection->getSelect()->joinLeft('sales_flat_order_payment', 'main_table.entity_id = sales_flat_order_payment.parent_id','method'); // Added my developer $collection->getSelect()->joinLeft('sales_flat_order_status_history', 'main_table.entity_id = sales_flat_order_status_history.entity_id','comment'); // Added my developer $this->setCollection($collection); return parent::_prepareCollection(); } ?> [/php] [php] <?php protected function _prepareColumns() { /**** start *****/ $this->addColumn('comment', array( 'header' => Mage::helper('sales')->__('comment'), 'index' => 'comment', 'filter' => false, 'sortable' => false, 'renderer' => 'Mage_Adminhtml_Block_sales_Order_Renderer_Red', )); /**** end ******/ } ?> [/php] Make directory called Renderer inside directory where your Grid.php is located and make file Red.php Make class Mage_Adminhtml_Block_Catalog_Product_Renderer_Red extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract [php] <?php class Mage_Adminhtml_Block_sales_Order_Renderer_Red extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $row) { $value = $row->getData($this->getColumn()->getIndex()); return '<span style="color:…
Read More

Attribute dropdown value display in magento products grid

Magento
This post useful to display custom attribute dropdown value in products grid in magento admin. [php] $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'supplier'); $options = array(); foreach( $attribute->getSource()->getAllOptions(true, true) as $option ) { $options[$option['value']] = $option['label']; } $this->addColumn('supplier', array( 'header'=> Mage::helper('catalog')->__('Supplier'), 'width' => '80px', 'index' => 'supplier', 'type' => 'options', 'options' => $options, )); [/php] [JWD-Magento-Development]
Read More

Top 6 Magento Extensions for E-commerce Website Design

Magento
  Magento apps are amongst today's most utilized ecommerce platforms. Aside from solving lots of web store problems, the  apps enable you to store more merchandise with prices and descriptions. Not to mention, there's still tons of many other  possibilities. Magento ecommerce platform also enables small to medium-sized enterprises to produce their web stores  quicker and easier because of the fact that Magento plug-inare completed and developed by skilled developers in the field of  e-commerce and are readily available via Magento Connect marketplace. With magento, you'll have a site that is more  enhanced and efficient. Your customers online will be satisfied once they visit a web-based store that offers them the best browsingand shopping  experience. One more thing to note, Magento modules and extensions are PHP platforms and MySQL database…
Read More

Expanding Your Ecommerce Operation with the Magento Platform

Magento
  If you’re trying to establish and grow and ecommerce business in what is an incredibly competitive strata then you need all the help you can get. Once such tool which can really help you get the best of your idea and really put your hard work into action is the Magento ecommerce platform. Magento will take some of the workload which is associated with ecommerce off your hands, and empower you to focus on engaging your customers and growing your business. Furthermore, Magento offers tools which make it possible for you to control the content, functionality, look and feel of your online store, and a range of other support options, advice, services training and support as well. Magento is an eCommerce platform which is now used by approximately 5…
Read More