Data Migration Tool : Migrating Magento 1 to Magento 2

Data Migration Tool : Migrating Magento 1 to Magento 2

To ease up migration process, Magento released official Data Migration Tool that will help developers migrate data from Magento 1 to Magento 2. The Data Migration Tool is a command-line interface (CLI) that provides verification, progress tracking, logging, and testing functions. It is intended to protect data integrity and reduce downtime during migration.

Let’s have a look at the migration process using Data Migration Tool.

Prerequisites

Before you start your migration, you must do all of the following steps:

  • Set up a Magento 2.0 system that at least matches your existing Magento 1 system.
  • Do not start Magento 2 cron jobs.
  • After installation back up or dump your Magento 2 database as soon as possible.
  • Check that the Data Migration tool has a network access to connect the Magento 1 and Magento 2 databases.
  • Replicate your Magento 1.x database and use this data for your migration.
  • Migrate Magento 1 extensions and custom code to Magento 2.
  • Make sure you are using the same released version of both Magento 2 and the Data Migration Tool. To find the version of either package, open composer.json and find the value of “version“.

Install & Upgrade the Data Migration Tool

You can install the Data Migration Tool from either repo.magento.com or from a GitHub repository. For the installation process, use the following steps:

  1. Log in to your Magento 2 server as a user with root privileges or switch to the web server user.
  2. Change to Magento 2 root directory.
  3. Use the following commands:
    Enter the commands in the order to Install the tool from repo.magento.com:

    composer config repositories.magento composer https://repo.magento.com
    composer require magento/data-migration-tool:<version>
    

    To install the migration tool from GitHub:

    composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
    composer require magento/data-migration-tool:<version>
    
  4. Wait while dependencies are updated/installed.

The versions of the Data Migration Tool and your Magento software must exactly match.

To find the version of the Magento software:

  • If you downloaded the Magento software using a Composer metapackage, use the following command to find the version of Magento:
    php <your Magento install dir>/bin/magento --version
    
  • If you cloned the Magento 2 GitHub repository, enter the commands:
    cd <your Magento 2 clone directory>
    git branch
    

To find the version of Data Migration Tool, open composer.json and find the value of “version“.

Before you upgrade the Data Migration Tool, you must upgrade your Magento software and back up the vendor/magento/data-migration-tool directory. The vendor/magento/data-migration-tool directory contains your custom code. It could be modified and can lose your code during the upgrade process.

Use the following steps to upgrade the Data Migration Tool:

  1. Log in to your Magento server as the Magento file system owner.
  2. Change to Magento 2 root directory.
  3. Enter the following command:
    composer require magento/data-migration-tool:<version>
    

    where <version> is the version of the Magento 2 codebase.

  4. Wait while the above command completes successfully.

We have successfully installed/upgraded the Data Migration Tool.

Configure migration

After you install the data migration tool, the <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/ directory contains mapping and configuration files. Before you migrate any data, you must create a config.xml configuration file from the provided sample.

To create a config.xml, use the following steps:

  • Change to <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/<migration edition>/<ce or version> directory.
  • Enter the command: cp config.xml.dist config.xml
  • Add the following details at minimum:
    <source>
     <database host="127.0.0.1" name="magento1" user="root"/>
    </source>
    <destination>
     <database host="127.0.0.1" name="magento2" user="root"/>
    </destination>
    <options>
     <map_file>map-file.xml</map_file>
     <crypt_key />
     .............
    </options>
    

    <source>  – configuration for data source (database).
    <destination> – configuration for data destination (database).
    <options> – list of parameters. Contains both mandatory (map_file, settings_map_file, bulk_size) and optional (custom_option, resource_adapter_class_name, prefix_source, prefix_dest, log_file) parameters.
    The <crypt_key> tag can be found in local.xml file which is located in the directory of Magento 1 instance at app/etc/local.xml in <key> tag.

  • When you’re finished, save your changes to config.xml.

The Data Migration Tool uses mapping files to enable you to perform custom database mapping between your Magento 1 and Magento 2 databases. In case Magento 1 contains tables or fields that belong to some extension that does not exist in Magento 2, then these entities can be placed in map.xml to ignore them by Map Step. Otherwise it will show an error message.

For more details on configuration and mapping please refer to Data Migration Tool Internal Specification.

Migrate using the data migration tool

