Download the PHP package vin-sw/shopware-sdk without Composer

On this page you can find all versions of the php package vin-sw/shopware-sdk. 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 shopware-sdk

Shopware 6 PHP SDK

php

[GitHub Release]() Latest Version on Packagist

Shopware PHP SDK is a simple SDK implementation of Shopware 6 APIs. It helps to access the API in an object-oriented way.

If you're familiar with Shopware 6 DAL syntax and how to retrieve it you might see this example is predictable and straightforward

image

Or sending notification from external server image

SDK version SW schema
2.x 6.5
1.x 6.4

You can use 1.x to connect to a sw 6.5 but for up-to-date schema and new 6.5 features, you should use 2.x version instead.

Installation

Install with Composer

The SDK main features:

Usage

More in the examples folder, for integrating the sdk in an App, have a look at this repository

Admin Authentication

Using Password grant type

Using Client credential grant type

Using Refresh token grant type

Or dynamically via

Check the authentication example for the reference.

After having a GrantType object, you can fetch the admin's access token using the AdminAuthenticator

Notice: You might want to store the access token object into the database so you can create the object without request for another access token for every Admin API request.

Working with Criteria and Repositories

It's pretty identical to what you expected when working with Shopware's core or repositories in the SW administration.

This is an example to retrieve a product that have free shipping

Each shopware's entity is mapped into Entity and Collection Classes which can be found in Data/Entity so you can easily access their properties when retrieving data from Admin API.

Support methods get, search, searchIds, create, update, delete, syncDeleted, createVersion, mergeVersion, deleteVersion, clone, schema. Each method requires a Context object

Check examples/entity-repository.php for some useful references.

Working with App

AppRegistration examples:

The example took from a Laravel route action, but it can be the same in other frameworks

Action Button Response examples:

When receive a POST request from an action button, you can return one of these ActionResponse (PSR-7 Response) classes ported from Shopware's core

Working with Admin API Services

An ApiService requires a Context object as its first argument. Check examples/info-service.php for some references.

Change log

Please see CHANGELOG for more information on what has changed recently.

Working with Webhook

Contribution

Feels free to create an issue on Github issues page or contact me directly at [email protected]

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Requirements

This SDK is mainly dedicated to Shopware 6.4 and onwards, earlier SW application may still be usable without test

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of shopware-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0 || ^8.1 || ^8.2 || ^8.3
ext-json Version *
guzzlehttp/guzzle Version ^7.0
psr/http-client Version ^1.0
guzzlehttp/psr7 Version ^2.7
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 vin-sw/shopware-sdk contains the following files

Loading the files please wait ....