How to import and export position of the product in the category. Magento 2 visual merchandise

When you use native Magento 2 import and export tools to transfer products to your e-commerce website, it is impossible to manage product positions inside categories, meaning you have to assign them manually, which proves to be a tedious task. However, there is a solution that addresses the existing issue. Meet the Improved Import and Export extension for Magento 2. It lets you import and export product positions using CSV, XML, XLSX, ODS, and JSON files. In this article, you will learn how to import product category positions in Magento 2. Next, we discuss how the categories_position attribute works and what its peculiarities are. And of course, we unveil several interesting facts about the Improved Import & Export extension. But before going any further, let’s define what product category positions are and how to leverage them in Magento 2.

This article is a part of Firebear Magento 2 import and export Guide List, which covers ALL entities, and all import and export procedures and peculiarities that you need to know. Visit Magento 2 import and export Guide List reference page to find how to import a particular entity to Magento 2.

Read Magento 2 import and export Guide List

Table of contents

Magento 2 Product Category Positions Defined

Every product in a category in Magento 2 store has a certain position. The position of the products defines the order in which the products are displayed on the storefront. The position of the products can be used for advertising or marketing purposes, that’s why having the ability to quickly set the position for products, especially in the stores with thousands of products, may save lots of management time.

Product positions in the Magento 2 administrator panel can be found under Catalog > Categories. Here you need to choose the category you want to adjust the product positions for, and proceed to the Products in Category settings section.

Here, in the product grid, in the Position column, you can see the positions automatically assigned to products by Magento 2. If you want, you can adjust these positions manually for every category. This however will take much time.

With Improved Import and Export extension for Magento 2, you can export existing product positions, adjust the positions according to your needs, and import products with the new positions back to your Magento 2 store.

How to import product category positions in Magento 2

As it has been mentioned above, you will first need to install Improved Import & Export extension for Magento 2. The extension introduces new product attribute categories_position. The attribute is added to the general product attributes in the tables you import and export. Basically you can get your old CSV tables with products saved. Add new column and name it categories_position. Then you will only need to type in proper values and you are good to go.

Below you will find the information on how to edit the product tables and where to put the product category position value. If you want to get instructions on how to work with Improved Import & Export extension and see the full process – read the extension manual.

How categories_position attribute works

The attribute has almost the same value type as categories attribute. First you specify full category path, then you type ‘=’ and a numeric value which represents the product position inside the category.

At the screenshot above you can see that categories_position attribute has the same value as categories attribute, with the exception to ‘=4’ which is the product position that we have set up. So the value of the categories_position attribute looks like this:

Root Category/Parent category/Child category=1

Where =1 is the position of the product.

You can also specify the category path in the categories_position attribute via category IDs, for example:

1/2/3=1

In this case, Improved Import & Export extension will trigger a check: if category path is specified in numerals – then the extension will consider that you are using category IDs. Please note that if you are using categories which only consist of numerals – the extension will interpret such categories – as category IDs.

Categories_position attribute peculiarities

The custom attribute introduced with Improved Import & Export extension 3.1.8 release is a part of custom logic, that is why it is important to understand what’s behind this logic, and how exactly categories_position attribute behaves.

  1. Categories_position attribute should be added to the ‘Products’ table. It is a part of product entity and you can only import product positions as a product update: using only sku and categories_position attributes for existing products. Or full set of product attributes if you are importing new products.
  2. If you have never set product positions manually in the Magento 2 administrator panel. Magento 2 will automatically set product positions to ‘0’. That’s why, if the position has never been set manually, when first exporting products, you will get ‘0’ values for product position.
  3. With categories_position attribute, when specifying category paths, you can use both category names or category IDs. With every import execution, Improved Import & Export extension will run a check for categories_position attribute value. If the value consists of numerals, the extension will treat such values as category IDs, and will consider proper categories. If the value consists of numerals and letters, the extension will treat such values as category names, and will consider proper categories.

That’s pretty much everything you need to know about categories_position custom product attribute and how it works.

About Improved Import & Export extension

Improved Import & Export extension is a complete import-export and integration solution for your Magento 2 store. It can import and export ALL Magento 2 entities, can help you connect to your ERP and CRM software, POS systems, and dropshipping services.

Firebear team is constantly updating the extension with updates appearing almost every month. Each update brings new functionality and further enhances the extension’s functionality. 

Often, the add-ons for the extension are released. Each add-on covers connection with a third-party system or aimed at helping you with the store management.

Improved Import & Export extension features:

  • All product type support.
  • Import and export of the most common B2C and B2B entities: products and MSI, customers, cart price rules, companies, requisition, etc.
  • Bilateral synchronization via Rest and SOAP API.
  • Import and export available for CSV, XML, Excel XLSX, ODS and Json files.
  • Attribute and attribute value mappings.
  • Intuitive interface suitable for users of all level proficiency.

