Bepado SDK Demo Shop
This repository contains a demo shop with bepado SDK API implemented. It
is integrated into a very simple shop system built with Symfony components., (*1)
Where to look?
- Take a look at the
src/QafooLabs/DemoShop/Bepado/SimpleProductFromShop.php
and
SimpleProductToShop.php
files. For an implementation of the two bepado
SDK interfaces that you have to do in your own plugin.
- The folder
src/QafooLabs/DemoShop/Model
contains models and services
related to the shop system. You will need to take a look at the
BasketService.php
, ProductConverter.php
and
ShopProductGateway.php
. They contain a lot of the logic and storage
related code that is necessary to work with the bepado SDK.
- The controller
src/QafooLabs/DemoShop/Controller/SdkController.php
is
an example of how to setup the SDK RPC endpoint.
- The controller
src/QafooLabs/DemoShop/Controller/ShopController.php
contains the category listing, basket listing and checkout with calls to the
relevant services invoking bepado SDK code.
- The command
src/QafooLabs/DemoShopy/Command/CreateProductsCommand.php
contains
some random product generation code, but also uses the bepado SDK to record
exports of products to bepado.
Installation
You can install this project via Composer:, (*2)
composer create-project qafoolabs/bepado-demo-shop
Then you need to copy the "shops.dist.json" to "shops.json" and adjust the
data. You need to get in contact with bepado@shopware.com
to receive an
account and api key on the Test system., (*3)
Create a database bepado_demoshop_$shop
where $shop is the key in the shops
array of your shops.json
. Call php src/bin/demoshop demoshop:create-database
to create the schema for the database., (*4)
To receive some dummy data from a remote shop, call php src/bin/demoshop demoshop:fake-product
., (*5)
To create some local shop data call php src/bin/demoshop demoshop:create-products
., (*6)
You can use the builtin server to run the shop:, (*7)
php -S localhost:8080 web/index.php
Note: The installation and running of this shop is not supported by us. It is
just meant to be a helpful resource when implementing your own plugin., (*8)