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