Import upsell products for another product in magento from CSV

Import upsell products for another product in magento from CSV

August 16, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Import upsell products for another product in magento from CSV

Importing Upsell Products from CSV in Magento

Magento is a powerful e-commerce platform that provides extensive options for product management, including the ability to upsell related products to customers. However, the default Magento interface may not offer the most efficient way to manage upsells for many products simultaneously. This is where import functionality comes into play.

Understanding Upsell Products in Magento

Upsell products are typically displayed on a product page along with the main product being viewed. They represent accessories or complementary items that customers might want to add to their purchase. For example, if you’re selling a laptop, upsells could include a mouse pad, laptop case, or extended warranty.

Importing Upsell Products via CSV

While Magento does not have a built-in feature for directly importing upsell products from a CSV file, there are two common workarounds:

Method 1: Using Third-Party Extensions

There are numerous third-party extensions available in the Magento Marketplace that provide this functionality. Some popular options include:

To use an extension, follow these steps:

  1. Purchase and install the extension in your Magento store.
  2. Prepare your CSV file with columns for the main product SKU and the upsell product IDs or SKUs.
  3. Upload the CSV file using the provided import tool within the extension’s configuration panel.
  4. Map the CSV columns to the appropriate Magento fields during the import process.

Method 2: Custom Script Development

If you prefer a more hands-on approach, you can develop a custom script to read your CSV and update the upsell relationships in your database directly. This method requires knowledge of Magento’s database schema and its API for product relations.

Here is a simplified example using MySQL:

-- Assume your CSV has columns: main_product_sku, upsell_product_id

LOAD DATA INFILE 'path/to/import.csv'
INTO TABLE `catalog_product_relation`
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 LINES
(main_product_sku, upsell_product_id);

This script assumes you have a CSV file with two columns: the main product’s SKU and the upsell product’s ID. It loads this data into Magento’s catalog_product_relation table, which stores all related products (including upsells).

Remember to replace 'path/to/import.csv' with the actual path to your import file.

Best Practices for Upsell Import

  1. Always validate your CSV data before importing to ensure it matches Magento’s expected format.
  2. Perform regular backups of your database before running any bulk operations like imports.
  3. Monitor the import process carefully, especially during peak business hours.
  4. Test your upsell setup on a staging environment first to avoid disrupting live sales.

Conclusion

While Magento does not have an out-of-the-box solution for directly importing upsell products, third-party extensions and custom scripts provide effective workarounds. The choice between the two methods depends on your comfort level with coding and your budget for external tools.

For a comprehensive guide on Magento CSV imports and exports, I recommend checking out Laravel Company’s article on Magento Data Migration. It provides in-depth insights into the best practices for managing data in Magento.

Remember, upselling is a powerful tool for increasing customer satisfaction and revenue, so ensuring your product recommendations are accurate and relevant can significantly impact your bottom line.

Catalog Extensions Customers Import/Export

Our network