Magento 2

How to Change Order Buttons in Magento 2

How to Change Order Buttons in Magento 2

In the article I am going to answer how to add, remove and modify buttons on the Order view page in Magento 2   Order view page in the Magento administration panel allows you to perform certain actions for a specific Order. Sometimes these actions have to be adjusted based on Merchant's needs and business expectations....

Read more

Magento 2: How to add grid to the tab in customer_index_edit

Magento 2: How to add grid to the tab in customer_index_edit

Please follow below steps   admin layout xml app\code\Sugarcode\Test\view\adminhtml\layout\test_lists_edit.xml   <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">  ...

Read more

CREATE A GRID IN BACKEND ADMIN MAGENTO 2

CREATE A GRID IN BACKEND ADMIN MAGENTO 2

In magento 1x, it is so easy to create a grid show data in backend and magento 2 is so similar. Only with some part you can create a grid to show data from a table easily. However magento 2 gives you two ways to create a grid in backend. Today I will help you create a grid with simple way, so similar with magento...

Read more

Call helper from template magento 2

Call helper from template magento 2

$this->helper('[Vendor]\[Module]\Helper\[Helper Name]'); or    Roll your own factory: $objectManager = \Magento\Core\Model\ObjectManager::getInstance(); $helperFactory = $objectManager->get('\Magento\Core\Model\Factory\Helper'); $helper = $helperFactory->get('\PulseStorm\Commercebug\Helper\Data'); Or...

Read more

How to Create a Template Block in Magento 2

How to Create a Template Block in Magento 2

