public function add($autodate = true, $nullValues = false) { if (parent::add($autodate, true)) { return Db::getInstance()->Execute('INSERT INTO ' . _DB_PREFIX_ . 'access (SELECT ' . (int) $this->id . ', id_tab, 0, 0, 0, 0 FROM ' . _DB_PREFIX_ . 'tab)'); } return false; }
public function add($autodate = true, $null_values = false) { if ($this->position <= 0) { $this->position = Image::getHighestPosition($this->id_product) + 1; } return parent::add($autodate, $null_values); }
public function add($autodate = true, $null_values = false) { if (!isset($this->level_depth)) { $this->level_depth = $this->calcLevelDepth(); } if ($this->is_root_category && ($id_root_category = (int) Configuration::get('PS_ROOT_CATEGORY'))) { $this->id_parent = $id_root_category; } $ret = parent::add($autodate, $null_values); if (Tools::isSubmit('checkBoxShopAsso_category')) { foreach (Tools::getValue('checkBoxShopAsso_category') as $id_shop => $value) { $position = (int) Category::getLastPosition((int) $this->id_parent, $id_shop); $this->addPosition($position, $id_shop); } } else { foreach (Shop::getShops(true) as $shop) { $position = (int) Category::getLastPosition((int) $this->id_parent, $shop['id_shop']); $this->addPosition($position, $shop['id_shop']); } } if (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree) { Category::regenerateEntireNtree(); } $this->updateGroup($this->groupBox); Hook::exec('actionCategoryAdd', array('category' => $this)); return $ret; }
public function addState($autodate = true) { if (!parent::add($autodate)) { return false; } return true; }
public function add($autodate = true, $nullValues = false) { if ($result = parent::add($autodate, $nullValues)) { Referrer::cacheNewSource($this->id); } return $result; }
public function add($autodate = true, $nullValues = false) { if (WebserviceKey::keyExists($this->key)) { return false; } return parent::add($autodate = true, $nullValues = false); }
public function add($autodate = true, $null_values = false) { if ($this->position <= 0) { $this->position = SmartBlogGallaryImage::getHighestPosition($this->id_smart_blog_post) + 1; } return parent::add($autodate, $null_values); }
public function add($autodate = true, $null_values = false) { $this->getFieldsValues(); $result = parent::add($autodate, $null_values); $this->updateShopManuf(); return $result; }
public function add($autodate = true, $null_values = false) { // $this->position = self::getLastPosition((int)$this->id_leoblogcat); $context = Context::getContext(); $this->id_shop = $context->shop->id; return parent::add($autodate, $null_values); }
/** * Overriding check if currency rate is not empty and if currency with the same iso code already exists. * If it's true, currency is not added. * * @see ObjectModelCore::add() */ public function add($autodate = true, $nullValues = false) { if ((double) $this->conversion_rate <= 0) { return false; } return Currency::exists($this->iso_code, $this->iso_code_num) ? false : parent::add($autodate, $nullValues); }
public function add($autodate = true, $nullValues = false) { $this->position = self::getNbTabs($this->id_parent) + 1; if (parent::add($autodate, $nullValues)) { return self::initAccess($this->id); } return false; }
public function add($autodate = true, $nullValues = false) { if (parent::add($autodate, $nullValues)) { Module::hookExec('paymentCCAdded', array('paymentCC' => $this)); return true; } return false; }
public function add($autodate = true, $nullValues = false, $categories = null) { if (parent::add($autodate, $nullValues)) { $ret = true; } $this->updateCategories($categories); return $ret; }
public function add($autodate = true, $nullValues = true) { if (!parent::add($autodate, $nullValues)) { return false; } $this->FeatureId = $this->id; return true; }
public function add($autodate = true, $nullValues = false) { if (parent::add($autodate, $nullValues)) { Hook::exec('actionPaymentCCAdd', array('paymentCC' => $this)); return true; } return false; }
/** * @see ObjectModel::add() */ public function add($autodate = true, $null_values = false) { if (!parent::add($autodate, $null_values)) { return false; } Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', '1'); return true; }
public function add($autodate = true, $nullValues = false) { if (parent::add($autodate, $nullValues)) { // Set cache of feature detachable to true Configuration::updateGlobalValue('PS_ALIAS_FEATURE_ACTIVE', '1'); return true; } return false; }
public function add($autodate = true, $nullValues = false) { if (!parent::add($autodate, $nullValues)) { return false; } elseif (isset($_POST['products'])) { return $this->setProducts(Tools::getValue('products')); } return true; }
public function add($autodate = true, $nullValues = false) { if ($this->position <= 0) { $this->position = AttributeGroup::getHigherPosition() + 1; } $return = parent::add($autodate, true); Hook::exec('actionAttributeGroupSave', array('id_attribute_group' => $this->id)); return $return; }
public function add($autodate = true, $null_values = false) { if (!($result = parent::add($autodate, $null_values))) { return false; } Referrer::refreshCache(array(array('id_referrer' => $this->id))); Referrer::refreshIndex(array(array('id_referrer' => $this->id))); return $result; }
public function add($autodate = true, $null_values = true) { $cart = new Cart($this->id_cart); Hook::exec('actionBeforeAddOrder', array('order' => $this, 'cart' => $cart)); if (ObjectModel::add($autodate, $null_values)) { return SpecificPrice::deleteByIdCart($this->id_cart); } return false; }
public function add($autodate = true, $nullValues = false) { if ($this->position <= 0) { $this->position = Feature::getHigherPosition() + 1; } $return = parent::add($autodate, true); Hook::exec('actionFeatureSave', array('id_feature' => $this->id)); return $return; }
/** * @see ObjectModel::add() */ public function add($autodate = true, $null_values = false) { if (!parent::add($autodate, $null_values)) { return false; } if (Validate::isUnsignedId($this->id_customer)) { Customer::resetAddressCache($this->id_customer, $this->id); } return true; }
public $website; public $facebook; public $position; public $date_add; public $date_upd; protected static $_links = array(); /** * @see ObjectModel::$definition */ public static $definition = array('table' => 'friend', 'primary' => 'id_friend', 'fields' => array('active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), 'position' => array('type' => self::TYPE_INT), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64), 'website' => array('type' => self::TYPE_STRING), 'facebook' => array('type' => self::TYPE_STRING)));
public function add($autodate = true, $null_values = false) { $context = Context::getContext(); $id_shop = $context->shop->id; $res = parent::add($autodate, $null_values); $res &= Db::getInstance()->execute(' INSERT INTO `' . _DB_PREFIX_ . 'iqitsizeguide` (`id_shop`, `id_iqitsizeguide_guides`) VALUES(' . (int) $id_shop . ', ' . (int) $this->id . ')'); return $res; }
/** * additionnal treatments for Tab when creating new one : * - generate a new position * - add access for admin profile * * @param boolean $autodate * @param boolean $nullValues * @return int id_tab */ public function add($autodate = true, $nullValues = false) { $this->position = self::getNewLastPosition($this->id_parent); if (parent::add($autodate, $nullValues)) { // refresh cache when adding new tab self::$_getIdFromClassName[$this->class_name] = $this->id; return self::initAccess($this->id); } return false; }
public function add($autodate = true, $nullValues = false) { if (parent::add($autodate, $nullValues)) { // Flush cache when we adding a new custom price $this->flushCache(); // Set cache of feature detachable to true Configuration::updateGlobalValue('PS_SPECIFIC_PRICE_FEATURE_ACTIVE', '1'); return true; } return false; }
public function add($autodate = true, $null_values = false) { if (parent::add($autodate, $null_values)) { // Set cache of feature detachable to true if ($this->active) { Configuration::updateGlobalValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE', '1'); } return true; } return false; }
public function add($autodate = true, $null_values = false) { if ($this->position <= 0) { $this->position = Attribute::getHigherPosition($this->id_attribute_group) + 1; } $return = parent::add($autodate, $null_values); if ($return) { Hook::exec('actionAttributeSave', array('id_attribute' => $this->id)); } return $return; }
public function add($autodate = true, $nullValues = false) { $this->alias = Tools::replaceAccentedChars($this->alias); $this->search = Tools::replaceAccentedChars($this->search); if (parent::add($autodate, $nullValues)) { // Set cache of feature detachable to true Configuration::updateGlobalValue('PS_ALIAS_FEATURE_ACTIVE', '1'); return true; } return false; }