Integrate AvisVérifiés (NetReviews) into Sylius.
/!\ Currently in alpha /!\
$ composer require ikuzostudio/avis-verifies-plugin
Add plugin dependencies to your config/bundles.php
file:
return [
// ...
Ikuzo\SyliusAvisVerifiesPlugin\IkuzoSyliusAvisVerifiesPlugin::class => ['all' => true],
];
Import required config in your config/packages/_sylius.yaml
file:
# config/packages/_sylius.yaml
imports:
...
- { resource: "@IkuzoSyliusAvisVerifiesPlugin/Resources/config/app/config.yaml"}
Extend your Order entity
// [...]
use Sylius\Component\Core\Model\Order as BaseOrder;
use Ikuzo\SyliusAvisVerifiesPlugin\Model\AvisVerifiesOrderInterface;
use Ikuzo\SyliusAvisVerifiesPlugin\Model\AvisVerifiesOrderTrait;
/**
* @ORM\Table(name="sylius_order")
* @ORM\Entity()
*/
class Order extends BaseOrder implements AvisVerifiesOrderInterface
{
use AvisVerifiesOrderTrait;
}
Extend your Channel entity
// [...]
use Sylius\Component\Core\Model\Channel as BaseChannel;
use Ikuzo\SyliusAvisVerifiesPlugin\Model\AvisVerifiesChannelInterface;
use Ikuzo\SyliusAvisVerifiesPlugin\Model\AvisVerifiesChannelTrait;
/**
* @ORM\Table(name="sylius_channel")
* @ORM\Entity()
*/
class Channel extends BaseChannel implements AvisVerifiesChannelInterface
{
use AvisVerifiesChannelTrait;
}
Extend your ProductReview entity
// [...]
use Sylius\Component\Core\Model\ProductReview as BaseProductReview;
use Ikuzo\SyliusAvisVerifiesPlugin\Model\AvisVerifiesProductReviewTrait;
use Ikuzo\SyliusAvisVerifiesPlugin\Model\AvisVerifiesProductReviewInterface;
/**
* @ORM\Table(name="sylius_product_review")
* @ORM\Entity()
*/
class ProductReview extends BaseProductReview implements AvisVerifiesProductReviewInterface
{
use AvisVerifiesProductReviewTrait;
}
Import routes
# config/routes.yaml
ikuzo_avis_verifies_plugin:
resource: "@IkuzoSyliusAvisVerifiesPlugin/Resources/config/routing.yaml"
Update your database
$ bin/console doctrine:schema:update --force
Then configure your credentials from channel form