// src/Entity/Shipping/ShippingMethod.php
namespace App\Entity\Shipping;
use CoopTilleuls\SyliusClickNCollectPlugin\Entity\ClickNCollectShippingMethod;
use CoopTilleuls\SyliusClickNCollectPlugin\Entity\ClickNCollectShippingMethodInterface;
use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\ShippingMethod as BaseShippingMethod;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_shipping_method")
*/
class ShippingMethod extends BaseShippingMethod implements ClickNCollectShippingMethodInterface
{
use ClickNCollectShippingMethod {
__construct as initializeShippingMethodLocations;
}
public function __construct()
{
parent::__construct();
$this->initializeShippingMethodLocations();
}
// ...
}
// src/Entity/Shipping/Shipment.php
namespace App\Entity\Shipping;
use CoopTilleuls\SyliusClickNCollectPlugin\Entity\ClickNCollectShipment;
use CoopTilleuls\SyliusClickNCollectPlugin\Entity\ClickNCollectShipmentInterface;
use CoopTilleuls\SyliusClickNCollectPlugin\Validator\Constraints\SlotAvailable;
use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Shipment as BaseShipment;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_shipment", indexes={@ORM\Index(columns={"location_id", "collection_time"})})
* @SlotAvailable(groups={"sylius"})
*/
class Shipment extends BaseShipment implements ClickNCollectShipmentInterface
{
use ClickNCollectShipment;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.