View Categories

Import/Export Tab

The Import & Export tab allows you to manage inventory across multiple stores by using CSV files. This feature supports two workflows:

  1. Manual Import/Export – upload or download inventory CSV files directly from the WordPress admin.
  2. Automatic Scheduled Import (since v1.7.5) – place CSV files in a special folder, and the system will process them automatically on schedule.

This flexibility ensures that you can both run one-time imports and set up recurring, automated inventory updates.

Accessing the Import/Export Tab #

  1. Log in to your WordPress dashboard.
  2. Go to Agile Store Locator → WooCommerce from the sidebar menu.
  3. Open the Import/Export tab.

Here you will find tools for downloading inventory, uploading CSV files, and instructions for both manual and automatic imports.

asl wc import export
Import/Export Section

Manual Import #

Manual import is ideal when you want to upload a single CSV file and update inventory instantly.

Steps to Import Inventory Manually #

  1. Go to Agile Store Locator → WooCommerce → Import/Export tab.
  2. Under the Import Inventory section:
    • Click Choose File and select your CSV file.
    • Click the Import button.
  3. The plugin will process the file and update your inventory accordingly.
  4. A completion message will show the number of rows successfully imported and any errors encountered.
Successful Import
Successful Import

Exporting Inventory #

To review or modify your current inventory, you can export a CSV file:

  1. In the Export Inventory section of the tab, click Export CSV.
  2. The system generates a CSV containing your existing store inventory.
  3. This file can be edited and later re-imported.
CSV File
CSV File

Automatic Import (v1.7.5+) #

Starting from version 1.7.5, you can automate inventory updates by placing CSV files into a monitored folder. WordPress cron jobs will detect and import these files without manual action.

Watch Folder Location #

Place CSV files here:

wp-content/uploads/asl-wc/cron/
  • If the folder does not exist, create it manually.
  • Make sure the directory is writable (755 recommended).
  • All .csv files in this folder are picked up and processed on schedule.

Behavior #

  • Each scheduled run adds stock quantities to existing values.
  • Processed rows update products and variations based on IDs.
  • If a store_id or product_id is invalid, the row is flagged and reported at the end of the import.
  • Files are not deleted automatically; archive or remove them after import to avoid re-processing.

CSV File Format #

The importer uses the same structure for both manual and automatic imports. Required columns:

ColumnDescription
product_idSimple Products: WooCommerce Product ID
Variable Products: Variation ID
store_idID of the store (from Agile Store Locator’s store list)
priceStore-specific regular price (optional)
sale_priceStore-specific sale price (optional)
stockQuantity to add to existing stock (integer, positive/negative)
stock_availability1 = in stock, 0 = out of stock
status1 = active, 0 = inactive

Example CSV #

product_id,store_id,price,sale_price,stock,stock_availability,status
140,11,19,12,12,1,1       # Simple Product ID 140 (Store 11) → +12 stock
140,5,16,15,10,1,1        # Simple Product ID 140 (Store 5) → +10 stock
256,7,20,18,5,1,1         # Variation ID 256 (Store 7) → +5 stock
  • Simple products: enter the main product ID.
  • Variable products: enter the variation ID.
  • Stock column values are added to the existing quantity (e.g., if stock = 20 and CSV has 5 → total becomes 25).
  • Use negative numbers to decrement stock.

Error Handling #

  • If a store is not found → the row is skipped and reported.
  • If a product or variation ID is invalid → the row is skipped and reported.
  • Errors are shown at the end of the import process (for both manual and automatic imports).