Message-ID: <781447412.375834.1710852767224.JavaMail.root@confluence-doc2-production> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_375833_172093002.1710852767219" ------=_Part_375833_172093002.1710852767219 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This tutorial shows you how to use the PrestaShop web service with PHP l= ibrary by creating a "CRUD" application.
mod_rewrite
enab=
led (Apache only).CRUD is an a= cronym that stands for "Create, Read, Update, Delete". These are the four b= asic operations for managing data in an application.
The PrestaShop web service uses the REST architecture in order to be ava= ilable on as many platforms as possible, since HTTP and XML protocols are p= resent on countless platforms.
REST defines an architecture that repre= sents a set of good methods to practice on the web. It defines several rule= s, including one that we will describe that is similar to CRUD.
In HTTP, there are 4 main methods that c= an perform processing on data that are defined in the REST architecture. Th= is correspondence can also be done with CRUD and SQL:
HTTP/ REST |
CRUD |
SQL |
---|---|---|
POST |
Create |
INSERT |
GET |
Retrieve |
SELECT |
PUT |
Update |
UPDATE |
DELETE |
Delete |
DELETE |
Together, we will look at how to create a small application to perform t= hese four operations on our customers.
Chapters 1, 2 and 3 are mandatory.
In the next chapters, you'll learn how to interact with the web service = with each of the CRUD operations, in order to give you the tools to make a = full CRUD application.
If you only want to retrieve data, for example when developing a web app= lication to notify you of orders, you might only be interested in Chapter 4= .
If you prefer to develop a more complete application, chapters 4 to 7 wi= ll interest you.
Cha=
pter 1 - Introduction: Creating Access to Back Office
Chapter 2 - Discovery: Testing access to the web service with=
the browser
Chapter 3 - First steps: Access the W=
eb service and list client
Chapter 3.1 - Access the web service through the bookstore =
Chapter 3.2 - Hand=
ling errors
Chapter 3=
.3 - List clients
Chapter 4 - Retrieve Data: Retrieving a client =
a>
C=
hapter 5 - Modification: Update client
Chapter 6 - Creation: Remote Onlin=
e Form
Chapter 7 - Removal: Remove customer accoun=
ts from the database
Chapter 8 - Advanced Use
The latest version of the PSWebServiceLibra= ry.php file can be found on our code repository: https://github.com/Pre= staShop/PrestaShop-webservice-lib/blob/master/PSWebServiceLibrary.phpTo download the file:
PSWebServiceLibrary.php
You can also directly download a zip archive of all the files in this re= pository, including the example files, by clicking here: https://github.com/PrestaShop/PrestaShop= -webservice-lib/archive/master.zip
All the example files can be found on our code repository: https://github.com/PrestaShop/Pre= staShop-webservice-lib/tree/master/examples