# NGauge Magento module

This module provides a simple connector to import orders from a Magento store via REST API and import them into the NGauge app.

Quick setup

1. Install dependencies in the module folder:

```bash
cd NGauge_modules/ngauge-magento
composer install
```

2. Configure credentials (example config/local.php or DI):

```php
return [
  'components' => [
    'magentoClient' => [
      'class' => 'NGauge\\Magento\\services\\MagentoClient',
      'baseUrl' => 'https://mystore.example.com',
      'accessToken' => 'your-integration-token'
    ]
  ]
];
```

3. Run the console importer:

```bash
php yii ngauge-magento/import/run
```

Git / Repo setup

Create an Azure/GitHub repo named `NGauge-magento` and push this folder as the initial commit. Example:

```bash
cd NGauge_modules/ngauge-magento
git init
git add -A
git commit -m "Initial NGauge Magento module"
git remote add origin git@github.com:YourOrg/NGauge-magento.git
git push -u origin main
```

Files

- `src/services/MagentoClient.php` — lightweight REST client using Guzzle.
- `console/ImportMagentoOrdersController.php` — console command to import orders.

License: Proprietary (modify as needed)
