src/Entity/System/Product.php line 37

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. /**
  7. * Product
  8. *
  9. * @ORM\Table(name="ps_product",
  10. * uniqueConstraints={
  11. *
  12. * @ORM\UniqueConstraint(name="unique_reference", columns={"reference"})
  13. * },
  14. * indexes={
  15. *
  16. * @ORM\Index(name="key_reference", columns={"reference"}),
  17. * @ORM\Index(name="active", columns={"active"}),
  18. * @ORM\Index(name="traducir", columns={"traducir"}),
  19. * @ORM\Index(name="indexed", columns={"indexed"}),
  20. * @ORM\Index(name="ean13_2", columns={"ean13_2"}),
  21. * @ORM\Index(name="visibility", columns={"visibility"}),
  22. * @ORM\Index(name="ean13", columns={"ean13"}),
  23. * @ORM\Index(name="condition", columns={"condition"}),
  24. * @ORM\Index(name="active_is_virtual_sincronizar", columns={"active","is_virtual","sincronizar"}),
  25. * @ORM\Index(name="is_virtual", columns={"is_virtual"}),
  26. * @ORM\Index(name="id_category_default", columns={"id_category_default"}),
  27. * @ORM\Index(name="sincronizar", columns={"sincronizar"}),
  28. * @ORM\Index(name="date_add", columns={"date_add"})
  29. * }
  30. * )
  31. *
  32. * @ORM\Entity(repositoryClass="App\Repository\System\ProductRepository")
  33. */
  34. class Product
  35. {
  36. public const SELLING_CHANNEL_BIGBUY_EU = 'BIGBUY_EU';
  37. public const SELLING_CHANNEL_DROPSHIPPING = 'DROPSHIPPING';
  38. public const SELLING_CHANNELS_ALLOWED_INDEX = [
  39. self::SELLING_CHANNEL_DROPSHIPPING => true,
  40. self::SELLING_CHANNEL_BIGBUY_EU => true,
  41. ];
  42. public const SHOP_360_SUPPLY = 95079;
  43. public const SHOP_360_DISTRICT = 95082;
  44. public const SHOP_360_AVENNUE = 95083;
  45. public const SHOP_360_IMPULSE = 95085;
  46. public const SHOP_360_CAPITAL = 95092;
  47. public const SHOP_360_PRESTIGE = 95093;
  48. public const SHOP_360_SHOWTIME = 95094;
  49. public const SHOPIFY_PRODUCTS_IDS = [self::SHOP_360_SUPPLY, self::SHOP_360_DISTRICT, self::SHOP_360_AVENNUE, self::SHOP_360_IMPULSE, self::SHOP_360_CAPITAL, self::SHOP_360_PRESTIGE, self::SHOP_360_SHOWTIME];
  50. public const PRESTASHOP_PRODUCTS_IDS = [41256, 41257, 41259, 95079, 95081, 95082, 95083, 95084, 95085, 95092, 95093, 95094];
  51. public const PRESTASHOP_OLD_PRODUCTS_IDS = [5002, 5003, 5007, 5015, 5019, 5025, 5029, 5036, 5038, 6450, 6460, 6456, 6457, 9854, 12452];
  52. public const SHOP_DISCOUNT = 0.5;
  53. public const SHOP_360_PRODUCTS = [41256, 41259, 206924, 206923, 206922, 206921, 206920, 206919, 273397, 273398];
  54. public const INIT_AMOUNT_PRODUCT_ID = 34990;
  55. public const MONEYBOX_PRODUCT_ID = 13690;
  56. public const PACK_MARKETPLACES_ANNUAL_PRODUCT_ID = 95301;
  57. public const PACK_MARKETPLACES_ANNUAL_PRODUCT_SKU = 'PACKMARKETPLACES-A';
  58. public const PACK_MARKETPLACES_BIANNUAL_PRODUCT_ID = 95303;
  59. public const PACK_MARKETPLACES_BIANNUAL_PRODUCT_SKU = 'PACKMARKETPLACES-S';
  60. public const PACK_MARKETPLACES_MONTHLY_PRODUCT_ID = 95302;
  61. public const PACK_MARKETPLACES_MONTHLY_PRODUCT_SKU = 'PACKMARKETPLACES-M';
  62. public const NEW_PACK_MARKETPLACES_ANNUAL_PRODUCT_ID = 165016;
  63. public const NEW_PACK_MARKETPLACES_BIANNUAL_PRODUCT_ID = 165028;
  64. public const NEW_PACK_MARKETPLACES_MONTHLY_PRODUCT_ID = 165024;
  65. public const NEW_PACK_ENTERPRISE_MONTHLY_PRODUCT_ID = 100197;
  66. public const NEW_PACK_ENTERPRISE_BIANNUAL_PRODUCT_ID = 100198;
  67. public const NEW_PACK_ENTERPRISE_ANNUAL_PRODUCT_ID = 100196;
  68. public const NEW_PACK_PRO_MONTHLY_PRODUCT_ID = 34986;
  69. public const NEW_PACK_PRO_BIANNUAL_PRODUCT_ID = 34989;
  70. public const NEW_PACK_PRO_ANNUAL_PRODUCT_ID = 34988;
  71. public const NEW_PACK_DROPSHIP_MONTHLY_PRODUCT_ID = 100194;
  72. public const NEW_PACK_DROPSHIP_BIANNUAL_PRODUCT_ID = 100195;
  73. public const NEW_PACK_DROPSHIP_ANNUAL_PRODUCT_ID = 100193;
  74. public const PACK_PREMIUM_MONTHLY_PRODUCT_ID = 34984;
  75. public const PACK_PREMIUM_BIANNUAL_PRODUCT_ID = 34987;
  76. public const PACK_PREMIUM_ANNUAL_PRODUCT_ID = 34985;
  77. public const PACK_ECOMMERCE_ANNUAL_PRODUCT_ID = 95298;
  78. public const PACK_ECOMMERCE_ANNUAL_PRODUCT_SKU = 'PACKECOMMERCE-A';
  79. public const PACK_ECOMMERCE_BIANNUAL_PRODUCT_ID = 95300;
  80. public const PACK_ECOMMERCE_BIANNUAL_PRODUCT_SKU = 'PACKECOMMERCE-S';
  81. public const PACK_ECOMMERCE_MONTHLY_PRODUCT_ID = 95299;
  82. public const PACK_ECOMMERCE_MONTHLY_PRODUCT_SKU = 'PACKECOMMERCE-M';
  83. public const PACK_B2B_PRODUCT_ID = 100185;
  84. public const PACK_B2B_PRODUCT_REFERENCE = 'PACKB2B';
  85. public const PACK_BUSINESS_ANNUAL_PRODUCT_ID = 34982;
  86. public const PACK_BUSINESS_BIANNUAL_PRODUCT_ID = 34983;
  87. public const PACK_BUSINESS_MONTHLY_PRODUCT_ID = 34981;
  88. public const PRESTASHOP_CONNECTOR_ID = 95290;
  89. public const WOOCOMMERCE_CONNECTOR_ID = 121732;
  90. public const SHOPIFY_CONNECTOR_ID = 95291;
  91. public const WIX_CONNECTOR_ID = 364343;
  92. public const AMAZON_EBAY_CONNECTOR_ID = 95289;
  93. public const ALIEXPRESS_CONNECTOR_ID = 102221;
  94. public const FNAC_CONNECTOR_ID = 116983;
  95. public const CDISCOUNT_CONNECTOR_ID = 120519;
  96. public const RAKUTEN_CONNECTOR_ID = 102222;
  97. public const CARREFOUR_ES_CONNECTOR_ID = 116984;
  98. public const DARTY_CONNECTOR_ID = 120520;
  99. public const EPRICE_CONNECTOR_ID = 121729;
  100. public const RUEDUCOMMERCE_CONNECTOR_ID = 121731;
  101. public const CONFORAMA_CONNECTOR_ID = 121730;
  102. public const KAUFLAND_CONNECTOR_ID = 131973;
  103. public const BOL_CONNECTOR_ID = 131974;
  104. public const MAGENTO_CONECTOR_ID = 169260;
  105. public const MARKETPLACES_5x = 218735;
  106. public const PC_COMPONENTES_CONNECTOR_ID = 206126;
  107. public const WORTEN_CONNECTOR_ID = 270665;
  108. public const ALLEGRO_CONNECTOR_ID = 314083;
  109. public const LEROY_MERLIN_CONNECTOR_ID = 347188;
  110. public const CDON_CONNECTOR_ID = 442297;
  111. public const BACKMARKET_CONNECTOR_ID = 448991;
  112. public const CARREFOUR_FR_CONNECTOR_ID = 449719;
  113. public const ELECLERC_CONNECTOR_ID = 477824;
  114. public const AMAZON_RAKUTEN_CONNECTOR_ID = 756394;
  115. public const AMAZON_WORTEN_CONNECTOR_ID = 758387;
  116. public const AMAZON_KAUFLAND_CONNECTOR_ID = 758391;
  117. public const AMAZON_FNAC_CONNECTOR_ID = 758419;
  118. public const AMAZON_EPRICE_CONNECTOR_ID = 758421;
  119. public const AMAZON_CDON_CONNECTOR_ID = 758422;
  120. public const EBAY_CONNECTOR_ID = 758423;
  121. public const AMAZON_CONNECTOR_ID = 806955;
  122. public const MEDIAMARKT_ES_CONNECTOR_ID = 1014998;
  123. public const MEDIAMARKT_DE_CONNECTOR_ID = 1015099;
  124. public const MEDIAMARKT_IT_CONNECTOR_ID = 1106825;
  125. public const MANOMANO_CONNECTOR_ID = 1118101;
  126. public const REFURBED_CONNECTOR_ID = 1118102;
  127. public const SPRINTER_CONNECTOR_ID = 1118103;
  128. public const CLUBEFASHION_CONNECTOR_ID = 1118104;
  129. public const DECATHLON_CONNECTOR_ID = 1300703;
  130. public const MIRAVIA_CONNECTOR_ID = 673854;
  131. public const WISH_CONNECTOR_ID = 448860;
  132. public const SHOPIFY_SHOP = 95084;
  133. public const PACKS_PRODUCT_IDS = [
  134. self::PACK_MARKETPLACES_ANNUAL_PRODUCT_ID,
  135. self::PACK_MARKETPLACES_BIANNUAL_PRODUCT_ID,
  136. self::PACK_MARKETPLACES_MONTHLY_PRODUCT_ID,
  137. self::NEW_PACK_MARKETPLACES_ANNUAL_PRODUCT_ID,
  138. self::NEW_PACK_MARKETPLACES_BIANNUAL_PRODUCT_ID,
  139. self::NEW_PACK_MARKETPLACES_MONTHLY_PRODUCT_ID,
  140. self::PACK_ECOMMERCE_ANNUAL_PRODUCT_ID,
  141. self::PACK_ECOMMERCE_BIANNUAL_PRODUCT_ID,
  142. self::PACK_ECOMMERCE_MONTHLY_PRODUCT_ID,
  143. self::PACK_B2B_PRODUCT_ID,
  144. self::NEW_PACK_ENTERPRISE_MONTHLY_PRODUCT_ID,
  145. self::NEW_PACK_ENTERPRISE_BIANNUAL_PRODUCT_ID,
  146. self::NEW_PACK_ENTERPRISE_ANNUAL_PRODUCT_ID,
  147. self::NEW_PACK_PRO_MONTHLY_PRODUCT_ID,
  148. self::NEW_PACK_PRO_BIANNUAL_PRODUCT_ID,
  149. self::NEW_PACK_PRO_ANNUAL_PRODUCT_ID,
  150. self::NEW_PACK_DROPSHIP_MONTHLY_PRODUCT_ID,
  151. self::NEW_PACK_DROPSHIP_BIANNUAL_PRODUCT_ID,
  152. self::NEW_PACK_DROPSHIP_ANNUAL_PRODUCT_ID,
  153. self::PACK_PREMIUM_MONTHLY_PRODUCT_ID,
  154. self::PACK_PREMIUM_BIANNUAL_PRODUCT_ID,
  155. self::PACK_PREMIUM_ANNUAL_PRODUCT_ID,
  156. self::PACK_BUSINESS_MONTHLY_PRODUCT_ID,
  157. self::PACK_BUSINESS_BIANNUAL_PRODUCT_ID,
  158. self::PACK_BUSINESS_ANNUAL_PRODUCT_ID,
  159. ];
  160. public const AMAZON_COMBINED_CONNECTOR_PRODUCT_IDS = [
  161. self::AMAZON_CDON_CONNECTOR_ID,
  162. self::AMAZON_EPRICE_CONNECTOR_ID,
  163. self::AMAZON_FNAC_CONNECTOR_ID,
  164. self::AMAZON_KAUFLAND_CONNECTOR_ID,
  165. self::AMAZON_RAKUTEN_CONNECTOR_ID,
  166. self::AMAZON_WORTEN_CONNECTOR_ID,
  167. ];
  168. public const ALLOWED_CONNECTOR_PRODUCT_IDS_BY_PACK_ID = [
  169. Pack::PACK_FREE => [],
  170. Pack::PACK_B2B => [],
  171. Pack::PACK_ECOMMERCE => [
  172. self::PRESTASHOP_CONNECTOR_ID,
  173. self::WOOCOMMERCE_CONNECTOR_ID,
  174. self::SHOPIFY_CONNECTOR_ID,
  175. self::WIX_CONNECTOR_ID,
  176. self::SHOP_360_SUPPLY,
  177. self::SHOP_360_DISTRICT,
  178. self::SHOP_360_AVENNUE,
  179. self::SHOP_360_IMPULSE,
  180. self::SHOP_360_CAPITAL,
  181. self::SHOP_360_PRESTIGE,
  182. self::SHOP_360_SHOWTIME,
  183. ],
  184. Pack::PACK_MARKETPLACES => [
  185. self::AMAZON_EBAY_CONNECTOR_ID,
  186. self::ALIEXPRESS_CONNECTOR_ID,
  187. self::FNAC_CONNECTOR_ID,
  188. self::CDISCOUNT_CONNECTOR_ID,
  189. self::RAKUTEN_CONNECTOR_ID,
  190. self::CARREFOUR_ES_CONNECTOR_ID,
  191. self::DARTY_CONNECTOR_ID,
  192. self::EPRICE_CONNECTOR_ID,
  193. self::RUEDUCOMMERCE_CONNECTOR_ID,
  194. self::CONFORAMA_CONNECTOR_ID,
  195. self::KAUFLAND_CONNECTOR_ID,
  196. self::BOL_CONNECTOR_ID,
  197. self::SHOPIFY_CONNECTOR_ID,
  198. self::PRESTASHOP_CONNECTOR_ID,
  199. self::WOOCOMMERCE_CONNECTOR_ID,
  200. self::MARKETPLACES_5x,
  201. self::PC_COMPONENTES_CONNECTOR_ID,
  202. self::WORTEN_CONNECTOR_ID,
  203. self::ALLEGRO_CONNECTOR_ID,
  204. self::WIX_CONNECTOR_ID,
  205. self::LEROY_MERLIN_CONNECTOR_ID,
  206. self::CDON_CONNECTOR_ID,
  207. self::BACKMARKET_CONNECTOR_ID,
  208. self::CARREFOUR_FR_CONNECTOR_ID,
  209. self::ELECLERC_CONNECTOR_ID,
  210. self::WISH_CONNECTOR_ID,
  211. self::AMAZON_RAKUTEN_CONNECTOR_ID,
  212. self::AMAZON_WORTEN_CONNECTOR_ID,
  213. self::AMAZON_KAUFLAND_CONNECTOR_ID,
  214. self::AMAZON_FNAC_CONNECTOR_ID,
  215. self::AMAZON_EPRICE_CONNECTOR_ID,
  216. self::AMAZON_CDON_CONNECTOR_ID,
  217. self::EBAY_CONNECTOR_ID,
  218. self::AMAZON_CONNECTOR_ID,
  219. self::MEDIAMARKT_ES_CONNECTOR_ID,
  220. self::MEDIAMARKT_DE_CONNECTOR_ID,
  221. self::MEDIAMARKT_IT_CONNECTOR_ID,
  222. self::MANOMANO_CONNECTOR_ID,
  223. self::REFURBED_CONNECTOR_ID,
  224. self::SPRINTER_CONNECTOR_ID,
  225. self::CLUBEFASHION_CONNECTOR_ID,
  226. self::DECATHLON_CONNECTOR_ID,
  227. self::MIRAVIA_CONNECTOR_ID,
  228. self::SHOP_360_SUPPLY,
  229. self::SHOP_360_DISTRICT,
  230. self::SHOP_360_AVENNUE,
  231. self::SHOP_360_IMPULSE,
  232. self::SHOP_360_CAPITAL,
  233. self::SHOP_360_PRESTIGE,
  234. self::SHOP_360_SHOWTIME,
  235. ],
  236. ];
  237. public const SUPPORT_PRODUCT_ID = 5022;
  238. public const MAINTENANCE_PRODUCT_ID = 1035502;
  239. public const SUPPORT_AND_MAINTENANCE_PRODUCTS = [
  240. self::SUPPORT_PRODUCT_ID,
  241. self::MAINTENANCE_PRODUCT_ID,
  242. ];
  243. public const CONDITION_NEW_NAME = 'NEW';
  244. public const CONDITION_NEW_ID = 1;
  245. public const CONDITION_REFURBISHED_A_NAME = 'REFURBISHED_A';
  246. public const CONDITION_REFURBISHED_A_ID = 2;
  247. public const CONDITION_REFURBISHED_A_PLUS_NAME = 'REFURBISHED_A_PLUS';
  248. public const CONDITION_REFURBISHED_A_PLUS_ID = 3;
  249. public const CONDITION_REFURBISHED_B_NAME = 'REFURBISHED_B';
  250. public const CONDITION_REFURBISHED_B_ID = 4;
  251. public const CONDITION_REFURBISHED_C_NAME = 'REFURBISHED_C';
  252. public const CONDITION_REFURBISHED_C_ID = 5;
  253. public const CONDITION_REFURBISHED_D_NAME = 'REFURBISHED_D';
  254. public const CONDITION_REFURBISHED_D_ID = 6;
  255. public const CONDITION_IDS_INDEXED_BY_NAME = [
  256. self::CONDITION_NEW_NAME => self::CONDITION_NEW_ID,
  257. self::CONDITION_REFURBISHED_A_NAME => self::CONDITION_REFURBISHED_A_ID,
  258. self::CONDITION_REFURBISHED_A_PLUS_NAME => self::CONDITION_REFURBISHED_A_PLUS_ID,
  259. self::CONDITION_REFURBISHED_B_NAME => self::CONDITION_REFURBISHED_B_ID,
  260. self::CONDITION_REFURBISHED_C_NAME => self::CONDITION_REFURBISHED_C_ID,
  261. self::CONDITION_REFURBISHED_D_NAME => self::CONDITION_REFURBISHED_D_ID,
  262. ];
  263. public const STRIPE_AVAILABLE_SUBSCRIPTION_PRODUCT_IDS = [
  264. self::PACK_ECOMMERCE_MONTHLY_PRODUCT_ID,
  265. self::PACK_ECOMMERCE_BIANNUAL_PRODUCT_ID,
  266. self::PACK_ECOMMERCE_ANNUAL_PRODUCT_ID,
  267. self::PACK_MARKETPLACES_MONTHLY_PRODUCT_ID,
  268. self::PACK_MARKETPLACES_BIANNUAL_PRODUCT_ID,
  269. self::PACK_MARKETPLACES_ANNUAL_PRODUCT_ID,
  270. self::NEW_PACK_DROPSHIP_MONTHLY_PRODUCT_ID,
  271. self::NEW_PACK_DROPSHIP_BIANNUAL_PRODUCT_ID,
  272. self::NEW_PACK_DROPSHIP_ANNUAL_PRODUCT_ID,
  273. self::NEW_PACK_ENTERPRISE_MONTHLY_PRODUCT_ID,
  274. self::NEW_PACK_ENTERPRISE_BIANNUAL_PRODUCT_ID,
  275. self::NEW_PACK_ENTERPRISE_ANNUAL_PRODUCT_ID,
  276. self::PACK_PREMIUM_ANNUAL_PRODUCT_ID,
  277. self::NEW_PACK_PRO_MONTHLY_PRODUCT_ID,
  278. self::NEW_PACK_PRO_BIANNUAL_PRODUCT_ID,
  279. self::NEW_PACK_PRO_ANNUAL_PRODUCT_ID,
  280. ];
  281. /**
  282. * @var int
  283. *
  284. * @ORM\Column(name="id_product", type="integer")
  285. *
  286. * @ORM\Id
  287. *
  288. * @ORM\GeneratedValue(strategy="AUTO")
  289. */
  290. private $id;
  291. /**
  292. * @ORM\ManyToOne(targetEntity="TaxRuleGroup")
  293. *
  294. * @ORM\JoinColumn(name="id_tax", referencedColumnName="id_tax_rules_group")
  295. */
  296. private ?TaxRuleGroup $taxRuleGroup;
  297. /**
  298. * @ORM\ManyToOne(targetEntity="Supplier")
  299. *
  300. * @ORM\JoinColumn(name="id_supplier", referencedColumnName="id", nullable=true)
  301. */
  302. private ?Supplier $supplier = null;
  303. /**
  304. * @var string|null
  305. *
  306. * @ORM\Column(name="ean13", type="string", length=13, nullable=true)
  307. */
  308. private $ean;
  309. /**
  310. * @var string|null
  311. *
  312. * @ORM\Column(type="string", length=12, nullable=true)
  313. */
  314. private $upc;
  315. /**
  316. * @var float
  317. *
  318. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  319. */
  320. private $ecotax;
  321. /**
  322. * @var int
  323. *
  324. * @ORM\Column(type="integer", length=10, nullable=false, options={"default" : 0})
  325. */
  326. private $quantity;
  327. /**
  328. * @var int
  329. *
  330. * @ORM\Column(type="integer", length=10, nullable=false, options={"default" : 1})
  331. */
  332. private $minimalQuantity;
  333. /**
  334. * @var string
  335. *
  336. * @ORM\Column(name="reference", type="string", length=32, nullable=false)
  337. */
  338. private $sku;
  339. /**
  340. * @var bool
  341. *
  342. * @ORM\Column(name="active", type="boolean")
  343. */
  344. private $active;
  345. /**
  346. * @var Collection<string, ProductImage>
  347. *
  348. * @ORM\OneToMany(targetEntity="ProductImage", mappedBy="product", cascade={"persist"}, indexBy="name")
  349. */
  350. private $productImages;
  351. /**
  352. * @var Collection<int, ProductPrice>
  353. *
  354. * @ORM\OneToMany(targetEntity="ProductPrice", mappedBy="product", cascade={"persist"})
  355. */
  356. private $productPrices;
  357. /**
  358. * @var Collection<int, ProductAttribute>
  359. *
  360. * @ORM\OneToMany(targetEntity="ProductAttribute", mappedBy="product", cascade={"persist"})
  361. */
  362. private $productAttributes;
  363. /**
  364. * @var Collection<int, ProductDate>
  365. *
  366. * @ORM\OneToMany(targetEntity="ProductDate", mappedBy="product", cascade={"persist"})
  367. */
  368. private $productDates;
  369. /**
  370. * @var Collection<int, ProductStock>
  371. *
  372. * @ORM\OneToMany(targetEntity="ProductStock", mappedBy="product", cascade={"persist", "remove"})
  373. */
  374. private $productStocks;
  375. /**
  376. * @var Collection<int, OrderDetail>
  377. *
  378. * @ORM\OneToMany(targetEntity="App\Entity\System\OrderDetail", mappedBy="product")
  379. */
  380. private $orderDetails;
  381. /**
  382. * @var Collection<int, CartProduct>
  383. *
  384. * @ORM\OneToMany(targetEntity="App\Entity\System\CartProduct", mappedBy="product")
  385. */
  386. private $cartProducts;
  387. /**
  388. * @var int|null
  389. *
  390. * @ORM\Column(name="id_category_default", type="integer", length=10, nullable=true)
  391. */
  392. private $categoryDefault;
  393. /**
  394. * @var bool
  395. *
  396. * @ORM\Column(type="boolean", options={"default" : 0})
  397. */
  398. private $sincronizar;
  399. /**
  400. * @var float
  401. *
  402. * @ORM\Column(type="float", nullable=false)
  403. */
  404. private $weight;
  405. /**
  406. * @var string|null
  407. *
  408. * @ORM\Column(name="ean13_2", type="string", length=13, nullable=true)
  409. */
  410. private $eanVirtual;
  411. /**
  412. * @var float
  413. *
  414. * @ORM\Column(type="float", nullable=false)
  415. */
  416. private $height;
  417. /**
  418. * @var float
  419. *
  420. * @ORM\Column(type="float", nullable=false)
  421. */
  422. private $width;
  423. /**
  424. * @var float
  425. *
  426. * @ORM\Column(type="float", nullable=false)
  427. */
  428. private $depth;
  429. /**
  430. * @var string|null
  431. *
  432. * @ORM\Column(type="string", length=16, nullable=true)
  433. */
  434. private $intrastat;
  435. /**
  436. * @var bool
  437. *
  438. * @ORM\Column(type="boolean", options={"default" : 0})
  439. */
  440. private $isVirtual;
  441. /**
  442. * @var Collection<int, MinimumOrderQuantity>
  443. *
  444. * @ORM\OneToMany(targetEntity="MinimumOrderQuantity", mappedBy="product", cascade={"persist", "remove"})
  445. */
  446. private $minimumOrderQuantitys;
  447. /**
  448. * @ORM\Column(name="date_add", type="datetime")
  449. */
  450. private \DateTime $dateAdd;
  451. /**
  452. * @ORM\Column(name="date_upd", type="datetime")
  453. */
  454. private \DateTime $dateUpd;
  455. /**
  456. * @ORM\Column(name="date_next", type="datetime")
  457. */
  458. private \DateTime $dateNext;
  459. /**
  460. * @ORM\Column(name="date_new_stock", type="datetime")
  461. */
  462. private \DateTime $dateNewStock;
  463. /**
  464. * @ORM\Column(name="available_date", type="datetime", nullable=false)
  465. */
  466. private \DateTime $availableDate;
  467. /**
  468. * @ORM\Column(name="palet", type="integer", nullable=true, options={"default" : 0})
  469. */
  470. private ?int $palletUnits;
  471. /**
  472. * @ORM\Column(name="box", type="integer", nullable=true, options={"default" : 0})
  473. */
  474. private ?int $boxUnits;
  475. /**
  476. * @ORM\Column(name="video", type="string", length=64, nullable=true)
  477. */
  478. private ?string $video;
  479. /**
  480. * @var Brand|null
  481. *
  482. * @ORM\ManyToOne(targetEntity="Brand")
  483. *
  484. * @ORM\JoinColumn(name="id_manufacturer", referencedColumnName="id_manufacturer")
  485. */
  486. private $manufacturer;
  487. /**
  488. * @var Collection<int, Subscription>
  489. *
  490. * @ORM\OneToMany(targetEntity="Subscription", mappedBy="product", cascade={"persist"})
  491. */
  492. private $subscriptions;
  493. /**
  494. * @var string|null
  495. *
  496. * @ORM\Column(type="string", length=1, nullable=true)
  497. */
  498. private $logisticClass;
  499. /**
  500. * @var int
  501. *
  502. * @ORM\Column(type="integer", length=10, options={"default" : 1}, nullable=false)
  503. */
  504. private $idShopDefault;
  505. /**
  506. * @var float
  507. *
  508. * @ORM\Column(type="float", options={"default" : 0}, nullable=false)
  509. */
  510. private $unitPriceRatio;
  511. /**
  512. * @var float
  513. *
  514. * @ORM\Column(type="float", nullable=false, options={"default" : 0})
  515. */
  516. private $additionalShippingCost;
  517. /**
  518. * @var string|null
  519. *
  520. * @ORM\Column(type="string", length=32, nullable=true)
  521. */
  522. private $supplierReference;
  523. /**
  524. * @var bool
  525. *
  526. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  527. */
  528. private $quantityDiscount;
  529. /**
  530. * @var bool
  531. *
  532. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  533. */
  534. private $customizable;
  535. /**
  536. * @var bool
  537. *
  538. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  539. */
  540. private $uploadableFiles;
  541. /**
  542. * @var bool
  543. *
  544. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  545. */
  546. private $textFields;
  547. /**
  548. * @var bool
  549. *
  550. * @ORM\Column(type="boolean", nullable=false, options={"default" : 1})
  551. */
  552. private $availableForOrder;
  553. /**
  554. * @var \DateTime|null
  555. *
  556. * @ORM\Column(type="date", nullable=true)
  557. */
  558. private $dateNew;
  559. /**
  560. * @var int
  561. *
  562. * @ORM\Column(type="integer", name="container_20p", nullable=false, length=10, options={"default" : 0})
  563. */
  564. private $container20p;
  565. /**
  566. * @var int
  567. *
  568. * @ORM\Column(type="integer", name="container_40p", nullable=false, length=10, options={"default" : 0})
  569. */
  570. private $container40p;
  571. /**
  572. * @var string|null
  573. *
  574. * @ORM\Column(type="string", length=50, nullable=true)
  575. */
  576. private $picking;
  577. /**
  578. * @var int
  579. *
  580. * @ORM\Column(type="integer", nullable=false, options={"default" : 0})
  581. */
  582. private $minimumQty;
  583. /**
  584. * @var string
  585. *
  586. * @ORM\Column(type="string", name="`condition`", length=32, nullable=false, options={"default" : "NEW"})
  587. */
  588. private $condition;
  589. /**
  590. * @var bool
  591. *
  592. * @ORM\Column(type="boolean", nullable=false, options={"default" : 1})
  593. */
  594. private $showPrice;
  595. /**
  596. * @var bool
  597. *
  598. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  599. */
  600. private $indexed;
  601. /**
  602. * @var string
  603. *
  604. * @ORM\Column(type="string", length=255, nullable=false)
  605. */
  606. private $visibility;
  607. /**
  608. * @var bool
  609. *
  610. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  611. */
  612. private $cacheIsPack;
  613. /**
  614. * @var bool
  615. *
  616. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  617. */
  618. private $cacheHasAttachments;
  619. /**
  620. * @var int|null
  621. *
  622. * @ORM\Column(type="integer", nullable=true)
  623. */
  624. private $cacheDefaultAttribute;
  625. /**
  626. * @var bool
  627. *
  628. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  629. */
  630. private $advancedStockManagement;
  631. /**
  632. * @var string|null
  633. *
  634. * @ORM\Column(type="string", length=20, nullable=true)
  635. */
  636. private $etiquetas;
  637. /**
  638. * @var bool
  639. *
  640. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  641. */
  642. private $traducir;
  643. /**
  644. * @var bool
  645. *
  646. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  647. */
  648. private $exportar;
  649. /**
  650. * @var string|null
  651. *
  652. * @ORM\Column(type="string", length=64, nullable=true)
  653. */
  654. private $videoCsv;
  655. /**
  656. * @var int
  657. *
  658. * @ORM\Column(type="integer", nullable=false)
  659. */
  660. private $oldIdProduct;
  661. /**
  662. * @var string|null
  663. *
  664. * @ORM\Column(type="string", length=32, nullable=true)
  665. */
  666. private $oldReference;
  667. /**
  668. * @var bool
  669. *
  670. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=false)
  671. */
  672. private $productoElectronico;
  673. /**
  674. * @var int|null
  675. *
  676. * @ORM\Column(type="integer", nullable=true)
  677. */
  678. private $oldIdCategoryDefault;
  679. /**
  680. * @var int|null
  681. *
  682. * @ORM\Column(type="integer", nullable=true)
  683. */
  684. private $relatedProduct;
  685. /**
  686. * @var ProductType|null
  687. *
  688. * @ORM\ManyToOne(targetEntity="ProductType")
  689. *
  690. * @ORM\JoinColumn(name="product_type_id", referencedColumnName="id")
  691. */
  692. private $productType;
  693. /**
  694. * @var Taxonomy
  695. *
  696. * @ORM\ManyToOne(targetEntity="Taxonomy")
  697. *
  698. * @ORM\JoinColumn(name="id_taxonomy_default", referencedColumnName="id", nullable=false)
  699. */
  700. private $taxonomyDefault;
  701. /**
  702. * @var ProductLangBg|null
  703. *
  704. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangBg", mappedBy="product")
  705. */
  706. private $productLangBg;
  707. /**
  708. * @var ProductLangCs|null
  709. *
  710. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangCs", mappedBy="product")
  711. */
  712. private $productLangCs;
  713. /**
  714. * @var ProductLangDa|null
  715. *
  716. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangDa", mappedBy="product")
  717. */
  718. private $productLangDa;
  719. /**
  720. * @var ProductLangDe|null
  721. *
  722. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangDe", mappedBy="product")
  723. */
  724. private $productLangDe;
  725. /**
  726. * @var ProductLangEl|null
  727. *
  728. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangEl", mappedBy="product")
  729. */
  730. private $productLangEl;
  731. /**
  732. * @var ProductLangEn|null
  733. *
  734. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangEn", mappedBy="product")
  735. */
  736. private $productLangEn;
  737. /**
  738. * @var ProductLangEs|null
  739. *
  740. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangEs", mappedBy="product")
  741. */
  742. private $productLangEs;
  743. /**
  744. * @var ProductLangEt|null
  745. *
  746. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangEt", mappedBy="product")
  747. */
  748. private $productLangEt;
  749. /**
  750. * @var ProductLangFi|null
  751. *
  752. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangFi", mappedBy="product")
  753. */
  754. private $productLangFi;
  755. /**
  756. * @var ProductLangFr|null
  757. *
  758. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangFr", mappedBy="product")
  759. */
  760. private $productLangFr;
  761. /**
  762. * @var ProductLangHr|null
  763. *
  764. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangHr", mappedBy="product")
  765. */
  766. private $productLangHr;
  767. /**
  768. * @var ProductLangHu|null
  769. *
  770. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangHu", mappedBy="product")
  771. */
  772. private $productLangHu;
  773. /**
  774. * @var ProductLangIt|null
  775. *
  776. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangIt", mappedBy="product")
  777. */
  778. private $productLangIt;
  779. /**
  780. * @var ProductLangLt|null
  781. *
  782. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangLt", mappedBy="product")
  783. */
  784. private $productLangLt;
  785. /**
  786. * @var ProductLangLv|null
  787. *
  788. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangLv", mappedBy="product")
  789. */
  790. private $productLangLv;
  791. /**
  792. * @var ProductLangNl|null
  793. *
  794. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangNl", mappedBy="product")
  795. */
  796. private $productLangNl;
  797. /**
  798. * @var ProductLangNo|null
  799. *
  800. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangNo", mappedBy="product")
  801. */
  802. private $productLangNo;
  803. /**
  804. * @var ProductLangPl|null
  805. *
  806. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangPl", mappedBy="product")
  807. */
  808. private $productLangPl;
  809. /**
  810. * @var ProductLangPt|null
  811. *
  812. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangPt", mappedBy="product")
  813. */
  814. private $productLangPt;
  815. /**
  816. * @var ProductLangRo|null
  817. *
  818. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangRo", mappedBy="product")
  819. */
  820. private $productLangRo;
  821. /**
  822. * @var ProductLangRu|null
  823. *
  824. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangRu", mappedBy="product")
  825. */
  826. private $productLangRu;
  827. /**
  828. * @var ProductLangSi|null
  829. *
  830. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangSi", mappedBy="product")
  831. */
  832. private $productLangSi;
  833. /**
  834. * @var ProductLangSk|null
  835. *
  836. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangSk", mappedBy="product")
  837. */
  838. private $productLangSk;
  839. /**
  840. * @var ProductLangSv|null
  841. *
  842. * @ORM\OneToOne(targetEntity="App\Entity\System\ProductLangSv", mappedBy="product")
  843. */
  844. private $productLangSv;
  845. /**
  846. * @var Collection<int, Category>
  847. *
  848. * @ORM\ManyToMany(targetEntity="App\Entity\System\Category", cascade={"persist"}, indexBy="reference")
  849. *
  850. * @ORM\JoinTable(name="ps_category_product",
  851. * joinColumns={@ORM\JoinColumn(name="id_product", referencedColumnName="id_product")},
  852. * inverseJoinColumns={@ORM\JoinColumn(name="id_category", referencedColumnName="id_category")}
  853. * )
  854. */
  855. private $categories;
  856. /**
  857. * @var Collection<int, Taxonomy>
  858. *
  859. * @ORM\ManyToMany(targetEntity="App\Entity\System\Taxonomy", inversedBy="products", cascade={"persist"}, indexBy="reference")
  860. *
  861. * @ORM\JoinTable(
  862. * name="taxonomy_product",
  863. * joinColumns={@ORM\JoinColumn(name="id_product", referencedColumnName="id_product", fieldName="id")},
  864. * inverseJoinColumns={@ORM\JoinColumn(name="id", referencedColumnName="id", fieldName="id")}
  865. * )
  866. */
  867. private $taxonomies;
  868. /**
  869. * @var Collection<int, CoreUrlRewrite>
  870. *
  871. * @ORM\OneToMany(targetEntity="App\Entity\System\CoreUrlRewrite", mappedBy="product", cascade={"persist"}, indexBy="id_lang")
  872. */
  873. private $coreUrlRewrites;
  874. /**
  875. * @var Collection<int, ProductCatalog>
  876. *
  877. * @ORM\OneToMany(targetEntity="ProductCatalog", mappedBy="product", orphanRemoval=true, cascade={"persist"})
  878. */
  879. private $productCatalogs;
  880. /**
  881. * @var Collection<int, FeatureProduct>
  882. *
  883. * @ORM\OneToMany(targetEntity="FeatureProduct", mappedBy="product", orphanRemoval=true, cascade={"persist"})
  884. */
  885. private $featureProducts;
  886. /**
  887. * @var int
  888. *
  889. * @ORM\Column(name="id_taxonomy_default", type="integer", nullable=false)
  890. */
  891. private $defaultTaxonomyId;
  892. /**
  893. * @var bool
  894. *
  895. * @ORM\Column(name="buybox", type="boolean", nullable=false, options={"default" : 0})
  896. */
  897. private $buyBox;
  898. /**
  899. * @ORM\Column(type="string", length=128, nullable=true)
  900. */
  901. private ?string $partNumber;
  902. /**
  903. * * @ORM\Column(type="float", nullable=true)
  904. */
  905. private ?float $canon;
  906. /**
  907. * @var Collection<int, FeatureValue>
  908. *
  909. * @ORM\ManyToMany(targetEntity="FeatureValue", indexBy="reference")
  910. *
  911. * @ORM\JoinTable(
  912. * name="ps_feature_value_product",
  913. * joinColumns={
  914. *
  915. * @ORM\JoinColumn(name="id_product", referencedColumnName="id_product")
  916. * },
  917. * inverseJoinColumns={
  918. * @ORM\JoinColumn(name="id_feature_value", referencedColumnName="id")
  919. * }
  920. * )
  921. */
  922. private $featureValues;
  923. /**
  924. * Product constructor.
  925. */
  926. public function __construct()
  927. {
  928. $this->productAttributes = new ArrayCollection();
  929. $this->productPrices = new ArrayCollection();
  930. $this->productImages = new ArrayCollection();
  931. $this->productDates = new ArrayCollection();
  932. $this->minimumOrderQuantitys = new ArrayCollection();
  933. $this->subscriptions = new ArrayCollection();
  934. $this->featureValues = new ArrayCollection();
  935. $this->featureProducts = new ArrayCollection();
  936. $this->orderDetails = new ArrayCollection();
  937. $this->cartProducts = new ArrayCollection();
  938. $this->categories = new ArrayCollection();
  939. $this->idShopDefault = 1;
  940. $this->ecotax = 0;
  941. $this->quantity = 0;
  942. $this->minimalQuantity = 1;
  943. $this->unitPriceRatio = 0;
  944. $this->additionalShippingCost = 0;
  945. $this->weight = 0;
  946. $this->height = 0;
  947. $this->depth = 0;
  948. $this->width = 0;
  949. $this->quantityDiscount = false;
  950. $this->customizable = false;
  951. $this->uploadableFiles = false;
  952. $this->textFields = false;
  953. $this->availableForOrder = true;
  954. $this->boxUnits = 0;
  955. $this->container20p = 0;
  956. $this->container40p = 0;
  957. $this->palletUnits = 0;
  958. $this->minimumQty = 0;
  959. $this->condition = 'new';
  960. $this->showPrice = true;
  961. $this->indexed = false;
  962. $this->visibility = 'both';
  963. $this->cacheIsPack = false;
  964. $this->cacheHasAttachments = false;
  965. $this->isVirtual = false;
  966. $this->advancedStockManagement = false;
  967. $this->traducir = false;
  968. $this->exportar = false;
  969. $this->sincronizar = false;
  970. $this->productoElectronico = false;
  971. $this->intrastat = '';
  972. $this->logisticClass = '';
  973. $this->supplierReference = '';
  974. $this->video = '';
  975. $this->picking = '';
  976. $this->etiquetas = '';
  977. $this->videoCsv = '';
  978. $this->oldIdProduct = 0;
  979. $this->oldReference = '';
  980. $this->oldIdCategoryDefault = 0;
  981. $this->eanVirtual = '';
  982. $this->relatedProduct = 0;
  983. $this->buyBox = false;
  984. $this->partNumber = '';
  985. $this->canon = 0.0;
  986. $this->defaultTaxonomyId = 0;
  987. $this->cacheDefaultAttribute = 0;
  988. $this->taxonomies = new ArrayCollection();
  989. $this->coreUrlRewrites = new ArrayCollection();
  990. $this->productCatalogs = new ArrayCollection();
  991. $this->availableDate = new \DateTime();
  992. $this->dateNext = new \DateTime();
  993. $this->dateNewStock = new \DateTime();
  994. $this->dateNew = new \DateTime();
  995. }
  996. public function getId(): int
  997. {
  998. return $this->id;
  999. }
  1000. public function setId(int $id): Product
  1001. {
  1002. $this->id = $id;
  1003. return $this;
  1004. }
  1005. public function getSupplier(): ?Supplier
  1006. {
  1007. return $this->supplier;
  1008. }
  1009. public function setSupplier(?Supplier $supplier): Product
  1010. {
  1011. $this->supplier = $supplier;
  1012. return $this;
  1013. }
  1014. public function getEan(): ?string
  1015. {
  1016. return $this->ean;
  1017. }
  1018. public function setEan(?string $ean): Product
  1019. {
  1020. $this->ean = $ean;
  1021. return $this;
  1022. }
  1023. public function getUpc(): ?string
  1024. {
  1025. return $this->upc;
  1026. }
  1027. public function setUpc(?string $upc): Product
  1028. {
  1029. $this->upc = $upc;
  1030. return $this;
  1031. }
  1032. public function getEcotax(): ?float
  1033. {
  1034. return $this->ecotax;
  1035. }
  1036. public function setEcotax(?float $ecotax): Product
  1037. {
  1038. $this->ecotax = $ecotax;
  1039. return $this;
  1040. }
  1041. public function getQuantity(): ?int
  1042. {
  1043. return $this->quantity;
  1044. }
  1045. public function setQuantity(?int $quantity): Product
  1046. {
  1047. $this->quantity = $quantity;
  1048. return $this;
  1049. }
  1050. public function getMinimalQuantity(): ?int
  1051. {
  1052. return $this->minimalQuantity;
  1053. }
  1054. public function setMinimalQuantity(?int $minimalQuantity): Product
  1055. {
  1056. $this->minimalQuantity = $minimalQuantity;
  1057. return $this;
  1058. }
  1059. public function getSku(): string
  1060. {
  1061. return $this->sku;
  1062. }
  1063. public function setSku(string $sku): Product
  1064. {
  1065. $this->sku = $sku;
  1066. return $this;
  1067. }
  1068. public function isActive(): bool
  1069. {
  1070. return $this->active;
  1071. }
  1072. public function setActive(bool $active): Product
  1073. {
  1074. $this->active = $active;
  1075. return $this;
  1076. }
  1077. /**
  1078. * @return Collection<string, ProductImage>
  1079. */
  1080. public function getProductImages()
  1081. {
  1082. return $this->productImages;
  1083. }
  1084. /**
  1085. * @param Collection<string, ProductImage> $productImages
  1086. *
  1087. * @return Product
  1088. */
  1089. public function setProductImages($productImages): Product
  1090. {
  1091. $this->productImages = $productImages;
  1092. return $this;
  1093. }
  1094. /**
  1095. * @return Collection<int, ProductAttribute>
  1096. */
  1097. public function getProductAttributes()
  1098. {
  1099. return $this->productAttributes;
  1100. }
  1101. /**
  1102. * @param Collection<int, ProductAttribute> $productAttributes
  1103. */
  1104. public function setProductAttributes($productAttributes): Product
  1105. {
  1106. $this->productAttributes = $productAttributes;
  1107. return $this;
  1108. }
  1109. /**
  1110. * @return Collection<int, ProductDate>
  1111. */
  1112. public function getProductDates()
  1113. {
  1114. return $this->productDates;
  1115. }
  1116. /**
  1117. * @param Collection<int, ProductDate> $productDates
  1118. */
  1119. public function setProductDates($productDates): Product
  1120. {
  1121. $this->productDates = $productDates;
  1122. return $this;
  1123. }
  1124. public function getCategoryDefault(): ?int
  1125. {
  1126. return $this->categoryDefault;
  1127. }
  1128. public function setCategoryDefault(?int $categoryDefault): Product
  1129. {
  1130. $this->categoryDefault = $categoryDefault;
  1131. return $this;
  1132. }
  1133. public function getSincronizar(): bool
  1134. {
  1135. return $this->sincronizar;
  1136. }
  1137. public function setSincronizar(bool $sincronizar): Product
  1138. {
  1139. $this->sincronizar = $sincronizar;
  1140. return $this;
  1141. }
  1142. public function getWeight(): float
  1143. {
  1144. return $this->weight;
  1145. }
  1146. public function setWeight(float $weight): Product
  1147. {
  1148. $this->weight = $weight;
  1149. return $this;
  1150. }
  1151. public function getEanVirtual(): ?string
  1152. {
  1153. return $this->eanVirtual;
  1154. }
  1155. public function setEanVirtual(string $eanVirtual): Product
  1156. {
  1157. $this->eanVirtual = $eanVirtual;
  1158. return $this;
  1159. }
  1160. public function getHeight(): float
  1161. {
  1162. return $this->height;
  1163. }
  1164. public function setHeight(float $height): Product
  1165. {
  1166. $this->height = $height;
  1167. return $this;
  1168. }
  1169. public function getWidth(): float
  1170. {
  1171. return $this->width;
  1172. }
  1173. public function setWidth(float $width): Product
  1174. {
  1175. $this->width = $width;
  1176. return $this;
  1177. }
  1178. public function getDepth(): float
  1179. {
  1180. return $this->depth;
  1181. }
  1182. public function setDepth(float $depth): Product
  1183. {
  1184. $this->depth = $depth;
  1185. return $this;
  1186. }
  1187. public function isVirtual(): bool
  1188. {
  1189. return $this->isVirtual;
  1190. }
  1191. public function setIsVirtual(bool $isVirtual): Product
  1192. {
  1193. $this->isVirtual = $isVirtual;
  1194. return $this;
  1195. }
  1196. /**
  1197. * @return Collection<int, MinimumOrderQuantity>
  1198. */
  1199. public function getMinimumOrderQuantitys()
  1200. {
  1201. return $this->minimumOrderQuantitys;
  1202. }
  1203. /**
  1204. * @param Collection<int, MinimumOrderQuantity> $minimumOrderQuantities
  1205. *
  1206. * @return Product
  1207. */
  1208. public function setMinimumOrderQuantities($minimumOrderQuantities): Product
  1209. {
  1210. $this->minimumOrderQuantitys = $minimumOrderQuantities;
  1211. return $this;
  1212. }
  1213. public function getDateAdd(): \DateTime
  1214. {
  1215. return $this->dateAdd;
  1216. }
  1217. public function setDateAdd(\DateTime $dateAdd): Product
  1218. {
  1219. $this->dateAdd = $dateAdd;
  1220. return $this;
  1221. }
  1222. public function getDateUpd(): \DateTime
  1223. {
  1224. return $this->dateUpd;
  1225. }
  1226. public function setDateUpd(\DateTime $dateUpd): Product
  1227. {
  1228. $this->dateUpd = $dateUpd;
  1229. return $this;
  1230. }
  1231. public function getDateNext(): \DateTime
  1232. {
  1233. return $this->dateNext;
  1234. }
  1235. public function setDateNext(\DateTime $dateNext): Product
  1236. {
  1237. $this->dateNext = $dateNext;
  1238. return $this;
  1239. }
  1240. public function getDateNewStock(): \DateTime
  1241. {
  1242. return $this->dateNewStock;
  1243. }
  1244. public function setDateNewStock(\DateTime $dateNewStock): Product
  1245. {
  1246. $this->dateNewStock = $dateNewStock;
  1247. return $this;
  1248. }
  1249. public function getAvailableDate(): \DateTime
  1250. {
  1251. return $this->availableDate;
  1252. }
  1253. public function setAvailableDate(\DateTime $availableDate): Product
  1254. {
  1255. $this->availableDate = $availableDate;
  1256. return $this;
  1257. }
  1258. public function getPalletUnits(): ?int
  1259. {
  1260. return $this->palletUnits;
  1261. }
  1262. public function setPalletUnits(int $palletUnits): Product
  1263. {
  1264. $this->palletUnits = $palletUnits;
  1265. return $this;
  1266. }
  1267. public function getBoxUnits(): ?int
  1268. {
  1269. return $this->boxUnits;
  1270. }
  1271. public function setBoxUnits(int $boxUnits): Product
  1272. {
  1273. $this->boxUnits = $boxUnits;
  1274. return $this;
  1275. }
  1276. public function getVideo(): ?string
  1277. {
  1278. return $this->video;
  1279. }
  1280. public function setVideo(string $video): Product
  1281. {
  1282. $this->video = $video;
  1283. return $this;
  1284. }
  1285. public function getManufacturer(): ?Brand
  1286. {
  1287. return $this->manufacturer;
  1288. }
  1289. public function setManufacturer(Brand $manufacturer): Product
  1290. {
  1291. $this->manufacturer = $manufacturer;
  1292. return $this;
  1293. }
  1294. /**
  1295. * @return Collection<int, Subscription>
  1296. */
  1297. public function getSubscriptions(): Collection
  1298. {
  1299. return $this->subscriptions;
  1300. }
  1301. /**
  1302. * @param Collection<int, Subscription> $subscriptions
  1303. */
  1304. public function setSubscriptions($subscriptions): Product
  1305. {
  1306. $this->subscriptions = $subscriptions;
  1307. return $this;
  1308. }
  1309. public function getLogisticClass(): ?string
  1310. {
  1311. return $this->logisticClass;
  1312. }
  1313. public function setLogisticClass(string $logisticClass): Product
  1314. {
  1315. $this->logisticClass = $logisticClass;
  1316. return $this;
  1317. }
  1318. public function isQuantityDiscount(): bool
  1319. {
  1320. return $this->quantityDiscount;
  1321. }
  1322. public function setQuantityDiscount(bool $quantityDiscount): Product
  1323. {
  1324. $this->quantityDiscount = $quantityDiscount;
  1325. return $this;
  1326. }
  1327. public function getCustomizable(): bool
  1328. {
  1329. return $this->customizable;
  1330. }
  1331. public function setCustomizable(bool $customizable): Product
  1332. {
  1333. $this->customizable = $customizable;
  1334. return $this;
  1335. }
  1336. public function getUploadableFiles(): bool
  1337. {
  1338. return $this->uploadableFiles;
  1339. }
  1340. public function setUploadableFiles(bool $uploadableFiles): Product
  1341. {
  1342. $this->uploadableFiles = $uploadableFiles;
  1343. return $this;
  1344. }
  1345. public function getTextFields(): bool
  1346. {
  1347. return $this->textFields;
  1348. }
  1349. public function setTextFields(bool $textFields): Product
  1350. {
  1351. $this->textFields = $textFields;
  1352. return $this;
  1353. }
  1354. public function isAvailableForOrder(): bool
  1355. {
  1356. return $this->availableForOrder;
  1357. }
  1358. public function setAvailableForOrder(bool $availableForOrder): Product
  1359. {
  1360. $this->availableForOrder = $availableForOrder;
  1361. return $this;
  1362. }
  1363. public function getDateNew(): ?\DateTime
  1364. {
  1365. return $this->dateNew;
  1366. }
  1367. public function setDateNew(\DateTime $dateNew): Product
  1368. {
  1369. $this->dateNew = $dateNew;
  1370. return $this;
  1371. }
  1372. public function getContainer20p(): int
  1373. {
  1374. return $this->container20p;
  1375. }
  1376. public function setContainer20p(int $container20p): Product
  1377. {
  1378. $this->container20p = $container20p;
  1379. return $this;
  1380. }
  1381. public function getContainer40p(): int
  1382. {
  1383. return $this->container40p;
  1384. }
  1385. public function setContainer40p(int $container40p): Product
  1386. {
  1387. $this->container40p = $container40p;
  1388. return $this;
  1389. }
  1390. public function getPicking(): ?string
  1391. {
  1392. return $this->picking;
  1393. }
  1394. public function setPicking(string $picking): Product
  1395. {
  1396. $this->picking = $picking;
  1397. return $this;
  1398. }
  1399. public function getMinimumQty(): int
  1400. {
  1401. return $this->minimumQty;
  1402. }
  1403. public function setMinimumQty(int $minimumQty): Product
  1404. {
  1405. $this->minimumQty = $minimumQty;
  1406. return $this;
  1407. }
  1408. public function getCondition(): string
  1409. {
  1410. return $this->condition;
  1411. }
  1412. public function setCondition(string $condition): Product
  1413. {
  1414. $this->condition = $condition;
  1415. return $this;
  1416. }
  1417. public function isShowPrice(): bool
  1418. {
  1419. return $this->showPrice;
  1420. }
  1421. public function setShowPrice(bool $showPrice): Product
  1422. {
  1423. $this->showPrice = $showPrice;
  1424. return $this;
  1425. }
  1426. public function isIndexed(): bool
  1427. {
  1428. return $this->indexed;
  1429. }
  1430. public function setIndexed(bool $indexed): Product
  1431. {
  1432. $this->indexed = $indexed;
  1433. return $this;
  1434. }
  1435. public function getVisibility(): string
  1436. {
  1437. return $this->visibility;
  1438. }
  1439. public function setVisibility(string $visibility): Product
  1440. {
  1441. $this->visibility = $visibility;
  1442. return $this;
  1443. }
  1444. public function isCacheIsPack(): bool
  1445. {
  1446. return $this->cacheIsPack;
  1447. }
  1448. public function setCacheIsPack(bool $cacheIsPack): Product
  1449. {
  1450. $this->cacheIsPack = $cacheIsPack;
  1451. return $this;
  1452. }
  1453. public function isCacheHasAttachments(): bool
  1454. {
  1455. return $this->cacheHasAttachments;
  1456. }
  1457. public function setCacheHasAttachments(bool $cacheHasAttachments): Product
  1458. {
  1459. $this->cacheHasAttachments = $cacheHasAttachments;
  1460. return $this;
  1461. }
  1462. public function getCacheDefaultAttribute(): ?int
  1463. {
  1464. return $this->cacheDefaultAttribute;
  1465. }
  1466. public function setCacheDefaultAttribute(int $cacheDefaultAttribute): Product
  1467. {
  1468. $this->cacheDefaultAttribute = $cacheDefaultAttribute;
  1469. return $this;
  1470. }
  1471. public function isAdvancedStockManagement(): bool
  1472. {
  1473. return $this->advancedStockManagement;
  1474. }
  1475. public function setAdvancedStockManagement(bool $advancedStockManagement): Product
  1476. {
  1477. $this->advancedStockManagement = $advancedStockManagement;
  1478. return $this;
  1479. }
  1480. public function getEtiquetas(): ?string
  1481. {
  1482. return $this->etiquetas;
  1483. }
  1484. public function setEtiquetas(string $etiquetas): Product
  1485. {
  1486. $this->etiquetas = $etiquetas;
  1487. return $this;
  1488. }
  1489. public function isTraducir(): bool
  1490. {
  1491. return $this->traducir;
  1492. }
  1493. public function setTraducir(bool $traducir): Product
  1494. {
  1495. $this->traducir = $traducir;
  1496. return $this;
  1497. }
  1498. public function isExportar(): bool
  1499. {
  1500. return $this->exportar;
  1501. }
  1502. public function setExportar(bool $exportar): Product
  1503. {
  1504. $this->exportar = $exportar;
  1505. return $this;
  1506. }
  1507. public function getVideoCsv(): ?string
  1508. {
  1509. return $this->videoCsv;
  1510. }
  1511. public function setVideoCsv(string $videoCsv): Product
  1512. {
  1513. $this->videoCsv = $videoCsv;
  1514. return $this;
  1515. }
  1516. public function getOldIdProduct(): int
  1517. {
  1518. return $this->oldIdProduct;
  1519. }
  1520. public function setOldIdProduct(int $oldIdProduct): Product
  1521. {
  1522. $this->oldIdProduct = $oldIdProduct;
  1523. return $this;
  1524. }
  1525. public function getOldReference(): ?string
  1526. {
  1527. return $this->oldReference;
  1528. }
  1529. public function setOldReference(string $oldReference): Product
  1530. {
  1531. $this->oldReference = $oldReference;
  1532. return $this;
  1533. }
  1534. public function isProductoElectronico(): bool
  1535. {
  1536. return $this->productoElectronico;
  1537. }
  1538. public function setProductoElectronico(bool $productoElectronico): Product
  1539. {
  1540. $this->productoElectronico = $productoElectronico;
  1541. return $this;
  1542. }
  1543. public function getOldIdCategoryDefault(): ?int
  1544. {
  1545. return $this->oldIdCategoryDefault;
  1546. }
  1547. public function setOldIdCategoryDefault(int $oldIdCategoryDefault): Product
  1548. {
  1549. $this->oldIdCategoryDefault = $oldIdCategoryDefault;
  1550. return $this;
  1551. }
  1552. public function getRelatedProduct(): ?int
  1553. {
  1554. return $this->relatedProduct;
  1555. }
  1556. public function setRelatedProduct(int $relatedProduct): Product
  1557. {
  1558. $this->relatedProduct = $relatedProduct;
  1559. return $this;
  1560. }
  1561. public function getProductType(): ?ProductType
  1562. {
  1563. return $this->productType;
  1564. }
  1565. public function setProductType(?ProductType $productType): self
  1566. {
  1567. $this->productType = $productType;
  1568. return $this;
  1569. }
  1570. /**
  1571. * @return ProductLangInterface[]
  1572. */
  1573. public function getLanguages(): array
  1574. {
  1575. return [
  1576. 1 => $this->productLangEn,
  1577. 4 => $this->productLangEs,
  1578. 5 => $this->productLangFr,
  1579. 6 => $this->productLangDe,
  1580. 7 => $this->productLangPt,
  1581. 8 => $this->productLangEl,
  1582. 9 => $this->productLangHr,
  1583. 10 => $this->productLangIt,
  1584. 11 => $this->productLangEt,
  1585. 12 => $this->productLangDa,
  1586. 13 => $this->productLangFi,
  1587. 14 => $this->productLangRo,
  1588. 15 => $this->productLangBg,
  1589. 16 => $this->productLangHu,
  1590. 18 => $this->productLangSk,
  1591. 19 => $this->productLangSi,
  1592. 20 => $this->productLangLt,
  1593. 21 => $this->productLangLv,
  1594. 22 => $this->productLangPl,
  1595. 24 => $this->productLangNl,
  1596. 25 => $this->productLangRu,
  1597. 26 => $this->productLangNo,
  1598. 27 => $this->productLangSv,
  1599. 28 => $this->productLangCs,
  1600. ];
  1601. }
  1602. /**
  1603. * @return Collection<int, Taxonomy>
  1604. */
  1605. public function getTaxonomies()
  1606. {
  1607. return $this->taxonomies;
  1608. }
  1609. /**
  1610. * @param Collection<int, Taxonomy> $taxonomies
  1611. */
  1612. public function setTaxonomies($taxonomies): Product
  1613. {
  1614. $this->taxonomies = $taxonomies;
  1615. return $this;
  1616. }
  1617. /**
  1618. * @return Collection<int, Category>
  1619. */
  1620. public function getCategories()
  1621. {
  1622. return $this->categories;
  1623. }
  1624. /**
  1625. * @param Collection<int, Category> $categories
  1626. */
  1627. public function setCategories($categories): Product
  1628. {
  1629. $this->categories = $categories;
  1630. return $this;
  1631. }
  1632. /**
  1633. * @return Collection<int, CoreUrlRewrite>|CoreUrlRewrite[]
  1634. */
  1635. public function getCoreUrlRewrites()
  1636. {
  1637. return $this->coreUrlRewrites;
  1638. }
  1639. /**
  1640. * @param Collection<int, CoreUrlRewrite> $coreUrlRewrites
  1641. */
  1642. public function setCoreUrlRewrites(Collection $coreUrlRewrites): Product
  1643. {
  1644. $this->coreUrlRewrites = $coreUrlRewrites;
  1645. return $this;
  1646. }
  1647. /**
  1648. * @return Collection<int, ProductCatalog>
  1649. */
  1650. public function getProductCatalogs(): Collection
  1651. {
  1652. return $this->productCatalogs;
  1653. }
  1654. /**
  1655. * @param Collection<int, ProductCatalog> $productCatalogs
  1656. */
  1657. public function setProductCatalogs(Collection $productCatalogs): Product
  1658. {
  1659. $this->productCatalogs = $productCatalogs;
  1660. return $this;
  1661. }
  1662. /**
  1663. * @return Collection<int, FeatureProduct>
  1664. */
  1665. public function getFeatureProducts()
  1666. {
  1667. return $this->featureProducts;
  1668. }
  1669. /**
  1670. * @param Collection<int, FeatureProduct> $featureProducts
  1671. */
  1672. public function setFeatureProducts($featureProducts): Product
  1673. {
  1674. $this->featureProducts = $featureProducts;
  1675. return $this;
  1676. }
  1677. public function getProductLangEn(): ?ProductLangEn
  1678. {
  1679. return $this->productLangEn;
  1680. }
  1681. public function getProductLangEs(): ?ProductLangEs
  1682. {
  1683. return $this->productLangEs;
  1684. }
  1685. public function setProductLangEn(ProductLangEn $productLangEn): void
  1686. {
  1687. $this->productLangEn = $productLangEn;
  1688. }
  1689. public function setProductLangEs(ProductLangEs $productLangEs): void
  1690. {
  1691. $this->productLangEs = $productLangEs;
  1692. }
  1693. public function getTaxonomyDefault(): Taxonomy
  1694. {
  1695. return $this->taxonomyDefault;
  1696. }
  1697. public function setTaxonomyDefault(Taxonomy $taxonomyDefault): self
  1698. {
  1699. $this->taxonomyDefault = $taxonomyDefault;
  1700. return $this;
  1701. }
  1702. public function getIntrastat(): ?string
  1703. {
  1704. return $this->intrastat;
  1705. }
  1706. public function setIntrastat(string $intrastat): self
  1707. {
  1708. $this->intrastat = $intrastat;
  1709. return $this;
  1710. }
  1711. public function getProductLangByIsoCode(string $isoCode): ?ProductLangInterface
  1712. {
  1713. if (!\array_key_exists($isoCode, Language::LANGUAGE_IDS_INDEXED_BY_ISO_CODE)) {
  1714. return null;
  1715. }
  1716. $getProductLangMethod = 'getProductLang'.ucfirst($isoCode);
  1717. return $this->$getProductLangMethod();
  1718. }
  1719. public function getProductLangBg(): ?ProductLangBg
  1720. {
  1721. return $this->productLangBg;
  1722. }
  1723. public function setProductLangBg(?ProductLangBg $productLangBg): Product
  1724. {
  1725. $this->productLangBg = $productLangBg;
  1726. return $this;
  1727. }
  1728. public function getProductLangCs(): ?ProductLangCs
  1729. {
  1730. return $this->productLangCs;
  1731. }
  1732. public function setProductLangCs(?ProductLangCs $productLangCs): Product
  1733. {
  1734. $this->productLangCs = $productLangCs;
  1735. return $this;
  1736. }
  1737. public function getProductLangDa(): ?ProductLangDa
  1738. {
  1739. return $this->productLangDa;
  1740. }
  1741. public function setProductLangDa(?ProductLangDa $productLangDa): Product
  1742. {
  1743. $this->productLangDa = $productLangDa;
  1744. return $this;
  1745. }
  1746. public function getProductLangDe(): ?ProductLangDe
  1747. {
  1748. return $this->productLangDe;
  1749. }
  1750. public function setProductLangDe(?ProductLangDe $productLangDe): Product
  1751. {
  1752. $this->productLangDe = $productLangDe;
  1753. return $this;
  1754. }
  1755. public function getProductLangEl(): ?ProductLangEl
  1756. {
  1757. return $this->productLangEl;
  1758. }
  1759. public function setProductLangEl(?ProductLangEl $productLangEl): Product
  1760. {
  1761. $this->productLangEl = $productLangEl;
  1762. return $this;
  1763. }
  1764. public function getProductLangEt(): ?ProductLangEt
  1765. {
  1766. return $this->productLangEt;
  1767. }
  1768. public function setProductLangEt(?ProductLangEt $productLangEt): Product
  1769. {
  1770. $this->productLangEt = $productLangEt;
  1771. return $this;
  1772. }
  1773. public function getProductLangFi(): ?ProductLangFi
  1774. {
  1775. return $this->productLangFi;
  1776. }
  1777. public function setProductLangFi(?ProductLangFi $productLangFi): Product
  1778. {
  1779. $this->productLangFi = $productLangFi;
  1780. return $this;
  1781. }
  1782. public function getProductLangFr(): ?ProductLangFr
  1783. {
  1784. return $this->productLangFr;
  1785. }
  1786. public function setProductLangFr(?ProductLangFr $productLangFr): Product
  1787. {
  1788. $this->productLangFr = $productLangFr;
  1789. return $this;
  1790. }
  1791. public function getProductLangHr(): ?ProductLangHr
  1792. {
  1793. return $this->productLangHr;
  1794. }
  1795. public function setProductLangHr(?ProductLangHr $productLangHr): Product
  1796. {
  1797. $this->productLangHr = $productLangHr;
  1798. return $this;
  1799. }
  1800. public function getProductLangHu(): ?ProductLangHu
  1801. {
  1802. return $this->productLangHu;
  1803. }
  1804. public function setProductLangHu(?ProductLangHu $productLangHu): Product
  1805. {
  1806. $this->productLangHu = $productLangHu;
  1807. return $this;
  1808. }
  1809. public function getProductLangIt(): ?ProductLangIt
  1810. {
  1811. return $this->productLangIt;
  1812. }
  1813. public function setProductLangIt(?ProductLangIt $productLangIt): Product
  1814. {
  1815. $this->productLangIt = $productLangIt;
  1816. return $this;
  1817. }
  1818. public function getProductLangLt(): ?ProductLangLt
  1819. {
  1820. return $this->productLangLt;
  1821. }
  1822. public function setProductLangLt(?ProductLangLt $productLangLt): Product
  1823. {
  1824. $this->productLangLt = $productLangLt;
  1825. return $this;
  1826. }
  1827. public function getProductLangLv(): ?ProductLangLv
  1828. {
  1829. return $this->productLangLv;
  1830. }
  1831. public function setProductLangLv(?ProductLangLv $productLangLv): Product
  1832. {
  1833. $this->productLangLv = $productLangLv;
  1834. return $this;
  1835. }
  1836. public function getProductLangNl(): ?ProductLangNl
  1837. {
  1838. return $this->productLangNl;
  1839. }
  1840. public function setProductLangNl(?ProductLangNl $productLangNl): Product
  1841. {
  1842. $this->productLangNl = $productLangNl;
  1843. return $this;
  1844. }
  1845. public function getProductLangNo(): ?ProductLangNo
  1846. {
  1847. return $this->productLangNo;
  1848. }
  1849. public function setProductLangNo(?ProductLangNo $productLangNo): Product
  1850. {
  1851. $this->productLangNo = $productLangNo;
  1852. return $this;
  1853. }
  1854. public function getProductLangPl(): ?ProductLangPl
  1855. {
  1856. return $this->productLangPl;
  1857. }
  1858. public function setProductLangPl(?ProductLangPl $productLangPl): Product
  1859. {
  1860. $this->productLangPl = $productLangPl;
  1861. return $this;
  1862. }
  1863. public function getProductLangPt(): ?ProductLangPt
  1864. {
  1865. return $this->productLangPt;
  1866. }
  1867. public function setProductLangPt(?ProductLangPt $productLangPt): Product
  1868. {
  1869. $this->productLangPt = $productLangPt;
  1870. return $this;
  1871. }
  1872. public function getProductLangRo(): ?ProductLangRo
  1873. {
  1874. return $this->productLangRo;
  1875. }
  1876. public function setProductLangRo(?ProductLangRo $productLangRo): Product
  1877. {
  1878. $this->productLangRo = $productLangRo;
  1879. return $this;
  1880. }
  1881. public function getProductLangRu(): ?ProductLangRu
  1882. {
  1883. return $this->productLangRu;
  1884. }
  1885. public function setProductLangRu(?ProductLangRu $productLangRu): Product
  1886. {
  1887. $this->productLangRu = $productLangRu;
  1888. return $this;
  1889. }
  1890. public function getProductLangSi(): ?ProductLangSi
  1891. {
  1892. return $this->productLangSi;
  1893. }
  1894. public function setProductLangSi(?ProductLangSi $productLangSi): Product
  1895. {
  1896. $this->productLangSi = $productLangSi;
  1897. return $this;
  1898. }
  1899. public function getProductLangSk(): ?ProductLangSk
  1900. {
  1901. return $this->productLangSk;
  1902. }
  1903. public function setProductLangSk(?ProductLangSk $productLangSk): Product
  1904. {
  1905. $this->productLangSk = $productLangSk;
  1906. return $this;
  1907. }
  1908. public function getProductLangSv(): ?ProductLangSv
  1909. {
  1910. return $this->productLangSv;
  1911. }
  1912. public function setProductLangSv(?ProductLangSv $productLangSv): Product
  1913. {
  1914. $this->productLangSv = $productLangSv;
  1915. return $this;
  1916. }
  1917. public function isBuyBox(): bool
  1918. {
  1919. return $this->buyBox;
  1920. }
  1921. public function setBuyBox(bool $buyBox): void
  1922. {
  1923. $this->buyBox = $buyBox;
  1924. }
  1925. public function getTaxRuleGroup(): ?TaxRuleGroup
  1926. {
  1927. return $this->taxRuleGroup;
  1928. }
  1929. public function setTaxRuleGroup(TaxRuleGroup $taxRuleGroup): Product
  1930. {
  1931. $this->taxRuleGroup = $taxRuleGroup;
  1932. return $this;
  1933. }
  1934. public function getPartNumber(): ?string
  1935. {
  1936. return $this->partNumber;
  1937. }
  1938. public function setPartNumber(?string $partNumber): Product
  1939. {
  1940. $this->partNumber = $partNumber;
  1941. return $this;
  1942. }
  1943. public function getCanon(): ?float
  1944. {
  1945. return $this->canon;
  1946. }
  1947. public function setCanon(float $canon): Product
  1948. {
  1949. $this->canon = $canon;
  1950. return $this;
  1951. }
  1952. /**
  1953. * @return Collection<int, FeatureValue>
  1954. */
  1955. public function getFeatureValues()
  1956. {
  1957. return $this->featureValues;
  1958. }
  1959. /**
  1960. * @param Collection<int, FeatureValue> $featureValues
  1961. */
  1962. public function setFeatureValues($featureValues): Product
  1963. {
  1964. $this->featureValues = $featureValues;
  1965. return $this;
  1966. }
  1967. public function setSupplierReference(string $supplierReference): Product
  1968. {
  1969. $this->supplierReference = $supplierReference;
  1970. return $this;
  1971. }
  1972. /**
  1973. * @param FeatureValue[] $toSaveArray
  1974. */
  1975. public function addFeatureValues(array $toSaveArray): void
  1976. {
  1977. foreach ($toSaveArray as $featureValue) {
  1978. if (!$this->featureValues->contains($featureValue)) {
  1979. $this->featureValues->add($featureValue);
  1980. }
  1981. }
  1982. }
  1983. /**
  1984. * @param FeatureValue[] $toDeleteArray
  1985. */
  1986. public function deleteFeatureValues(array $toDeleteArray): void
  1987. {
  1988. foreach ($toDeleteArray as $featureValue) {
  1989. if ($this->featureValues->contains($featureValue)) {
  1990. $this->featureValues->removeElement($featureValue);
  1991. }
  1992. }
  1993. }
  1994. /**
  1995. * @return Collection<int, ProductStock>
  1996. */
  1997. public function getProductStocks()
  1998. {
  1999. return $this->productStocks;
  2000. }
  2001. /**
  2002. * @param Collection<int, ProductStock> $productStocks
  2003. */
  2004. public function setProductStocks($productStocks): Product
  2005. {
  2006. $this->productStocks = $productStocks;
  2007. return $this;
  2008. }
  2009. /**
  2010. * @return Collection<int, OrderDetail>
  2011. */
  2012. public function getOrderDetails(): Collection
  2013. {
  2014. return $this->orderDetails;
  2015. }
  2016. /**
  2017. * @param Collection<int, OrderDetail> $orderDetails
  2018. */
  2019. public function setOrderDetails(Collection $orderDetails): Product
  2020. {
  2021. $this->orderDetails = $orderDetails;
  2022. return $this;
  2023. }
  2024. /**
  2025. * @return Collection<int, CartProduct>
  2026. */
  2027. public function getCartProducts(): Collection
  2028. {
  2029. return $this->cartProducts;
  2030. }
  2031. /**
  2032. * @param Collection<int, CartProduct> $cartProducts
  2033. */
  2034. public function setCartProducts(Collection $cartProducts): Product
  2035. {
  2036. $this->cartProducts = $cartProducts;
  2037. return $this;
  2038. }
  2039. /**
  2040. * @return Collection<int, ProductPrice>
  2041. */
  2042. public function getProductPrices()
  2043. {
  2044. return $this->productPrices;
  2045. }
  2046. /**
  2047. * @param Collection<int, ProductPrice> $productPrices
  2048. */
  2049. public function setProductPrices($productPrices): Product
  2050. {
  2051. $this->productPrices = $productPrices;
  2052. return $this;
  2053. }
  2054. }