The migration tool operates in three modes to transfer and adapt data from Magento 1 to Magento 2:

  • Settings mode: You should migrate settings first. This mode migrates stores; websites; and all possible configuration settings like shipping, payment, some tax settings etc.
  • Data mode: Migrates database assets in bulk from Magento 1 to Magento 2 database.
  • Delta mode: Incremental migration enables you to migrate only the changes made in Magento 1 since the last time you migrated data.

To run the migration tool to migrate settings, data, or incremental changes, use the following steps.

  1. Log in to your Magento server as the Magento file system owner. If you use the bash shell, you can also use the su <Magento file system owner> -s /bin/bash -c <command> syntax to switch to the Magento file system owner.
  2. Add <your Magento install dir>/bin to your system PATH, to run Magento commands from any directory.
  3. Enter the command:
    bin/magento migrate:<mode> [-r|--reset] {<path to config.xml>}
    

    where
    <mode> is settings, data, or delta.
    {<path to config.xml>} is the absolute file system path to config.xml; this argument is required.
    [-r|–reset] is an optional argument that starts migration from the beginning. You can use this argument for testing migration.

For example:
To migrate data, use the following command:
bin/magento migrate:data [-r|–reset] {<path to config.xml>}

Logs are written to the <your Magento install dir>/var/ directory. The Data Migration Tool has special handler \Migration\Handler\Timezone for transforming time to a different time zone. Using it you can change time for some fields of database that can be specified in your map.xml file with offset parameter. It also takes care of some behavioural and logical changes in magento 2 from magento 1.

See the official Documentation for more details on Data Migration Tool. Hope this will help you !! 🙂 🙂

 

Migrate from Magento 1.x to Magento 2.0

Migrate from Magento 1 to Magento 2

Magento 2 has definitely brought in some features which improves the interface and overall experience for Magento developers and users. Have you ever considered moving from Magento 1 to Magento 2 ? Here is an overview of this process, which is referred to as migration. Just like an upgrade between different versions of Magento 1.X , the level of effort to migrate from Magento 1 to Magento 2 depends upon how you have built your site and its level of customization.

Migration from Magento 1.x to Magento 2 involves four components: data, extensions, themes, and customizations.

  • Data: There are many differences in the structure and format of data that is stored in database between Magento 1 and Magento 2. Each version of Magento has its own unique changes in data structure. To ease up the  Migration process, Magento released an official Data Migration Tool that will help developers to transfer store data from older versions of Magento to the latest Magento 2. The Data Migration Tool transfers all of your key product, customer, and order data, store configurations, promotions and more to Magento 2.
  • Extensions and custom code: If you want to migrate some of your extensions , you might need to install these extensions adapted for Magento 2. Reach out to your extension providers to see if they have been ported yet. Custom code is not ported because it cannot be automated.
  • Themes and Customizations: Themes and customizations of your magento 1 store cannot be automatically migrated to Magento 2. Developers will need to make changes to their themes and customizations for Magento 2.

Data Migration Tool

The Data Migration Tool is a command-line interface (CLI) that provides verification, progress tracking, logging, and testing functions. Data Migration Tool transfers data from Magento 1 to Magento 2 database and it is intended to protect data integrity and reduce downtime during migration. You can install it from either repo.magento.com or from a GitHub repository.
The migration tool operates in three modes to transfer and adapt data from Magento 1 to Magento 2:

  1. Settings mode: You should migrate settings first. This mode migrates stores; websites; and all possible configuration settings like shipping, payment, some tax settings etc.
  2. Data mode: Migrates database assets in bulk from Magento 1 to Magento 2 database.
  3. Delta mode: Incremental migration enables you to migrate only the changes made in Magento 1 since the last time you migrated data.

Each mode consists of several steps that perform tasks specific to the mode. Each step initially checks data integrity in the Magento 1 and Magento 2 databases and, after verification succeeds, it performs the transfer of data.

There are some types of data like media, storefront design, admin users and ACLs (Access Control Lists) that need to be manually migrated. Media files can simply be copy/pasted to appropriate locations in Magento 2. You must manually re-create all credentials for web services APIs , all administrative users and associate them with access privileges.

The Migration Process

