Magento import reset every 'use default config' for multistores

Magento import reset every 'use default config' for multistores

August 16, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento import reset every 'use default config' for multistores

Solving Magento Import/Export Issues: A Developer’s Perspective

Magento’s built-in import/export feature is powerful but can sometimes lead to unexpected issues, especially when dealing with multi-store setups. In this post, we’ll address the specific problem you encountered and provide a comprehensive solution.

Understanding the Issue

When you perform an import in Magento using the store column in your CSV file, it can overwrite the ‘Use Default Config’ settings for certain attributes on products. This is because the system interprets changes to the store column as a new product assignment rather than an update to existing products.

In your case, when you imported wholesale prices and specified the wholesale store, Magento wiped out all other configurations for those products assigned to that store view. This included essential data like names, descriptions, tax classes, visibility statuses, etc. Even reimporting with the same CSV file didn’t restore the original settings because Magento only updates what has been explicitly changed in the new import.

A Developer’s Approach to Resolving the Problem

To fix this issue and reinstate the wholesale store ‘Use Default Config’ settings without losing your price changes, follow these steps:

1. Identify Affected Products

First, you need to determine which products have been affected by running a SQL query in your MySQL database. Use the following command:

SELECT *
FROM catalog_product_entity_int
WHERE attribute_id IN (SELECT entity_id FROM core_attribute)
AND value != ''
AND store_id = <your_wholesale_store_view_id>

Replace <your_wholesale_store_view_id> with the actual ID of your wholesale store view.

This query will return a list of products that have non-empty attribute values for your wholesale store. Make note of these IDs.

2. Recreate ‘Use Default Config’ Settings

Next, you’ll need to recreate the default settings for these products in the wholesale store context. You can do this programmatically using Magento’s API or directly updating the database.

If you prefer a PHP solution:

// Connect to your Magento database
$pdo = new PDO('mysql:host=your_host;dbname=your_db', 'your_username', 'your_password');

// Fetch affected products from the previous query
$stmt = $pdo->prepare("SELECT * FROM catalog_product_entity_int WHERE attribute_id IN (SELECT entity_id FROM core_attribute) AND value != '' AND store_id = :store_id");
$stmt->execute(['store_id' => 2]);
$products = $stmt->fetchAll();

// Loop through each product
foreach ($products as $product) {
    // Update 'Use Default Config'
    $updateStmt = $pdo->prepare("UPDATE catalog_product_entity_int SET value = NULL, default_value = NULL WHERE entity_id = :entity_id AND attribute_id = :attribute_id");
    $updateStmt->execute([
        'entity_id' => $product['entity_id'],
        'attribute_id' => $product['attribute_id']
    ]);
}

This script fetches all affected products and resets the values to their default settings for each product attribute.

Best Practices for Magento Imports

To prevent this issue in the future, consider the following best practices when working with Magento imports:

  1. Always backup your data before performing an import.
  2. Use a staging environment or test store setup to validate your CSV files and imports first.
  3. Avoid modifying the ‘Use Default Config’ settings directly within your CSV files.
  4. If you need to update product attributes across multiple stores, consider using Magento’s built-in multi-store functionality rather than relying on the store column in your CSV file.

Conclusion

Magento import/export issues can be frustrating, but with a developer’s perspective and some careful database manipulation, you can successfully restore your wholesale store settings without losing the price changes you made.

Remember to always test your imports thoroughly before applying them to your live environment. If you find yourself stuck or needing further assistance, don’t hesitate to consult Magento’s documentation or seek help from experienced developers or support services like those offered by Laravel Company.

By following these guidelines and exercising caution when working with Magento imports, you can ensure the stability and reliability of your e-commerce platform.

Catalog Database API Configuration

Our network