src/Entity/System/Product.php line 38

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