Jump to content

[Tutorial][PS 1.7+] Adding data (products, combinations, category's, ...) using the PrestaShop Webservice Api


Recommended Posts

 

After my previous tutorial Adding prestashop products programmatically, we have decided to launch a new project where we will be using the PrestaShop Webservice API. The advantages of the PrestaShop Webservice API are that we can add, modify, and/or delete almost all types of data. One of the benefits of the PrestaShop Webservice API is that it also provides validation functions to prevent incorrect data from being entered into the database.

For this tutorial, we have provided a "package" that you can see in action by visiting our demo shop at https://demoshop.crezzur.com/ws-api/. You can easily download this package at the bottom of this post and add it to the root directory of your webshop. This package will enable you to perform some basic operations and gain a better understanding of the PrestaShop Webservice API.

The intention is to expand this package with additional functionalities based on your questions and feedback. Using this package, a developer with basic programming skills should be able to develop a page relatively easily, for example, to automatically add new products (e.g., with combinations) to their client's webshop (e.g., by using a cron job).

 

Setup the package

  1. Unzip the ws-api.zip in the root directory of your webshop
  2. Open the config.php file and replace the YOUR_SHOP_URL and the YOUR_API_KEY with the information of your shop.
  3. Now you can try to add, edit a product, combination, ...

 

Based on the questions you ask, we will provide a Q&A session where we will explain the questions asked.

First release V0.0.1  (2023-06-13)

ws-api.zip

 

Edited by Crezzur.com (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...