Download the PHP package protechstudio/laravel-prestashop-webservice without Composer

On this page you can find all versions of the php package protechstudio/laravel-prestashop-webservice. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-prestashop-webservice

Laravel Prestashop Web Service

Laravel 5 wrapper for Prestashop Web Service Library

Installation

Require this package with composer using the following command:

After updating composer, add the service provider to the providers array in config/app.php

You may also add the Facade in the aliases array in config/app.php

Finally publish the configuration file using the artisan command

Configuration

Open the published configuration file at config/prestashop-webservice.php:

Then populate the url field with the root url of the targeted Prestashop installation and token field with the API token obtained from Prestashop control panel in Web Service section. If debug is true Prestashop will return debug information when responding to API requests.

Usage

You may use the Prestashop Web Service wrapper in two ways:

Using the dependency or method injection

Using the Facade

Prestashop Underlying library usage

You may find complete documentation and tutorials regarding Prestashop Web Service Library in the Prestashop Documentation.

Helper methods

I've added some helper methods to reduce development time:

Retrieving resource schema and filling data for posting

You may call getSchema() method to retrieve the requested resource schema. You may then fill the schema with an associative array of data with fillSchema() method.

Preserving not filled nodes from removal

The default behaviour for the fillSchema method is to remove the nodes that are not filled. If you want to preserve those nodes (typical update situation) put the third parameter as false

Removing specific nodes

When preserving unfilled nodes from removal you may specify some nodes to be removed as the fourth argument (this may be useful when updating a resource with some readonly nodes that would trigger error 400):

Handling language values

If the node has a language child you may use a simple string for the value if your shop has only one language installed.

If your shops has more than one language installed you may pass the node value as an array where the key is the language ID.

Please note that if you don't provide an array of values keyed by the language ID all language values will have the same value.

Handling associations with several siblings

Provided you got a node with several associations like category association for products or similar as from this extract of product schema:

You can prepare the array data map for the fillSchema method in this way:

The result will be this as expected:


All versions of laravel-prestashop-webservice with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package protechstudio/laravel-prestashop-webservice contains the following files

Loading the files please wait ....