Documentation: XML to OpenCart Script

Overview

This script facilitates importing product data from an XML file into an OpenCart website, including the handling of categories and products. It ensures data synchronization by adding new items, updating existing ones, and removing outdated entries.

Steps to Run the Script

  1. Download the latest XML by running the following link:
    https://www.impamark-promotional-merchandise.co.uk/webupdater/public/index.php?action=download_supplier_one

    The page will display a message indicating the download completion.

  2. Run the script to import and process the XML:
    https://www.impamark-promotional-merchandise.co.uk/webupdater/public/index.php?action=import_supplier_one

    During this process, you'll see a table allowing you to assign new categories under parent categories. Once completed, the script proceeds automatically until it displays:

    "All processes are completed successfully."

Full Reset / Scratch Process

A new action has been added to completely reset the database and start fresh. This is useful for development or when a full re-import is required.

What it does:

How to run:

https://www.impamark-promotional-merchandise.co.uk/webupdater/public/index.php?action=scratch

Configuration Requirements:

To use this feature, you must add the database connection details to your .env file:

# Database Configuration
DB_HOSTNAME=localhost
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password
DB_DATABASE=your_db_name
DB_PORT=3306
DB_PREFIX=oc_

WARNING: This action is destructive! It will delete all product and category data. Ensure you have a backup before running this on a live environment.

Important Notes for OpenCart

Special Notes