src/Entity/System/Cart.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Doctrine\ORM\Mapping\JoinColumn;
  7. use Doctrine\ORM\Mapping\OneToOne;
  8. /**
  9.  * Cart
  10.  *
  11.  * @ORM\Table(name="ps_cart")
  12.  *
  13.  * @ORM\Entity(repositoryClass="App\Repository\System\CartRepository")
  14.  */
  15. class Cart
  16. {
  17.     public const DEFAULT_CURRENCY_EUR 1;
  18.     /**
  19.      * @var int
  20.      *
  21.      * @ORM\Id
  22.      *
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      *
  25.      * @ORM\Column(type="integer", name="id_cart")
  26.      */
  27.     private $id;
  28.     /**
  29.      * One Cart has One Order.
  30.      *
  31.      * @var Order|null
  32.      *
  33.      * @OneToOne(targetEntity="App\Entity\System\Order", inversedBy="cart")
  34.      *
  35.      * @JoinColumn(name="id_order", referencedColumnName="id_order", nullable=true)
  36.      */
  37.     private $order;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Carrier")
  40.      *
  41.      * @ORM\JoinColumn(name="id_carrier", referencedColumnName="id_carrier", nullable=true)
  42.      */
  43.     private ?Carrier $carrier;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(type="string", length=1000)
  48.      */
  49.     private $deliveryOption;
  50.     /**
  51.      * @var int
  52.      *
  53.      * @ORM\Column(type="integer", length=10, name="id_lang")
  54.      */
  55.     private $LanguageId;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Address")
  58.      *
  59.      * @ORM\JoinColumn(referencedColumnName="id_address", name="id_address_delivery", nullable=true)
  60.      */
  61.     private ?Address $addressDelivery;
  62.     /**
  63.      * @deprecated la dirección de facturación es la del cliente del carrito
  64.      *
  65.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Address")
  66.      *
  67.      * @ORM\JoinColumn(referencedColumnName="id_address", name="id_address_invoice", nullable=true)
  68.      */
  69.     private ?Address $addressInvoice;
  70.     /**
  71.      * @var int
  72.      *
  73.      * @ORM\Column(type="integer", length=10, name="id_currency")
  74.      */
  75.     private $currencyId;
  76.     /**
  77.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer")
  78.      *
  79.      * @ORM\JoinColumn(name="id_customer", referencedColumnName="id_customer", nullable=true)
  80.      */
  81.     private ?Customer $customer;
  82.     /**
  83.      * @var int
  84.      *
  85.      * @ORM\Column(type="integer", length=10, name="id_guest")
  86.      */
  87.     private $guestId;
  88.     /**
  89.      * @var string|null
  90.      *
  91.      * @ORM\Column(type="string", length=32, nullable=true, options={"default" : "-1"})
  92.      */
  93.     private $secureKey;
  94.     /**
  95.      * @var int
  96.      *
  97.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 1})
  98.      */
  99.     private $recyclable;
  100.     /**
  101.      * @var \DateTime
  102.      *
  103.      * @ORM\Column(type="datetime")
  104.      */
  105.     private $dateUpd;
  106.     /**
  107.      * @var \DateTime
  108.      *
  109.      * @ORM\Column(type="datetime")
  110.      */
  111.     private $dateAdd;
  112.     /**
  113.      * @var int
  114.      *
  115.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0}, name="is_virtual")
  116.      */
  117.     private $virtual;
  118.     /**
  119.      * @var bool
  120.      *
  121.      * @ORM\Column(type="boolean", columnDefinition="tinyint(4)", options={"default" : 0}, name="is_sync")
  122.      */
  123.     private bool $sync;
  124.     /**
  125.      * @var int
  126.      *
  127.      * @ORM\Column(type="integer", length=11, options={"default" : 0}, name="id_sincronate_shop_configuration")
  128.      */
  129.     private $sincronateShopConfigurationId;
  130.     /**
  131.      * @var int|null
  132.      *
  133.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0}, name="is_mobile", nullable=true)
  134.      */
  135.     private $mobile;
  136.     /**
  137.      * @var int|null
  138.      *
  139.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0}, nullable=true)
  140.      */
  141.     private $dropshipping;
  142.     /**
  143.      * @var string|null
  144.      *
  145.      * @ORM\Column(type="string", nullable=true)
  146.      */
  147.     private $payment;
  148.     /**
  149.      * @var string|null
  150.      *
  151.      * @ORM\Column(type="string", length=64, nullable=true)
  152.      */
  153.     private ?string $paymentMethodType null;
  154.     /**
  155.      * @var string|null
  156.      *
  157.      * @ORM\Column(type="string", length=64, nullable=true)
  158.      */
  159.     private ?string $paymentMethodId null;
  160.     /**
  161.      * One Cart has One PackPaymentMethod.
  162.      *
  163.      * @var PaymentMethod|null
  164.      *
  165.      * @ORM\ManyToOne(targetEntity="App\Entity\System\PaymentMethod", inversedBy="packCarts")
  166.      *
  167.      * @JoinColumn(name="pack_payment_method_id", referencedColumnName="id_payment_method", nullable=true)
  168.      */
  169.     private $packPaymentMethod;
  170.     /**
  171.      * @var string|null
  172.      *
  173.      * @ORM\Column(type="string", nullable=true)
  174.      */
  175.     private $packStoredPaymentMethodId;
  176.     /**
  177.      * One Cart has One ServicesPaymentMethod.
  178.      *
  179.      * @var PaymentMethod|null
  180.      *
  181.      * @ORM\ManyToOne(targetEntity="App\Entity\System\PaymentMethod", inversedBy="servicesCarts")
  182.      *
  183.      * @JoinColumn(name="services_payment_method_id", referencedColumnName="id_payment_method", nullable=true)
  184.      */
  185.     private $servicesPaymentMethod;
  186.     /**
  187.      * @var string|null
  188.      *
  189.      * @ORM\Column(type="string", nullable=true)
  190.      */
  191.     private $servicesStoredPaymentMethodId;
  192.     /**
  193.      * @var float|null
  194.      *
  195.      * @ORM\Column(type="float", columnDefinition="decimal(17,2)", options={"default" : 0.00}, nullable=true)
  196.      */
  197.     private $totalProducts;
  198.     /**
  199.      * @var float|null
  200.      *
  201.      * @ORM\Column(type="float", columnDefinition="decimal(17,2)", options={"default" : 0.00}, nullable=true, name="total_envio")
  202.      */
  203.     private $totalShipping;
  204.     /**
  205.      * @ORM\Column(type="float", nullable=true, name="logistic_weight")
  206.      */
  207.     private ?float $logisticWeight;
  208.     /**
  209.      * @var CartProduct[]|ArrayCollection
  210.      *
  211.      * @ORM\OneToMany(targetEntity="CartProduct", mappedBy="cart", cascade={"persist"})
  212.      */
  213.     private $cartProducts;
  214.     /**
  215.      * @ORM\Column(type="string", length=40, nullable=true)
  216.      */
  217.     private ?string $carrierComment null;
  218.     /**
  219.      * @ORM\Column(type="string", length=50, nullable=true)
  220.      */
  221.     private ?string $refOrderSupplier null;
  222.     /**
  223.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0}, name="is_system")
  224.      */
  225.     private bool $system false;
  226.     /**
  227.      * @ORM\Column(type="string", length=64, nullable=true)
  228.      */
  229.     private ?string $sellingChannel null;
  230.     /**
  231.      * @ORM\Column(type="string", length=256, nullable=true)
  232.      */
  233.     private ?string $additionalParameters null;
  234.     /**
  235.      * @ORM\Column(type="datetime", nullable=true)
  236.      */
  237.     private ?\DateTime $dateAmazon null;
  238.     /**
  239.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  240.      */
  241.     private bool $fba false;
  242.     /**
  243.      * @ORM\Column(type="datetime", nullable=true)
  244.      */
  245.     private ?\DateTime $maxDeliveryDatetime null;
  246.     /**
  247.      * @ORM\Column(type="datetime", nullable=true)
  248.      */
  249.     private ?\DateTime $maxExpeditionDatetime null;
  250.     /**
  251.      * @ORM\Column(type="text", nullable=true)
  252.      */
  253.     private ?string $shipmentChoices null;
  254.     /**
  255.      * @ORM\ManyToOne(targetEntity="App\Entity\System\CodeDiscount")
  256.      *
  257.      * @ORM\JoinColumn(name="code_discount_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
  258.      */
  259.     private ?CodeDiscount $codeDiscount null;
  260.     /**
  261.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Cart", inversedBy="cartChildren")
  262.      *
  263.      * @ORM\JoinColumn(name="cart_parent_id", referencedColumnName="id_cart", nullable=true)
  264.      */
  265.     private ?Cart $cartParent null;
  266.     /**
  267.      * @var ArrayCollection<int, Cart>|Cart[]
  268.      *
  269.      * @ORM\OneToMany(targetEntity="App\Entity\System\Cart", mappedBy="cartParent")
  270.      */
  271.     private $cartChildren;
  272.     public function __construct()
  273.     {
  274.         $this->currencyId 0;
  275.         $this->guestId 0;
  276.         $this->recyclable false;
  277.         $this->sync false;
  278.         $this->sincronateShopConfigurationId 0;
  279.         $this->logisticWeight 0;
  280.         $this->cartProducts = new ArrayCollection();
  281.         $this->cartChildren = new ArrayCollection();
  282.     }
  283.     /**
  284.      * @return int
  285.      */
  286.     public function getId(): int
  287.     {
  288.         return $this->id;
  289.     }
  290.     /**
  291.      * @param int|null $id
  292.      *
  293.      * @return Cart
  294.      */
  295.     public function setIdCart(?int $id): Cart
  296.     {
  297.         $this->id $id;
  298.         return $this;
  299.     }
  300.     /**
  301.      * @return Order|null
  302.      */
  303.     public function getOrder(): ?Order
  304.     {
  305.         return $this->order;
  306.     }
  307.     /**
  308.      * @param Order|null $order
  309.      *
  310.      * @return Cart
  311.      */
  312.     public function setOrder(?Order $order): Cart
  313.     {
  314.         $this->order $order;
  315.         return $this;
  316.     }
  317.     public function getCarrier(): ?Carrier
  318.     {
  319.         return $this->carrier;
  320.     }
  321.     public function setCarrier(?Carrier $carrier): Cart
  322.     {
  323.         $this->carrier $carrier;
  324.         return $this;
  325.     }
  326.     /**
  327.      * @return string
  328.      */
  329.     public function getDeliveryOption(): string
  330.     {
  331.         return $this->deliveryOption;
  332.     }
  333.     /**
  334.      * @param string $deliveryOption
  335.      *
  336.      * @return Cart
  337.      */
  338.     public function setDeliveryOption(string $deliveryOption): self
  339.     {
  340.         $this->deliveryOption $deliveryOption;
  341.         return $this;
  342.     }
  343.     /**
  344.      * @return int
  345.      */
  346.     public function getLanguageId(): int
  347.     {
  348.         return $this->LanguageId;
  349.     }
  350.     /**
  351.      * @param int $LanguageId
  352.      *
  353.      * @return Cart
  354.      */
  355.     public function setLanguageId(int $LanguageId): self
  356.     {
  357.         $this->LanguageId $LanguageId;
  358.         return $this;
  359.     }
  360.     public function getAddressDelivery(): ?Address
  361.     {
  362.         if ($this->addressDelivery && $this->addressDelivery->getId() === 0) {
  363.             return null;
  364.         }
  365.         return $this->addressDelivery;
  366.     }
  367.     public function setAddressDelivery(?Address $addressDelivery): Cart
  368.     {
  369.         $this->addressDelivery $addressDelivery;
  370.         return $this;
  371.     }
  372.     /**
  373.      * @deprecated la dirección de facturación es la del cliente del carrito
  374.      */
  375.     public function getAddressInvoice(): ?Address
  376.     {
  377.         if ($this->addressInvoice && $this->addressInvoice->getId() === 0) {
  378.             return null;
  379.         }
  380.         return $this->addressInvoice;
  381.     }
  382.     /**
  383.      * @deprecated la dirección de facturación es la del cliente del carrito
  384.      */
  385.     public function setAddressInvoice(?Address $addressInvoice): Cart
  386.     {
  387.         $this->addressInvoice $addressInvoice;
  388.         return $this;
  389.     }
  390.     /**
  391.      * @return int
  392.      */
  393.     public function getCurrencyId(): int
  394.     {
  395.         return $this->currencyId;
  396.     }
  397.     /**
  398.      * @param int $currencyId
  399.      *
  400.      * @return Cart
  401.      */
  402.     public function setCurrencyId(int $currencyId): self
  403.     {
  404.         $this->currencyId $currencyId;
  405.         return $this;
  406.     }
  407.     public function getCustomer(): ?Customer
  408.     {
  409.         return $this->customer;
  410.     }
  411.     public function setCustomer(?Customer $customer): Cart
  412.     {
  413.         $this->customer $customer;
  414.         return $this;
  415.     }
  416.     /**
  417.      * @return int
  418.      */
  419.     public function getGuestId(): int
  420.     {
  421.         return $this->guestId;
  422.     }
  423.     /**
  424.      * @param int $guestId
  425.      *
  426.      * @return Cart
  427.      */
  428.     public function setGuestId(int $guestId): self
  429.     {
  430.         $this->guestId $guestId;
  431.         return $this;
  432.     }
  433.     /**
  434.      * @return string|null
  435.      */
  436.     public function getSecureKey(): ?string
  437.     {
  438.         return $this->secureKey;
  439.     }
  440.     /**
  441.      * @param string|null $secureKey
  442.      *
  443.      * @return Cart
  444.      */
  445.     public function setSecureKey(?string $secureKey): self
  446.     {
  447.         $this->secureKey $secureKey;
  448.         return $this;
  449.     }
  450.     /**
  451.      * @return int
  452.      */
  453.     public function getRecyclable(): int
  454.     {
  455.         return $this->recyclable;
  456.     }
  457.     /**
  458.      * @param int $recyclable
  459.      *
  460.      * @return Cart
  461.      */
  462.     public function setRecyclable(int $recyclable): self
  463.     {
  464.         $this->recyclable $recyclable;
  465.         return $this;
  466.     }
  467.     /**
  468.      * @return \DateTime
  469.      */
  470.     public function getDateUpd(): \DateTime
  471.     {
  472.         return $this->dateUpd;
  473.     }
  474.     /**
  475.      * @param \DateTime $dateUpd
  476.      *
  477.      * @return Cart
  478.      */
  479.     public function setDateUpd(\DateTime $dateUpd): self
  480.     {
  481.         $this->dateUpd $dateUpd;
  482.         return $this;
  483.     }
  484.     /**
  485.      * @return \DateTime
  486.      */
  487.     public function getDateAdd(): \DateTime
  488.     {
  489.         return $this->dateAdd;
  490.     }
  491.     /**
  492.      * @param \DateTime $dateAdd
  493.      *
  494.      * @return Cart
  495.      */
  496.     public function setDateAdd(\DateTime $dateAdd): self
  497.     {
  498.         $this->dateAdd $dateAdd;
  499.         return $this;
  500.     }
  501.     /**
  502.      * @return int
  503.      */
  504.     public function getVirtual(): int
  505.     {
  506.         return $this->virtual;
  507.     }
  508.     /**
  509.      * @param int $virtual
  510.      *
  511.      * @return Cart
  512.      */
  513.     public function setVirtual(int $virtual): self
  514.     {
  515.         $this->virtual $virtual;
  516.         return $this;
  517.     }
  518.     /**
  519.      * @return bool
  520.      */
  521.     public function getSync(): bool
  522.     {
  523.         return $this->sync;
  524.     }
  525.     /**
  526.      * @param bool $sync
  527.      *
  528.      * @return Cart
  529.      */
  530.     public function setSync(bool $sync): self
  531.     {
  532.         $this->sync $sync;
  533.         return $this;
  534.     }
  535.     /**
  536.      * @return int
  537.      */
  538.     public function getSincronateShopConfigurationId(): int
  539.     {
  540.         return $this->sincronateShopConfigurationId;
  541.     }
  542.     /**
  543.      * @param int $sincronateShopConfigurationId
  544.      *
  545.      * @return Cart
  546.      */
  547.     public function setSincronateShopConfigurationId(int $sincronateShopConfigurationId): self
  548.     {
  549.         $this->sincronateShopConfigurationId $sincronateShopConfigurationId;
  550.         return $this;
  551.     }
  552.     /**
  553.      * @return int|null
  554.      */
  555.     public function getMobile(): ?int
  556.     {
  557.         return $this->mobile;
  558.     }
  559.     /**
  560.      * @param int|null $mobile
  561.      *
  562.      * @return Cart
  563.      */
  564.     public function setMobile(?int $mobile): self
  565.     {
  566.         $this->mobile $mobile;
  567.         return $this;
  568.     }
  569.     /**
  570.      * @return int|null
  571.      */
  572.     public function getDropshipping(): ?int
  573.     {
  574.         return $this->dropshipping;
  575.     }
  576.     /**
  577.      * @param int|null $dropshipping
  578.      *
  579.      * @return Cart
  580.      */
  581.     public function setDropshipping(?int $dropshipping): self
  582.     {
  583.         $this->dropshipping $dropshipping;
  584.         return $this;
  585.     }
  586.     /**
  587.      * @return string|null
  588.      */
  589.     public function getPayment(): ?string
  590.     {
  591.         return $this->payment;
  592.     }
  593.     /**
  594.      * @param string|null $payment
  595.      *
  596.      * @return Cart
  597.      */
  598.     public function setPayment(?string $payment): self
  599.     {
  600.         $this->payment $payment;
  601.         return $this;
  602.     }
  603.     public function getPaymentMethodType(): ?string
  604.     {
  605.         return $this->paymentMethodType;
  606.     }
  607.     public function setPaymentMethodType(?string $paymentMethodType): Cart
  608.     {
  609.         $this->paymentMethodType $paymentMethodType;
  610.         return $this;
  611.     }
  612.     public function getPaymentMethodId(): ?string
  613.     {
  614.         return $this->paymentMethodId;
  615.     }
  616.     public function setPaymentMethodId(?string $paymentMethodId): Cart
  617.     {
  618.         $this->paymentMethodId $paymentMethodId;
  619.         return $this;
  620.     }
  621.     /**
  622.      * @return PaymentMethod|null
  623.      */
  624.     public function getPackPaymentMethod(): ?PaymentMethod
  625.     {
  626.         return $this->packPaymentMethod;
  627.     }
  628.     /**
  629.      * @param PaymentMethod|null $packPaymentMethod
  630.      *
  631.      * @return Cart
  632.      */
  633.     public function setPackPaymentMethod(?PaymentMethod $packPaymentMethod): Cart
  634.     {
  635.         $this->packPaymentMethod $packPaymentMethod;
  636.         return $this;
  637.     }
  638.     /**
  639.      * @return string|null
  640.      */
  641.     public function getPackStoredPaymentMethodId(): ?string
  642.     {
  643.         return $this->packStoredPaymentMethodId;
  644.     }
  645.     /**
  646.      * @param string|null $packStoredPaymentMethodId
  647.      *
  648.      * @return Cart
  649.      */
  650.     public function setPackStoredPaymentMethodId(?string $packStoredPaymentMethodId): Cart
  651.     {
  652.         $this->packStoredPaymentMethodId $packStoredPaymentMethodId;
  653.         return $this;
  654.     }
  655.     /**
  656.      * @return PaymentMethod|null
  657.      */
  658.     public function getServicesPaymentMethod(): ?PaymentMethod
  659.     {
  660.         return $this->servicesPaymentMethod;
  661.     }
  662.     /**
  663.      * @param PaymentMethod|null $servicesPaymentMethod
  664.      *
  665.      * @return Cart
  666.      */
  667.     public function setServicesPaymentMethod(?PaymentMethod $servicesPaymentMethod): Cart
  668.     {
  669.         $this->servicesPaymentMethod $servicesPaymentMethod;
  670.         return $this;
  671.     }
  672.     /**
  673.      * @return string|null
  674.      */
  675.     public function getServicesStoredPaymentMethodId(): ?string
  676.     {
  677.         return $this->servicesStoredPaymentMethodId;
  678.     }
  679.     /**
  680.      * @param string|null $servicesStoredPaymentMethodId
  681.      *
  682.      * @return Cart
  683.      */
  684.     public function setServicesStoredPaymentMethodId(?string $servicesStoredPaymentMethodId): Cart
  685.     {
  686.         $this->servicesStoredPaymentMethodId $servicesStoredPaymentMethodId;
  687.         return $this;
  688.     }
  689.     /**
  690.      * @return float|null
  691.      */
  692.     public function getTotalProducts(): ?float
  693.     {
  694.         return $this->totalProducts;
  695.     }
  696.     /**
  697.      * @param float|null $totalProducts
  698.      *
  699.      * @return Cart
  700.      */
  701.     public function setTotalProducts(?float $totalProducts): self
  702.     {
  703.         $this->totalProducts $totalProducts;
  704.         return $this;
  705.     }
  706.     /**
  707.      * @return float|null
  708.      */
  709.     public function getTotalShipping(): ?float
  710.     {
  711.         return $this->totalShipping;
  712.     }
  713.     /**
  714.      * @param float|null $totalShipping
  715.      *
  716.      * @return Cart
  717.      */
  718.     public function setTotalShipping(?float $totalShipping): self
  719.     {
  720.         $this->totalShipping $totalShipping;
  721.         return $this;
  722.     }
  723.     /**
  724.      * @param array<CartProduct>|ArrayCollection<int, CartProduct> $cartProducts
  725.      *
  726.      * @return $this
  727.      */
  728.     public function setCartProducts($cartProducts): Cart
  729.     {
  730.         $this->cartProducts $cartProducts;
  731.         return $this;
  732.     }
  733.     public function addCartProduct(CartProduct $cartProduct): Cart
  734.     {
  735.         if (!$this->cartProducts->contains($cartProduct)) {
  736.             $this->cartProducts[] = $cartProduct;
  737.             $cartProduct->setCart($this);
  738.         }
  739.         return $this;
  740.     }
  741.     public function removeCartProduct(CartProduct $cartProduct): Cart
  742.     {
  743.         if ($this->cartProducts->contains($cartProduct)) {
  744.             $this->cartProducts->removeElement($cartProduct);
  745.         }
  746.         return $this;
  747.     }
  748.     /**
  749.      * @param CartProduct[] $cartProducts
  750.      */
  751.     public function addCartProducts(array $cartProducts): void
  752.     {
  753.         foreach ($cartProducts as $cartProduct) {
  754.             $this->cartProducts->add($cartProduct);
  755.         }
  756.     }
  757.     /**
  758.      * @return CartProduct[]|Collection<int, CartProduct>
  759.      */
  760.     public function getCartProducts()
  761.     {
  762.         return $this->cartProducts;
  763.     }
  764.     public function getCarrierComment(): ?string
  765.     {
  766.         return $this->carrierComment;
  767.     }
  768.     public function setCarrierComment(?string $carrierComment): Cart
  769.     {
  770.         $this->carrierComment $carrierComment;
  771.         return $this;
  772.     }
  773.     public function getRefOrderSupplier(): ?string
  774.     {
  775.         return $this->refOrderSupplier;
  776.     }
  777.     public function setRefOrderSupplier(?string $refOrderSupplier): Cart
  778.     {
  779.         $this->refOrderSupplier $refOrderSupplier;
  780.         return $this;
  781.     }
  782.     public function isSystem(): bool
  783.     {
  784.         return $this->system;
  785.     }
  786.     public function setSystem(bool $system): Cart
  787.     {
  788.         $this->system $system;
  789.         return $this;
  790.     }
  791.     public function getSellingChannel(): ?string
  792.     {
  793.         return $this->sellingChannel;
  794.     }
  795.     public function setSellingChannel(?string $sellingChannel): Cart
  796.     {
  797.         $this->sellingChannel $sellingChannel;
  798.         return $this;
  799.     }
  800.     public function getAdditionalParameters(): ?string
  801.     {
  802.         return $this->additionalParameters;
  803.     }
  804.     public function setAdditionalParameters(?string $additionalParameters): Cart
  805.     {
  806.         $this->additionalParameters $additionalParameters;
  807.         return $this;
  808.     }
  809.     public function getDateAmazon(): ?\DateTime
  810.     {
  811.         return $this->dateAmazon;
  812.     }
  813.     public function setDateAmazon(?\DateTime $dateAmazon): Cart
  814.     {
  815.         $this->dateAmazon $dateAmazon;
  816.         return $this;
  817.     }
  818.     public function isFba(): bool
  819.     {
  820.         return $this->fba;
  821.     }
  822.     public function setFba(bool $fba): Cart
  823.     {
  824.         $this->fba $fba;
  825.         return $this;
  826.     }
  827.     public function getMaxDeliveryDatetime(): ?\DateTime
  828.     {
  829.         return $this->maxDeliveryDatetime;
  830.     }
  831.     public function setMaxDeliveryDatetime(?\DateTime $maxDeliveryDatetime): Cart
  832.     {
  833.         $this->maxDeliveryDatetime $maxDeliveryDatetime;
  834.         return $this;
  835.     }
  836.     public function getMaxExpeditionDatetime(): ?\DateTime
  837.     {
  838.         return $this->maxExpeditionDatetime;
  839.     }
  840.     public function setMaxExpeditionDatetime(?\DateTime $maxExpeditionDatetime): Cart
  841.     {
  842.         $this->maxExpeditionDatetime $maxExpeditionDatetime;
  843.         return $this;
  844.     }
  845.     public function getCodeDiscount(): ?CodeDiscount
  846.     {
  847.         if ($this->codeDiscount && $this->codeDiscount->getId() === 0) {
  848.             return null;
  849.         }
  850.         return $this->codeDiscount;
  851.     }
  852.     public function setCodeDiscount(?CodeDiscount $codeDiscount): Cart
  853.     {
  854.         $this->codeDiscount $codeDiscount;
  855.         return $this;
  856.     }
  857.     public function getShipmentChoices(): ?string
  858.     {
  859.         return $this->shipmentChoices;
  860.     }
  861.     public function setShipmentChoices(?string $shipmentChoices): Cart
  862.     {
  863.         $this->shipmentChoices $shipmentChoices;
  864.         return $this;
  865.     }
  866.     public function getCartParent(): ?Cart
  867.     {
  868.         return $this->cartParent;
  869.     }
  870.     public function setCartParent(?Cart $cartParent): Cart
  871.     {
  872.         $this->cartParent $cartParent;
  873.         return $this;
  874.     }
  875.     /**
  876.      * @return Collection<int, Cart>
  877.      */
  878.     public function getCartChildren(): Collection
  879.     {
  880.         return $this->cartChildren;
  881.     }
  882.     public function addCart(Cart $cart): Cart
  883.     {
  884.         if (!$this->cartChildren->contains($cart)) {
  885.             $this->cartChildren[] = $cart;
  886.             $cart->setCartParent($this);
  887.         }
  888.         return $this;
  889.     }
  890.     public function getLogisticWeight(): ?float
  891.     {
  892.         return $this->logisticWeight;
  893.     }
  894.     public function setLogisticWeight(?float $logisticWeight): void
  895.     {
  896.         $this->logisticWeight $logisticWeight;
  897.     }
  898. }