Child pages
  • Chapter 6 - Creation - Remote Online Form

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

In the web service, there is a method to retrieve an empty XML. It is accessible via a URL formatted as follows: http://myprestashopexample.com/api/(resource name)?schema=blank

Note

It is possible to replace the parameter scheme value "blank" with "synopsis" in order to gain more information about the resource fields.

...

Code Block
$xml = $webService->get(array('url' => 'http://myprestashopexample.com/api/customers?schema=blank'));

...

If you have trouble, look at the code for the 3-Create.php sample file.

Note

When a client is created from within PrestaShop's administration interface, a confirmation e-mail is sent to the client. This cannot be done directly with the webservice: there is no way to trigger the sending of that confirmation e-mail.

However, you can create an override file for the Customer class and override the addWs() method. This method is similar to ObjectModel::add() but is only called from the webservice. You can find examples of its use in the Product and Order classes.