Medusa won the Golden Kitty Award for Best Ecommerce Product ✨  Learn More

Medusa Logo
  • Developers
  • Blog
  • Pricing
  • Community
  • About
  • Careers
  • Get Started
  • Developers
  • Blog
  • Pricing
  • Community
  • About
  • Careers
  • Get Started
Browse

Built by

juansoler

Category

Source

Version

0.0.3

Last updated

Jan 4, 2023, 18:16:04 PM3 months ago
View sourceView on NPMCopy link

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 before installing this plugin.

Furthermore, the Medusa server should have PostgreSQL, Redis and File Service 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
  • images

We recommend enable all the resources.

Installing Plugin

To install the plugin run the following command on your Medusa server:

npm install medusa-source-prestashop

Plugin Configurations

Add the plugin and its options into the plugins array in medusa-config.js:

const plugins = [
//...
{
resolve: `medusa-source-prestashop`,
//if your plugin has configurations
options: {
prestashop_url: '<YOUR_PRESTASHOP_URL>', // example 'https://prestashopstore.com/api',
consumer_key: '<YOUR_CONSUMER_KEY>' // example 'FDSFJKLJFASDKLFJAJLKJFDS'
},
},
];

Options

NameDescriptionRequiredDefault Value
prestashop_urlThe URL of your Medusa server. It should end with a /api.true
consumer_keyThe Consumer Key of the integration.true

Use the Plugin

Server Startup

To use the plugin, just start the Medusa server:

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:

{
"type": "import-prestashop",
"context": { },
"dry_run": false
}

This will trigger the import process.

altText of the image

Build your own plugins

Take Medusa up another level, and develop your own plugins with our API to speed up your processes.

Focus on building plugins for tools you use in your daily workflow, and publish to the Medusa Plugin Store for others to install.

Read more
altText of the image
Medusa

Product

Medusa for B2BIntegrationsGet StartedCareers
We're hiring

Developers

DocsAPI ReferencesCommunityDiscussions

Medusa

BlogPricingAboutContact Us

Newsletter

Get a summary of what we’ve shipped during the last month, behind the scenes updates, and team picks. Unsubscribe any time.

© 2023 MedusaJS, Inc.