src/Entity/System/Cart.php line 30

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