VlastnosÅ¥ Product->upc nie je platná
at line 1046 in file classes/ObjectModel.php
1041. }
1042.
1043. $message = $this->validateField($field, $this->$field);
1044. if ($message !== true) {
1045. if ($die) {
1046. throw new PrestaShopException($message);
1047. }
1048.
1049. return $error_return ? $message : false;
1050. }
1051. }
288. *
289. * @throws PrestaShopException
290. */
291. public function getFields()
292. {
293. $this->validateFields();
294. $fields = $this->formatFields(self::FORMAT_COMMON);
295.
296. // For retro compatibility
297. if (Shop::isTableAssociated($this->def['table'])) {
298. $fields = array_merge($fields, $this->getFieldsShop());
751.
752. if (Shop::checkIdShopDefault($this->def['table']) && !$this->id_shop_default) {
753. $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $id_shop_list) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($id_shop_list);
754. }
755. // Database update
756. if (!$result = Db::getInstance()->update($this->def['table'], $this->getFields(), '`' . pSQL($this->def['primary']) . '` = ' . (int) $this->id, 0, $null_values)) {
757. return false;
758. }
759.
760. // Database insertion for multishop fields related to the object
761. if (Shop::isTableAssociated($this->def['table'])) {
808. {
809. if ($this->is_virtual) {
810. $this->product_type = ProductType::TYPE_VIRTUAL;
811. }
812.
813. $return = parent::update($null_values);
814. $this->setGroupReduction();
815.
816. // Sync stock Reference, EAN13, MPN and UPC
817. if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && StockAvailable::dependsOnStock($this->id, Context::getContext()->shop->id)) {
818. Db::getInstance()->update('stock', [
93. $io_desc_short = $module->getFilterContent($page_name, $io_desc_short);
94. $product->description_short = $io_desc_short;
95. $flag = true;
96. }
97. if ($flag === true) {
98. $product->update();
99. }
100. }
101. }
102. }
282. /**
283. * Starts the controller process (this method should not be overridden!).
284. */
285. public function run()
286. {
287. $this->init();
288. if ($this->checkAccess()) {
289. // setMedia MUST be called before postProcess
290. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
291. $this->setMedia();
292. }
513. if (isset($params_hook_action_dispatcher)) {
514. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
515. }
516.
517. // Running controller
518. $controller->run();
519.
520. // Execute hook dispatcher after
521. if (isset($params_hook_action_dispatcher)) {
522. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
523. }
34. {
35. echo $cache;
36. exit;
37. }
38. }
39. parent::dispatch();
40. }
41. }
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();