Example shop to show implementation of bepado SDK
This package is auto-updated.
Last update: 2023-09-12 01:25:31 UTC
This repository contains a demo shop with bepado SDK API implemented. It is integrated into a very simple shop system built with Symfony components.
- Take a look at the
SimpleProductToShop.phpfiles. For an implementation of the two bepado SDK interfaces that you have to do in your own plugin.
- The folder
src/QafooLabs/DemoShop/Modelcontains models and services related to the shop system. You will need to take a look at the
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.phpis an example of how to setup the SDK RPC endpoint.
- The controller
src/QafooLabs/DemoShop/Controller/ShopController.phpcontains the category listing, basket listing and checkout with calls to the relevant services invoking bepado SDK code.
- The command
src/QafooLabs/DemoShopy/Command/CreateProductsCommand.phpcontains some random product generation code, but also uses the bepado SDK to record exports of products to bepado.
You can install this project via Composer:
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
email@example.com to receive an
account and api key on the Test system.
Create a database
bepado_demoshop_$shop where $shop is the key in the shops
array of your
php src/bin/demoshop demoshop:create-database
to create the schema for the database.
To receive some dummy data from a remote shop, call
php src/bin/demoshop demoshop:fake-product.
To create some local shop data call
php src/bin/demoshop demoshop:create-products.
You can use the builtin server to run the shop:
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.