To have a successful migration from Magento 1 to Magento 2 , refer to the following steps:

  • Set up a Magento 2.0 system using a topology and design that at least matches your existing Magento 1 system.
  • Replicate your Magento 1.x database and use this data for your migration.
  • Install Magento 2.
  • Check that the Data Migration tool has a network access to connect the Magento 1 and Magento 2 databases. Open ports in your firewall so the migration tool can communicate with the databases.
  • Stop all activity in the Magento 1.x Admin Panel. Activity cannot resume until your Magento 2 store goes live.
  • Stop all Magento 1.x cron jobs.
  • Use the migration tool to migrate settings and websites.
  • Copy your Magento 1.x media files to Magento 2.0.
  • Use Data Migration Tool to migrate your data from Magento 1 database to Magento 2 database.
  • Use the magento indexer:reindex command to reindex all indexers.
  • Thoroughly test your Magento 2.0 site.
  • Start the incremental migration. Incremental migration enables you to migrate only the changes made in Magento 1 since the last time you migrated data. Test your Magento 2 site during this time so you can catch any issues as soon as possible.

Now your Magento 2 site is up-to-date with Magento 1.

  • Put Magento 1 in maintenance mode and permanently stop all Admin activities.
  • Start Magento 2 cron jobs.
  • Flush all Magento 2 cache types and reindex all Magento 2 indexers.
  • Perform any final verification of your Magento 2 site.
  • Change DNS, load balancers, and so on to point to new production hardware.

And that’s it !!! Your Magento 2 store is ready to use. You and can resume all activities.

For full information please see the official Migration Guide. Share your experience in comments, and we’ll be happy to help you. 🙂 😀

 

Bundle Products in Magento 2.0

Bundle Products in Magento 2.0

A bundle product in magento allows customers to build their own customized version of a product from a miscellaneous collection of options. You can sell simple ,configurable and virtual products as parts of a bundle product.For example , if someone is buying a Customizable Computer System then user must have some options to select RAM and Hard Disc size,cabinet,CPU etc. Once the product is configured, user will place an order for a fully build Computer System. The final price of the product will depend on what the customer selects as options.

How do you proceed if you need to add a new bundle product in Magento 2.0?  This tutorial will show you how to create a bundle product in your Magento store.

Bundle Product

Let’s take the above example of selling desktop PCs. We can see that this product has options. Each custom option’s value corresponds to one simple product. So before creating a bundle product you need to create several simple products that are associated with the bundle product. Click here  to know how to add a simple product in Magento 2.0

  • Step 1 :

To add a new bundle product, Navigate to the Products>Catalog section from the Magento admin panel. Click the “Add Product” button to start configuring a new Product. You can choose the “Bundle Product” option from the drop-down box available here.

Add Bundle Product

  • Step 2 :

Fill up the product details of the main product. Here you can choose SKU, Weight and price either to be dynamic or fixed. Dynamic value option means that your bundle product value will depend on the value of each product in the Bundle. The fixed values will not change on customer’s choice. You can also select the shipment mode (together or separately) for the product items. Now click on “Create New Option” button at the bottom of the page.

Bundle product details

  • Step 3 :

Now we need to add customizable options for our bundle product. I have added CPU in the first option and set it as a default choice.

Bundle product options

To add products to the option, press “Add Products to Option” button. Choose products you want to add to the option. Press “Add selected Products” button to add the products to option.

Bundle option products

  • Step 4 :

Create as many option as you want to include in your bundle product. I have added options CPU , cabinet , RAM , Hard Disk Drive and monitor for my product “Desktop PC”.

Bundle product save

When this is done , click on “save” button to save all product information you have created. Now you can configure your product settings for Images and Videos, SEO description, websites etc. 🙂

 

Creating a Simple Module in Magento 2.0

Magento 2.0 – Create A Simple Module

Modules are an integral part of Magento. The purpose of each module is to provide specific product features by implementing new functionality or extending the functionality of other modules. Developing a custom module gives us the freedom to implement customized solutions for a particular business need. Let’s have a look at creating a simple module in Magento 2.0.

Creation of a module in Magento 2.0 is quite different from Magento 1.X. In magento 2.0, all the modules are grouped by vendor. Hence, We can create modules right inside the app/code directory.

Every module in Magento 2.0 has unique name that’s made up of two parts. For example, we’re going to create a module named Zgento_LightBox. The first part (Zgento) is called the VendorName describes the company or individual that built the extension. The second part, LightBox, describes what the extension does(Lightbox gallery with next and previous buttons to easily navigate through product images).

  • Step 1: Create the Directories.

To start with our module we’ll create the directory: app/code/Zgento/LightBox. The code pools(local, community, and core) are eliminated in Magento 2.0. We can now directly create the modules inside the app/code directory.