A full list of available features you can find at the extension’s product page.

Magento 2 Product Category Position Import FAQ

Below, you can see other tips on how to manage Magento 2 product category positions in your admin.

How to import product category positions to Magento 2 automatically?

If your business case requires transferring product category positions or other entities to Magento 2 regularly, use the Improved Import & Export extension. The module provides the ability to leverage the cron scheduler to plan future product updates.

How to import product category positions to Magento 2 from external systems?

With the Improved Import & Export Magento 2 extension, you can effortlessly transfer products along with their category positions between two Magento 2 websites or from external systems. Unlike the default Magento 2 import solution that doesn’t let you transfer third-party data, our module provides the ability to teach your e-commerce store how to react to unknown data. You create a mapping scheme and match any external attributes to the default ones used in Magento 2. It is possible to match attribute values including product category positions.

How to import product category positions to Magento 2 via API?

By default, Magento 2 doesn’t let you move any data via API. However, you can use the Improved Import & Export extension to transfer all the desired entities along with products and their category positions to Magento 2 via API.

How to import product category positions to Magento 2 via ODS files?

If you use ODS files to store product category positions, the Improved Import & Export Magento 2 extension will help you move them to your e-commerce website. While Magento 2 works with CSV files only, our module exceeds the existing limitations by adding support for other file formats.

How to import product category positions to Magento 2 via XLSX files?

If you use XLSX files to store product category positions, the Improved Import & Export Magento 2 extension will help you move them to your e-commerce website. While Magento 2 works with CSV files only, our module exceeds the existing limitations by adding support for other file formats.

How to import product category positions to Magento 2 via JSON files?

If you use JSON files to store product category positions, the Improved Import & Export Magento 2 extension will help you transfer them to your e-commerce website. While Magento 2 works with CSV files only, our module exceeds the existing limitations by adding support for other file formats.

How to import product category positions to Magento 2 via compressed files?

If product category positions are compressed, you can also use Improved Import & Export to transfer them to Magento 2. Note that the extension supports ZIP or TAR archives that contain a CSV, XML, ODS, XLSX, or JSON file.

How to import product category positions to Magento 2 from Google Sheets?

If your product data along with product category positions is stored in Google Sheets, it is no longer an unsolvable problem. You can use the Improved Import & Export extension to transfer this information to Magento 2. It is only necessary to specify the corresponding table as your import source, providing its URL.

How to import product category positions to Magento 2 from Dropbox?

The Improved Import & Export extension lets you transfer product category positions to Magento 2 from Dropbox along with Google Sheets and other file sources. The data should be stored as CSV, XML, ODS, XLSX, or JSON files. Also, note that it should be a ZIP or TAR format when it comes to compressed files.

How to import product category positions to Magento 2 from Google Drive?

The module also lets you transfer product category positions to Magento 2 from Dropbox. The requirements are simple: save your product data as CSV, XML, ODS, XLSX, or JSON files. If you need to compress them, use ZIP or TAR formats.

How to use product import to mass update attributes in Magento 2?

Community forums describe various techniques that let you mass update attributes in Magento 2 by transferring products. However, the Improved Import & Export extension lets you do that in a more user-friendly manner. You can import product attributes straight to your website, updating multiple records in your database in bulk. The update also covers product category positions. Our module lets you specify product attributes as your import entity and choose the add/update import job behavior.

How to import csv with several attributes to Magento?

With the Improved Import & Export module, you get the ability to transfer a CSV file with any number of attributes to Magento 2. You can move XML, XLSX, ODS, and JSON files to your website. Also, you can import product category positions from Google Sheets or via API.

How to remove attribute values on catalog import to Magento 2?

Our extension lets you delete attribute values during the Magento 2 import by adding option:delete_values to your import table. Use this column to specify the attribute values you want to remove. The attribute itself stays untouched. For instance, the column lets you remove green, red, yellow, or other similar values for the attribute ‘color’.

How to export product attributes and attribute values in Magento 2?

You can also use the Improved Import & Export extension to export attributes along with product category positions from Magento 2. You only need to create a new export job. Choose the corresponding export entity and configure other transfer parameters.

How to match external categories to the categories used in Magento 2 while importing products?

The Improved Import & Export Magento 2 module provides the ability to match any external categories to the ones used in your catalog. Thus, the extension provides the ability to both transfer product category positions and replace external categories with the ones you already use on your website. You only need to choose an external category and specify the replacement. Furthermore, the module enables you to create the missing categories on the fly and direct the external ones to the newly generated records.

Related posts

Discover more from WHO WILL CARE eCommerce

Subscribe now to keep reading and get access to the full archive.

Continue reading