Manage products in a catalog grid

Managing products on a daily basis may not be one of the most entertaining tasks. The product grid in Magento 1 is, out of the box, not the best tool. Lots of merchants install a third-party extension for better use and configuration. Depending on the extension, it is possible to tune the grid accordingly.

Now the new Magento 2 catalog grid is better than ever. Every backend user can create their own view and select the appropriate attributes for the best view ever.

Besides all the fancy features, the product grid loads asynchronously, which means that the page refreshes its data in the background. This is great for performance and user experience.

Getting ready

To step through this recipe, you will use a Droplet created in Chapter 2, Magento 2 System Tools, at DigitalOcean (https://www.digitalocean.com/). We will be using an NGINX, PHP-FPM, Composer-based setup including a single Magento 2 website, Root Catalog, store view, categories, and attributes and four configurable products preinstalled. No other prerequisites are required.

How to do it...

For the purpose of this recipe, let's assume that we need to a create a custom product grid in Magento 2. The following steps will guide you through this:

  1. First, log in to the backend of Magento 2 and go to Products | Catalog. Depending on the previous recipe, you will have a list which looks as follows:
    How to do it...
  2. Click in the top-right corner on the arrow to the right of Columns. By default, Magento lists 12 options. Now select URL key, and deselect the SKU, Visibility, and Websites checkboxes. Then point your mouse at the grid again. Be aware there is no Save button. The grid should look as follows:
    How to do it...
  3. Now click on the Default View button, and click Save View As…. Pick a name and click the right arrow to save your work. The grid view should now look like this:
    How to do it...
  4. You can create as many views as necessary. Keep in mind that all created views only apply to the user who has created them. Currently, there is no shareable grid view option.
  5. If you ever need to update the status of Enabled or Disabled, go to the left drop-down Actions menu and choose Change status.
  6. Use the Update attributes option in the drop-down Actions menu to update one of the attributes. First select the products which you need to update. Then click on Update attributes, as shown in the following screenshot:
    How to do it...
  7. Next go to shoe_type, mark checkbox and select the appropriate option, and click Save.
  8. Congratulations, you just finished managing the product grid catalog in Magento 2.

How it works…

Let's recap and find out what we did throughout this recipe. In steps 1 through 8, we created a custom grid for the catalog view. You can create as many grids as you like and select your preferred attributes in it. Saving the new grid views is straightforward.

There's more…

If you like managing attributes in your grid or columns, go to Stores | Product and select one of the attributes. In the Properties tab, look for Advanced Attribute Properties. At the bottom, change Add to Column Options and Use in Filter Options appropriately, as shown in the following screenshot:

There's more…
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.19.185