We’ll also create the following sub-directories:

  • app/code/Zgento/LightBox/
  • app/code/Zgento/LightBox/Block/
  • app/code/Zgento/LightBox/Controller/Index/
  • app/code/Zgento/LightBox/etc/
  • app/code/Zgento/LightBox/view/frontend/layout
  • app/code/Zgento/LightBox/view/frontend/templates

The “view” folder is entirely new. Layout and template files are saved in the folder “View” in the module.

  • Step 2: Declare the Module.

We’ll start with our configuration files. Write the file module.xml in app/code/Zgento/LightBox/etc/module.xml to declare the module. This module.xml file is the main module configuration file. The module.xml file is for registering the module.

<!-- File: app/code/Zgento/LightBox/etc/module.xml -->
<?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="Zgento_LightBox" schema_version="1.0.0" setup_version="1.0.0" />
</config>

The <module/> node tells Magento we want to add a module to the system. The name attribute indicate the name of the module, and the setup_version attribute tells the version of our module.

  • Step 3: Adding a Controller Action.

Now we can create our Controller action. Create the file Index.php in app/code/Zgento/LightBox/Controller/Index/Index.php
Here the folder Index is name of the controller and index.php is an action file.

# File: app/code/Zgento/LightBox/Controller/Index/Index.php
<?php namespace Zgento\LightBox\Controller\Index; class Index extends \Magento\Framework\App\Action\Action { public function execute() { $this->_view->loadLayout();
$this->_view->getLayout()->initMessages();
$this->_view->renderLayout();
}
}

The base class Magento\Framework\App\Action\Action is the standard base class for frontend controllers. The method excute() will be involked when the action is called.

  • Step 4: Creating a Block Class.

Let’s create a block for our module. Create block file app/code/Zgento/LightBox/Block/LightBox.php

<?php
namespace Zgento\LightBox\Block;
class LightBox extends \Magento\Framework\View\Element\Template
{

}

In the above example we have not implemented any methods,but if we were to implement some methods, in our template we would have access to them via the $block variable. Magento\Framework\View\Element\Template is Magento’s base template class.

  • Step 5: Layout files & Templates.

Now we need to create our layout configuration file and the template.

Let’s create a layout with the following name:
/Zgento/LightBox/view/frontend/layout/catalog_product_view.xml

<?xml version="1.0"?>

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

<update handle="Zgento_lightbox"/>
<head>
<css src="Zgento_LightBox::css/lightbox.css"/>
<script src="Zgento_LightBox::js/lightbox.js"/>
</head>

<body>
<referenceBlock name="product.info.media.image" >
<action method="setTemplate" ifconfig="zgento_lightbox/general/enable">
<argument name="template" xsi:type="string">Zgento_LightBox::product/view/gallery.phtml</argument>
</action>
</referenceBlock>

</body>
</page>

In <head> tag, we can add files to the page such as adding CSS, js etc. In above example, we added the styles & js files to use when showing on frontend.

Now we need to create our template file gallery.phtml in the following directory.
app/code/Zgento/LightBox/view/frontend/templates/product/view/gallery.phtml

Once we have completed all the above steps, we need to activate our extension manually.

  • Step 6: Activate our Extension.

Let’s create registration.php file in the root folder of the module and put the following code inside:

# File: app/code/Zgento/LightBox/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Zgento_LightBox',
__DIR__
);

This is done to tell Magento 2 that it should run the extension from the current directory.

We have two ways to activate Zgento_LightBox extension.

  • Run the following console command:

php bin/magento setup:upgrade

Activate_module in Magento 2.0

OR

  • Add our module to the global module list at app/etc/config.php.

You’ll see a PHP include file with a long list of modules. Let’s add our module(add the element: ‘Zgento_LightBox’ => 1,) to the end of the array.

#File: app/etc/config.php
<?php return array ( 'modules' => 
 array (
 'Magento_Store' => 1,
 'Magento_AdvancedPricingImportExport' => 1,
 'Magento_Directory' => 1,
 'Magento_Theme' => 1,
 'Magento_Backend' => 1,
 'Magento_Backup' => 1,
 //............
 'Zgento_LightBox' => 1,
 ),
);

And that’s it! We have successfully created a very simple Magento 2.0 extension. Now go and clear Magento cache, and you’ll see that our extension is working now.

Enable_module_Magento

Thank you so much for following this tutorial. You can also download Zgento_LightBox extension for free by clicking here . 🙂 🙂

 

 

 

