Example #1
0
 public function update($null_values = false)
 {
     $return = parent::update($null_values);
     Product::updateDefaultAttribute($this->id_product);
     return $return;
 }
Example #2
0
 public function update($null_values = false)
 {
     // Empty related caches
     if (isset(self::$_countriesIds[$this->address_id])) {
         unset(self::$_countriesIds[$this->address_id]);
     }
     if (isset(self::$_zonesIds[$this->address_id])) {
         unset(self::$_zonesIds[$this->address_id]);
     }
     if (JeproshopTools::isUnsignedInt($this->customer_id)) {
         JeproshopCustomerModelCustomer::resetAddressCache($this->customer_id);
     }
     return parent::update($null_values);
 }
Example #3
0
 public function update($nullValues = false)
 {
     if ($this->group_type == 'color') {
         $this->is_color_group = 1;
     } else {
         $this->is_color_group = 0;
     }
     $return = parent::update($nullValues);
     Hook::exec('actionAttributeGroupSave', array('id_attribute_group' => $this->id));
     return $return;
 }
Example #4
0
 public function update($null_values = false)
 {
     Cache::clean('getContextualValue_' . $this->id . '_*');
     return parent::update($null_values);
 }
Example #5
0
 public function update($null_values = false)
 {
     $this->file_size = filesize(_PS_DOWNLOAD_DIR_ . $this->file);
     return parent::update($null_values);
 }
Example #6
0
 public function update($null_values = false)
 {
     return parent::update($null_values) && $this->_updateCache();
 }
Example #7
0
 public function update($autodate = true, $nullValues = false)
 {
     if ((double) $this->conversion_rate <= 0) {
         return false;
     }
     return parent::update($autodate, $nullValues);
 }
Example #8
0
 public function update($nullValues = false)
 {
     $this->birthday = empty($this->years) ? $this->birthday : (int) $this->years . '-' . (int) $this->months . '-' . (int) $this->days;
     if ($this->newsletter && !Validate::isDate($this->newsletter_date_add)) {
         $this->newsletter_date_add = date('Y-m-d H:i:s');
     }
     if (isset(Context::getContext()->controller) && Context::getContext()->controller->controller_type == 'admin') {
         $this->updateGroup($this->groupBox);
     }
     if ($this->deleted) {
         $addresses = $this->getAddresses((int) Configuration::get('PS_LANG_DEFAULT'));
         foreach ($addresses as $address) {
             $obj = new Address((int) $address['id_address']);
             $obj->delete();
         }
     }
     return parent::update(true);
 }
Example #9
0
 public function update($null_values = false)
 {
     if (empty($this->stats_date_from) || $this->stats_date_from == '0000-00-00') {
         $this->stats_date_from = date('Y-m-d');
     }
     if (empty($this->stats_date_to) || $this->stats_date_to == '0000-00-00') {
         $this->stats_date_to = date('Y-m-d');
     }
     $this->saveOptin();
     $this->updateTextDirection();
     return parent::update($null_values);
 }
Example #10
0
 public function update($null_values = false)
 {
     if (parent::update($null_values)) {
         // Refresh cache of feature detachable because the row can be deactive
         Configuration::updateGlobalValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE', ProductDownload::isCurrentlyUsed($this->def['table'], true));
         return true;
     }
     return false;
 }