jupi/prestashop-webservice-bundle
A Symfony bundle for integrating the PrestaShop Web Service API into PHP applications, with configuration and service wrappers to query and manage PrestaShop resources through the official web service.
This package is a Symfony bundle for the PrestaShop Web Service, not a Laravel package. A Laravel developer should start by treating it as a reference implementation and consuming the underlying libraries directly:
prestashop/webservice-lib — the core API client.webservice-lib-extra — now bumped to v1.3 in this release; this is the most likely source of behavioural changes.Minimal steps:
composer require prestashop/webservice-lib
composer require jupi007/webservice-lib-extra
config/services.php and .env:
'prestashop' => [
'url' => env('PRESTASHOP_URL'),
'key' => env('PRESTASHOP_WS_KEY'),
],
$this->app->singleton(PrestaShopWebservice::class, fn () => new PrestaShopWebservice(
config('services.prestashop.url'),
config('services.prestashop.key')
));
Where to look first:
README.md (updated in v1.2.0) for bundle configuration keys and example calls.DependencyInjection/Configuration.php to see which options are expected.webservice-lib-extra v1.3 changelog before upgrading — the bundle release only bumps that dependency.First use case: Fetch a paginated product list and inspect the XML response:
$client->get([
'resource' => 'products',
'options' => ['limit' => 10, 'display' => '[id,name,price]'],
]);
Because the Symfony bundle’s DI wiring is not reusable in Laravel, wrap the client in a small Laravel service and build repositories around it.
Recommended layering:
PrestaShopClient singleton in a service provider.Products, Orders, Customers, StockAvailables).simplexml_load_string.Common workflows:
get, add, edit, delete, and head on the client. Send XML bodies built with SimpleXMLElement.limit, filter, sort, and display through the options array; centralise this in a query builder to avoid repeated boilerplate.Cache::remember; avoid caching stock or order data without a short TTL.Integration tips:
id_lang, id_shop) in one place.webservice-lib-extra v1.3 is the real change here. Review its changelog and pin the version in composer.json before upgrading production.add/edit unless you check the response.SimpleXMLElement, CDATA handling, and required fields that the PrestaShop schema does not validate client-side. Missing fields often fail only at the API.null vs empty string matters in PrestaShop payloads, especially for associations and optional fields.PrestaShopWebserviceException and inspect the HTTP status and response body. PrestaShop returns useful error XML that is easy to discard.debug option or Laravel’s HTTP client when building a replacement transport. Log the exact URL and XML body.Http facade or a mocked client in tests. The bundle’s configuration shows the expected shape of connection settings.webservice-lib-extra v1.3 against your Laravel runtime before upgrading.webservice-lib-extra v1.3 changes rather than the bundle itself.How can I help you explore Laravel packages today?