How to add a new theme in Magento 2

How to add a new theme in Magento 2

A theme is a component of Magento application which provides a consistent look for your Magento store using a combination of custom templates, layouts, styles or images.In Magento 2,You can build unlimited themes for your Magento store.

Creation of theme in Magento 2 is quite different from Magento 1.X. Here we will see how to add a new theme in Magento 2.

The high-level steps used to add a new theme in Magento 2 are the following:

  • Create a theme directory.
  • Add a declaration file.
  • Add a composer.json file.
  • Add registration.php.
  • Create directories for CSS, JavaScript, images, and fonts.
  • Configure your theme in the Admin panel.

Let’s look at each of these in more detail.

  • Create a theme directory.

To create the directory for your theme:

Go to <your Magento install dir>/app/design/frontend.

Create a new directory with your vendor name: /app/design/frontend/<Vendor>.

Under the vendor directory, create a directory with your theme name.

For example,

theme1

MyStore –is the folder with the vendor name.
MyTheme – is the main theme.

  • Add a declaration file.

After you create a directory for your theme, you must create theme.xml in your theme directory app/design/frontend/<Vendor>/<theme> containing at least the theme name and the parent theme name (if the theme inherits from one).
Configure your theme.xml using the following example:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
 <title>New theme</title> <!-- your theme's name -->
 <parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
 <media>
 <preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
 </media>
 </theme>

Optionally you can specify the path to your theme’s preview image.

  • Add a composer.json file. (optional)

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. Magento 2 uses Composer to package components and product editions.Magento default themes are distributed as Composer packages.
To distribute your theme as a package, add a composer.json file(which provides theme dependency information) to the theme directory and register the package on a packaging server.

Example of a theme composer.json:

{
 "name": "magento/theme-frontend-luma",
 "description": "N/A",
 "require": {
 "php": "~5.5.0|~5.6.0|~7.0.0",
 "magento/theme-frontend-blank": "100.0.*",
 "magento/framework": "100.0.*"
 },
 "type": "magento2-theme",
 "version": "100.0.1",
 "license": [
 "OSL-3.0",
 "AFL-3.0"
 ],
 "autoload": {
 "files": [
 "registration.php"
 ]
 }
}
  • Add registration.php.

To register your theme in the system, you must add a registration.php file in your theme directory app/design/frontend/<Vendor>/<theme> where <Vendor> is your vendor name, <theme> is the theme name.

Configure your registration.php using the following example:

<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/<Vendor>/<theme>',
__DIR__
);

  • Create directories for CSS, JavaScript, images, and fonts.

The static files like styles, fonts, JavaScript and images should be stored in a separate sub-directory of “web” in your theme directory app/design/frontend/<Vendor>/<theme>.

Product image sizes and other properties used on the storefront are configured in a view.xml configuration file. view.xml file is required for a theme, but is optional if exists in the parent theme.Create the etc directory in your theme folder to add the view.xml configuration file.

At this point your theme file structure looks as follows:

theme2

  • Configure your theme in the Admin panel.

After you add your theme to the file system, you can apply it to your store.
To apply a theme to your store:

Navigate to CONTENT > Design > Themes section from the Magento admin panel.

theme3
Make sure your theme appears in the theme list.
Go to Stores > Configuration > Design.

theme in magento
In the Scope drop-down field, select the store view where you want to apply the theme. On the Design Theme tab, select your theme in the Design Theme drop-down.
Click Save Config to apply your theme.If caching is enabled, clear the cache and reload the store front pages to see your changes applied.

 

Now, I hope you can easily add your first theme in Magento 2. 🙂 🙂 !!!!!

 

How to create a new configurable product in Magento 2

How to create a new configurable product in Magento 2

Configurable products are products that have multiple options.For example, a ball comes in three colors. Here we will have a single Configurable product with an option:color; that ties three simple products.Stock, price and other product attributes are managed on the simple product’s level.

How do you proceed if you need to create a new configurable product in Magento 2? The following instructions take you through the process of creating a New Configurable Product in Magento 2.

  • Step 1

To add a new configurable product in Magento 2, Navigate to the Products>Catalog section from the Magento admin panel.Click the Add Product button to start configuring a new Product.You can choose the “Configurable product” from the drop-down options available with the Add Product button.

Catalog_product1

  • Step 2

Fill up the product information of the main configurable product. And then click on ” Create Configurations” button at the bottom of the page.

Catalog_product2

  • Step 3

