PHP code example of setono / sylius-peak-wms-plugin
1. Go to this page and download the library: Download setono/sylius-peak-wms-plugin library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
# src/Entity/Order/Order.php
declare(strict_types=1);
namespace App\Entity\Order;
use Setono\SyliusPeakPlugin\Model\OrderInterface as PeakOrderInterface;
use Setono\SyliusPeakPlugin\Model\OrderTrait as PeakOrderTrait;
use Sylius\Component\Core\Model\Order as BaseOrder;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*
* @ORM\Table(name="sylius_order")
*/
class Order extends BaseOrder implements PeakOrderInterface
{
use PeakOrderTrait;
}
# src/Entity/Product/ProductVariant.php
declare(strict_types=1);
namespace App\Entity\Order;
use Doctrine\ORM\Mapping as ORM;
use Setono\SyliusPeakPlugin\Model\ProductVariantInterface as PeakProductVariantInterface;
use Setono\SyliusPeakPlugin\Model\ProductVariantTrait as PeakProductVariantTrait;
use Sylius\Component\Core\Model\ProductVariant as BaseProductVariant;
/**
* @ORM\Entity
*
* @ORM\Table(name="sylius_product_variant")
*/
class ProductVariant extends BaseProductVariant implements PeakProductVariantInterface
{
use PeakProductVariantTrait;
}