PHP code example of fmdd / sylius-marketing-plugin
1. Go to this page and download the library: Download fmdd/sylius-marketing-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/Customer.php
namespace App\Entity\Customer;
use Doctrine\ORM\Mapping as ORM;
use Setono\SyliusTrustpilotPlugin\Model\CustomerTrustpilotAwareInterface;
use Setono\SyliusTrustpilotPlugin\Model\CustomerTrait as TrustpilotCustomerTrait;
use Sylius\Component\Core\Model\Customer as BaseCustomer;
/**
* @ORM\Table(name="sylius_customer")
* @ORM\Entity()
*/
class Customer extends BaseCustomer implements CustomerTrustpilotAwareInterface
{
use TrustpilotCustomerTrait;
}
// src/Entity/Order.php
namespace App\Entity\Order;
use Doctrine\ORM\Mapping as ORM;
use Setono\SyliusTrustpilotPlugin\Model\OrderTrustpilotAwareInterface;
use Setono\SyliusTrustpilotPlugin\Model\OrderTrait as TrustpilotOrderTrait;
use Sylius\Component\Core\Model\Order as BaseOrder;
/**
* @ORM\Table(name="sylius_order")
* @ORM\Entity()
*/
class Order extends BaseOrder implements OrderTrustpilotAwareInterface
{
use TrustpilotOrderTrait;
}