## Important Commands

    php artisan install:api
    php artisan serve --host=localhost
    php artisan cache:clear
    php artisan migrate:refresh --seed
    php artisan schedule:list

## Setup the Environment
1. Check Odoo Credentials --> Adjust Staging URL and DB Name to current
2. Check Wordpress URL to make sure its valid
3. Verify Woocommerce Credentials and issue new API Key if needed
4. Issue new Wordpress User App Password and store in woocommerce Credentials

## Sample Sync Run
php artisan sync:configs 5
php artisan sync:configs 5 --skus="SKU-001,SKU-002"

## Reverb Job
php artisan sync:reverb 5 --sku="107037"

## Setup Scheduler with Linux

1. Open the Conrtab File as System: ```sudo crontab -e```
    
2. Add the following line (first five symbols are *): ```* * * * * cd /var/www/sync.lumexus.dev && php artisan schedule:run >> /dev/null 2>&1```
3. Save + Finish
4. Verify with: ```sudo crontab -l```

## Run Job with Specific Parameters on demand

    php artisan sync:configs {configID}

## Odoo to Reverb POC

Run immediately for every Odoo product in a product sync configuration:

    php artisan sync:reverb {configID}

Run immediately for one exact SKU:

    php artisan sync:reverb {configID} --sku="SKU-123"

Add `--queue` to dispatch the job to the configured Laravel queue instead. A queue
worker must then be running. Existing Reverb listings are matched by SKU and
updated. Missing listings are created as drafts and require
`REVERB_CATEGORY_UUID` to be configured.

## Setup Laravel Scheduler on Windows

1. Copy the laravel-scheduler-sample.bat and name it laravel-scheduler.bat
    a. Replace the path in the bat to point to your Laravel Projet Root
2. Open the "LaravelScheduler.xml" File
3. Replace "Repodir" with the path to the repository
4. Import the Scheduled Task and verify it points to the .bat File
5. Scheduler should now be ready
