Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juansoler/medusa-source-prestashop
A Medusa plugin that imports data from Prestashop
https://github.com/juansoler/medusa-source-prestashop
Last synced: about 1 month ago
JSON representation
A Medusa plugin that imports data from Prestashop
- Host: GitHub
- URL: https://github.com/juansoler/medusa-source-prestashop
- Owner: juansoler
- Fork: true (shahednasser/medusa-source-magento)
- Created: 2022-12-02T18:21:50.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T18:14:56.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T04:38:46.352Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 240 KB
- Stars: 5
- Watchers: 0
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-medusajs - Prestashop - square) ![stars](https://img.shields.io/github/stars/juansoler/medusa-source-prestashop) (Uncategorized / Uncategorized)
README
Prestashop Source Plugin for Medusa
A Medusa plugin that imports categories and products from Prestashop into Medusa.## Description
This plugin imports Prestashop categories and products into Medusa. It creates categories and products that don't exist, and updates those that have been imported previously.
### Limitations
## Prerequisites
### Medusa Setup
You must have a [Medusa server installed](https://docs.medusajs.com/quickstart/quick-start) before installing this plugin.
Furthermore, the Medusa server should have [PostgreSQL](https://docs.medusajs.com/tutorial/set-up-your-development-environment#postgresql), [Redis](https://docs.medusajs.com/tutorial/set-up-your-development-environment#redis) and [File Service](https://docs.medusajs.com/quickstart/quick-start#file-service-plugin) installed and configured on your Medusa server.
### Prestashop Setup
Go in the PrestaShop back office, open the “Web service” page under the “Advanced Parameters” menu, and then choose “Yes” for the “Enable PrestaShop Webservice” option.
Generate a key and copy it as you'll need them for the plugin's options.
You need to give at least the integration the access to the following resources:
- products
- product_options
- product_option_values
- combinations
- categories
- stock_availables
- imagesWe recommend enable all the resources.
## Installing Plugin
To install the plugin run the following command on your Medusa server:
```bash
npm install medusa-source-prestashop
```## Plugin Configurations
Add the plugin and its options into the `plugins` array in `medusa-config.js`:
```js
const plugins = [
//...
{
resolve: `medusa-source-prestashop`,
//if your plugin has configurations
options: {
prestashop_url: '', // example 'https://prestashopstore.com/api',
consumer_key: '' // example 'FDSFJKLJFASDKLFJAJLKJFDS'
},
},
];
```### Options
| Name | Description | Required | Default Value|
-------|-------------|----------|--------------|
| `prestashop_url` | The URL of your Medusa server. It should end with a /api. | true | |
| `consumer_key` | The Consumer Key of the integration. | true | |## Use the Plugin
### Server Startup
To use the plugin, just start the Medusa server:
```bash
npm start
```The import process will run in the background of the server. Based on how many products you have, it can take some time the first time running it.
### As a Batch Job
You can trigger the import by creating a new batch job using the Create Batch Job API endpoint. You can pass the following in the payload:
```json
{
"type": "import-prestashop",
"context": { },
"dry_run": false
}
```This will trigger the import process.