Select the attribute which you need to use in the product details page.You can add new attributes by clicking at “Create new attribute” button.After selecting the attribute , press “Next” button.

Catalog_product3

ou need to add/choose value for each attribute. Each value will create a unique product SKU.After selecting the attribute values , press “Next” button.
For example,Color is an attribute. Blue is an attribute value.

Catalog_product4

Here it will show options for adding image, price and quantity for your new simple products.You can upload the images for each set of attributes or a single set of images to all SKUs.Add the price and quantity details in the same way.Then you scroll up and press “Next”.

Catalog_product5

Let’s take a look at the result. Yes, we have the products summary and then click on “generate product” button.

Catalog_product6

  • Step 4

Magento 2 will automatically generate the simple products. Click on ” save” button to save all product information you have created.

Catalog_product7

Now configurable product is created and displayed.You can manage the product and all of its configurations in the Products>Catalog section from the Magento admin panel.

configurable product

 

Hope this helped you a lot 🙂 🙂 !!!!!!!!

How to Add a New Simple Product in Magento 2

How to Add a New Simple Product in Magento 2

Creating new products is a major step to building your Magento store.The following instructions take you through the process of creating a New Product in Magento 2.

Video tutorial:

Steps explained with screen shots:

  • Step 1

To add a new product in Magento 2, Navigate to the Products>Catalog section from the Magento admin panel.

Catalog_product

 

  • Step 2

Press the Add Product button to start configuring a new Product.You can select the type of product you need to add from the drop-down options available with the Add Product button.Choose the type you need from the list (Simple Product, Configurable Product, Grouped Product, Virtual Product, Bundle Product, Downloadable Product).

Catalog_product1

  • Step 3

Now you will be able to configure:

  • Name: The name of the product.
  • SKU:  The unique Stock keeping Unit of the product.
  • Price: The price value of the product.
  • Tax Class:  To identify the appropriate tax classification for the product.
  • Images and Videos: Upload an Image/Video for your product.
  • Quantity:  The Quantity of products you have in stock.
  • Weight: The weight of the product (Used for shipping calculations).
  • Categories:  Choose the Category of a product or create a new category.
  • Description: A short description regarding the features of the product.This will appear on the Product View page.

Catalog_product2

  • Step 4

Now fill the Fields on the Image Management tab,Search Engine Optimization tab, and the Websites tab.

Catalog_product3

Here you can upload more images in order to show your product.

Catalog_product4

  • URL Key: URL Key will be the last part of the URL when your product is being accessed (http://example.com/magento/URLkey).
  • Meta Title:Meta Title specifies the title of the web page appearing on the browser.
  • Meta Keywords: Help the search engines with indexing your product page.
  • Meta Description:Describes the content of the product page to the search engines.

Catalog_product5

If you’re managing multiple Websites,Select the Websites you want the product to be available at.

  • Step 5

Please check the Product Online button in the upper-right corner to be ON.

Catalog_product6

When you are done, click on the Save button to add the new product to your Magento 2 based Store.

Zgento Light Box for Magento 2.0

Magento2 Zgento Light Box

zgento-lightboxThis package allows to change the default product image gallery with jquery Light Box plugin. Normal gallery of magento2 images will be replaced with cool lightbox gallery with next and previous buttons to easily navigate through product images. A must have feature for your Magento2.0 store, if you have multiple images on the product page then certainly use this extension to make it a lightbox gallery, and all this can be done for free.

 

download_now

 Screenshots:

 

 Zgento LightBox extension:

  1. Tested with all major browsers
  2. A must-have extension for every ecommerce website.
  3. Easy 1 minute installation. Installation is very easy, no coding experience is required to have module up-and-running.
  4. Don’t affect Magento2 core files.
  5. You can enable or disable it in a click.

All our extensions and templates:

  •  100% Open source.
  • Easy to install and use.
  • Created according to Magento2 programming guidelines.
  • Our fanatic support will do everything you need to solve your problems.
  • Still have doubts, want answers then please feel free to explore our QA section. Don’t hesitate to contact our awesome support team.

 

How to include the module name in magento2

How to include the module name in magento2

public function __construct(
..
\Magento\Framework\ObjectManagerInterface $objectManager,
..
) {
$this->_objectManager = $objectManager;
}

and then

$this->_objectManager->create('Magento\Sales\Model\Resource\Order\Invoice\Collection')
->addAttributeToFilter('order_id', array('eq'=>$order->getId()))