PrestaShop Product Import/Export Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
PrestaShop Product Import/Export Setup
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

PrestaShop Product Import/Export Setup

PrestaShop has built-in import in Advanced Parameters → Import. For production tasks with 5,000+ products, the built-in tool requires tuning or replacement with a custom batch solution with memory management.

CSV Structure for Product Import

PrestaShop importer expects fixed fields. Delimiter and encoding configurable on upload:

ID;Active (0/1);Name *;Categories;Price tax excl.;Tax rules ID;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyyy-mm-dd);Discount to (yyyy-mm-dd);Reference #;Supplier reference #;Supplier;Brand;EAN13;UPC;MPN;Ecotax;Weight;Quantity;Description;Short description;Tags (x,y,z...);Meta title;Meta description;URL rewritten;Image URLs (x,y,z...);Image alt texts (x,y,z...);Feature (Name:Value:Position:Customized);Available for order;Available date;Show price;Visibility;Additional shipping cost;Unity;Unit price;Summary;Shop (for multi-shop only)
;1;Winter Men's Jacket;Outerwear,Men's Clothing;2999.00;1;0;0;0;0;;;ART-001;;Brand;JacketBrand;4607167430120;;;0;1.5;50;"Full jacket description...";"Winter jacket";"jacket, winter, men";"Buy men's winter jacket";"Winter men's jacket — buy";"winter-jacket-mens";"https://cdn.example.com/img1.jpg,https://cdn.example.com/img2.jpg";"Jacket view 1,Jacket view 2";"Color:Black:1:0;Size:L:2:0";1;;;1;everywhere;0;;;

Configuration for Bulk Import

Default PHP import process hits memory_limit and max_execution_time. For 10,000+ row files:

// override/controllers/admin/AdminImportController.php
class AdminImportControllerCore extends AdminImportController
{
    public function __construct()
    {
        parent::__construct();
        @ini_set('memory_limit', '512M');
        @ini_set('max_execution_time', '3600');
    }

    // Reduce batch size to save memory
    const MAX_LINE_SIZE = 4096;  // bytes per line
}

Or via PHP-FPM pool configuration for import processes:

; /etc/php/8.1/fpm/pool.d/prestashop-import.conf
[prestashop-import]
pm = static
pm.max_children = 2
php_value[memory_limit] = 1G
php_value[max_execution_time] = 7200

Programmatic Import via ObjectModel

For ERP/1C integration, bypass web importer and work directly via PrestaShop API:

// Import product with attributes
class ProductImporter
{
    private int $defaultLangId;
    private int $shopId;

    public function importProduct(array $data): int
    {
        $product = new Product();
        $product->name[$this->defaultLangId]              = $data['name'];
        $product->description[$this->defaultLangId]       = $data['description'];
        $product->description_short[$this->defaultLangId] = $data['short_description'];
        $product->link_rewrite[$this->defaultLangId]      = Tools::link_rewrite($data['name']);
        $product->reference    = $data['sku'];
        $product->price        = (float) $data['price'];
        $product->weight       = (float) ($data['weight'] ?? 0);
        $product->active       = 1;
        $product->id_category_default = $data['category_id'];
        $product->id_shop_default     = $this->shopId;

        if (!$product->add()) {
            throw new \RuntimeException('Failed to add product: ' . $data['sku']);
        }

        // Bind to categories
        $product->addToCategories($data['category_ids']);

        // Update stock
        StockAvailable::setQuantity($product->id, 0, (int) $data['qty']);

        // Index after addition
        Search::indexation(false, $product->id);

        return (int) $product->id;
    }

    public function importImage(int $productId, string $imageUrl, string $legend = ''): void
    {
        $image = new Image();
        $image->id_product  = $productId;
        $image->position    = Image::getHighestPosition($productId) + 1;
        $image->cover       = !Image::getCover($productId);
        $image->add();

        $imageFile = _PS_PRODUCT_IMG_DIR_ . $image->getImgPath() . '.jpg';
        Tools::copy($imageUrl, $imageFile);
        $imageObj = new ImageManager();
        $imageObj->resize($imageFile, $imageFile, null, null, 'jpg', false, $error, null, 95, true);
        Image::generateImgSize($imageFile, $image->id_product, $image->id);
    }
}

Export via WebService API

PrestaShop WebService provides REST API for export:

# Get product list via WebService
curl "https://example.com/api/products?ws_key=YOUR_API_KEY&output_format=JSON&limit=100&page=1&display=full"

# Filter by modification date
curl "https://example.com/api/products?ws_key=KEY&output_format=JSON&filter[date_upd]=[2024-01-01,2024-12-31]&date=1"

PHP client for systematic export:

$client = new PrestaShopWebservice('https://example.com', 'YOUR_API_KEY', false);

$params = [
    'resource' => 'products',
    'display'  => '[id,reference,name,price,quantity]',
    'sort'     => '[id_ASC]',
    'limit'    => '100,100', // offset=100, limit=100
];

$xml = $client->get($params);
$products = $xml->products->product;

Configure Import Module for Cron

For regular catalog updates from external source:

// modules/erpimport/cron.php
define('_PS_ADMIN_DIR_', getcwd());
include(dirname(__FILE__) . '/../../config/config.inc.php');

$importer = new ErpProductImporter();
$products = $importer->fetchFromErp(strtotime('-1 hour')); // modified in last hour

foreach (array_chunk($products, 100) as $batch) {
    foreach ($batch as $productData) {
        try {
            $importer->upsert($productData);
        } catch (Exception $e) {
            PrestaShopLogger::addLog(
                'ERP import error: ' . $e->getMessage(),
                3, // severity: error
                null, 'Product', $productData['id'] ?? 0
            );
        }
    }
    // Pause between batches to reduce load
    usleep(100000); // 100ms
}
# Cron entry
*/30 * * * * www-data php /var/www/prestashop/modules/erpimport/cron.php >> /var/log/prestashop/erp-import.log 2>&1

Timeline

  • Configure built-in importer + test import: 4–8 hours
  • Custom importer with ERP integration: 3–7 days
  • Regular sync setup with error monitoring: 2–3 days
  • Migrate 10,000+ SKU catalog with images: 3–7 days