Block class and Layout XML   Magento 2 is now aware of our module, so let's create our block class. We'll do this by extending the \Magento\Framework\View\Element\Template class, and create a custom getName function:   Create a file Baz.php in new folder Foo/Bar/Block <?php namespace Foo\Bar\Block;   /** *...

Read more

Create a helper in a module in Magento 2

Create a helper in a module in Magento 2

Create: app/code/Company1/Module1/composer.json   {     "name": "company1/module-module1",     "description": "",     "require": {         "php": "~5.5.0|~5.6.0|~7.0.0",      ...

Read more

How to create Model and Collection in Magento 2

How to create Model and Collection in Magento 2

1. Insert some sample data on the custom database table Because we installed Tutorial_SimpleNews module via last post, we need to upgrade this module to insert the sample data. The directory structure in last post:   Step 1: Create the upgrade data file - Create file: app/code/Tutorial/SimpleNews/Setup/UpgradeData.php...

Read more

Magento 2.0 - List of all dispatched events

Magento 2.0 - List of all dispatched events

This ongoing updated post, lists all dispatched events in Magento 2.0. An event cheat sheet. Current version: 2.0.7 / May 19, 2016 For Magento 2.1 see here. This page lists three different groups of events occurring in: app and lib folders and global Varien JavaScript Events. Clicking on the file name brings you directly...

Read more

Install sample data in magento 2 by composer

Install sample data in magento 2 by composer

To install sample data using the command line, enter the following command as the Magento file system owner: 1) To install sample data using the command line   php <your Magento install dir>/bin/magento sampledata:deploy   Then enter username(Private Key) and password (Private key).   2) Complete...

Read more

Fixed: Invalid credentials for 'https://repo.magento.com/packages.json', aborting.

Fixed: Invalid credentials for 'https://repo.magento.com/packages.json', aborting.

You have to use a public / private keys pair, not email or screenname from your account in https://www.magentocommerce.com/products/downloads/token/ User name = Public Key Password = Private Key

Read more

How to reset admin password in Magento 2

How to reset admin password in Magento 2

You can create a new admin user able to change your forgotten password. Use the following command, to generate a new user:                 <path_to_magento>/bin/magento admin:user:create [--admin-user="..."] [--admin-password="..."] [--admin-email="..."]...

Read more

Error when upgrade to magento 2.1

Error when upgrade to magento 2.1

Problem 1     - magento/module-wishlist-sample-data 100.0.5 requires magento/module-wishlist 100.0.* -> satisfiable by magento/module-wishlist[100.0.5, 100.0.2, 100.0.3, 100.0.4].     - magento/module-wishlist-sample-data 100.0.2 requires magento/module-wishlist 100.0.* -> satisfiable by magento/module-wishlist[100.0.5,...

Read more

How to update magento with composer?

How to update magento with composer?

There are two way to upgrade magento2, choose one of them in following ways :   1) Only changes are inside composer.json file,   Replace "version": "2.0.2", to "version": "2.1.0", at line no.5 and Replace "magento/product-community-edition": "2.0.2",...

Read more

WorkFlow in Magento 2

WorkFlow in Magento 2

Initiation Phase in Magento 2 Index.php Bootstrap Bootstrap::run() App App:launch() Routing FrontController::dispatch() Router::match() Controller Processing Controller::execute() ...

Read more

How to use Model and Collection in Magento 2

How to use Model and Collection in Magento 2

You have to do follow lession first before continure Create a module with custom database table in Magento 2 In this post, we will go deeper into the usage of Module and Collection in Magento 2. After this post, you can insert some sample data on the custom database table and display them on frontend. Let’s start!   I...

Read more

MAGENTO 2 DATABASE STRUCTURE

MAGENTO 2 DATABASE STRUCTURE

    The difference of the database structure between Magento 2 and Magento 1.x.   Number of Table and Attribute     Module register table   In Magento 1.x, we all know that the module register table is core_resource. But this table can’t find in Magento 2, it was removed....

Read more

Create a module with custom database table in Magento 2

Create a module with custom database table in Magento 2

 Today, we will continue with our Magento 2 tutorial series. In this second blog post, I will introduce you how to create a module with custom database table in Magento 2. Let’s do it!   Hi guys, It is Nicolas Bui here and today, we will continue with our Magento 2 tutorial series. After the first...

Read more

HOW TO CREATE MENU IN MAGENTO 2 ADMIN

HOW TO CREATE MENU IN MAGENTO 2 ADMIN

magento-2-admin- menu My previous tutorial show you how to create a simple module in Magento 2, learn more here: http://www.venustheme.com/how-to-create-magento-2-module/. Today, we continue discuss about Magento 2 admin menu.   In Magento 1, menu configuration are located inside etc/adminhtml.xml but in Magento...

Read more

Magento plug-ins

Magento plug-ins

Magento2 gave very good concept called Plugin   we can do what ever after and before core function and also we have one more called around which will do both before and after below is code which will cover all info   Create a file di.xml in Mymodule/etc/di.xml   <?xml version="1.0"?> <!-- /**  *...

Read more

How to Override Core Block, Model and controller in Magento2

How to Override Core Block, Model and controller in Magento2

I follow below steps to override Block, Controller and Model I took Exmaple of Product Model and Product View Block and View Controller/Action   Create a file called di.xml in your /etc/di.xml   <?xml version="1.0"?> <!-- /**  * Copyright © 2015 Magento. All rights reserved.  *...

Read more

HOW TO CREATE A SIMPLE MODULE IN MAGENTO 2

HOW TO CREATE A SIMPLE MODULE IN MAGENTO 2

As you may know, we have just released Magento 2 Brand module a few days ago. This is our first module upgraded from Magento 1.9.x to Magento 2. You can find more detail, features of Brand Magento2: http://www.venustheme.com/theme/ves-brand-2-0/. Today, we will guide you how to create a simple magento 2 module step by step....

Read more

Hướng dẫn cài đặt extension cho Magento 2 bằng Composer

Hướng dẫn cài đặt extension cho Magento 2 bằng Composer

  Hiện giờ chỉ có 2 thư viện Composer giúp bạn cài đặt extension đó là: Magento 2 Composer Repository (Thư viện chính thức của Magento) Packagist  (Thư viện chính thức của Composer) Để thêm thư viện vào Composer, sử dụng câu...

Read more

Sử dụng Magento 2 CLI để quản trị trang web Magento

Sử dụng Magento 2 CLI để quản trị trang web Magento

Magento 2 vừa mới ra mắt mang theo một công cụ rất hay đó là Magento 2 CLI, ưu việt hơn Magento 1 CLI như dễ dùng hơn và nhiều chức năng hơn. Bạn nào chưa biết Magento CLI là gì thì đây là công cụ quản lý trang web chạy Magento của bạn thông qua dòng lệnh được...

Read more

Magento 2 installation: PHP Fatal error Allowed memory size exhausted

Magento 2 installation: PHP Fatal error Allowed memory size exhausted

A frequent problem during Magento 2 installation (using php bin/magento setup:install ) is a site running out of memory and generating an error like this – “PHP Fatal error: Allowed memory size of NNN bytes exhausted”. This fatal error means that your hosting or local machine is not able to provide enough...

Read more