Category Import in Magento without products

Category Import in Magento without products

October 14, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Category Import in Magento without products

Solving Category Import Issues in Magento

Are you facing challenges when trying to import categories into your Magento store? You’re not alone. Many users struggle with the “sku not found” error or encounter difficulties when merging category and product CSV files.

Let’s dive into these common issues and provide step-by-step solutions from a developer’s perspective.

Understanding the Sku Not Found Error

The “sku not found” error typically occurs because Magento expects a SKU for every record during import, even if you’re only importing categories. This is due to how Magento’s import system works by default.

To resolve this issue, you have two primary options:

Option 1: Adding Placeholder Skus

You can add placeholder SKUs to your category CSV file before the import. These could be generic values like “cat1”, “cat2”, etc., or a sequence of numbers like “001001”, “001002”.

Your category CSV might look something like this:

category_id,parent_id,created_at,updated_at,name,sku
9,0,2021-03-04 07:56:01,Fashion
10,9,2021-03-04 08:00:00,Men

Option 2: Editing the Import Configuration

Alternatively, you can edit Magento’s import settings to accommodate category-only imports. This requires modifying the app/code/core/Mage/ImportExport/Model/Import.php file.

Look for this line:

if (!$sku) {
    Mage::throwException(Mage::helper('core')->__('Invalid SKU value'));
}

Comment out or delete this entire condition to disable the SKU check. This approach is more invasive but may be necessary if you prefer not to modify your CSV files.

Merging Category and Product CSVs

If you’re trying to import both categories and products using a single file, you likely encounter the “0 record found” message for categories. This happens because Magento’s import system expects a specific column order and format.

Here are some best practices for merging category and product CSV files:

  1. Ensure Category and Product Columns Are Separated: Keep your category-specific columns (like category_id, name) together at the beginning of the file, followed by the product columns (sku, name, price).

  2. Use a Delimiter That Matches Your System Setting: Magento’s import system uses comma as the default delimiter. Ensure your CSV file matches this setting or adjust it accordingly in your store configuration.

  3. Avoid Special Characters and Spaces: Magento is quite sensitive to special characters. Avoid using them in your column headers or data values, if possible.

  4. Test with a Small Dataset First: Before importing your entire merged file, test the process with a small subset of data (e.g., 10-20 records). This helps identify any formatting issues before they affect your whole dataset.

An Example Import Scenario

Let’s say you have a simplified CSV file that looks like this:

category_id,name,parent_id,product_sku,product_name,price
9,Fashion,,,,
10,Men,9,,,
11,Shirts,10,20073,Short Sleeve Shirt,15.99

To import this file successfully:

  1. Ensure your Magento settings allow for category imports.
  2. Upload the CSV using the Import/Export tool in your Magento admin panel.
  3. Choose “Category Attribute” as the behavior and select “All Stores” for visibility.
  4. Click on “Check Data” to validate the file.
  5. If no errors are found, proceed with the import.

Conclusion: Persistent Category Import Challenges

While Magento provides powerful import functionality, it also presents some challenges when dealing with category-specific imports. The key lies in understanding how the system works and adapting your CSV files or configuration accordingly.

Remember these best practices:

  • Use placeholder SKUs for category-only imports.
  • Keep category and product columns separate in merged CSVs.
  • Avoid special characters and spaces in your data.
  • Test small datasets before full imports.

If you’re still facing issues, consider exploring advanced import extensions available from reputable vendors like Laravel Company. They often provide more robust tools and better support for complex Magento import scenarios.

Happy importing!

Catalog Configuration Import/Export Errors

Our network