protected function _afterLoad() { if (is_string($this->getCategoryIds())) { $this->setCategoryIds(explode(',', $this->getCategoryIds())); } return parent::_afterLoad(); }
protected function _afterLoad() { parent::_afterLoad(); if (!is_null($this->getCustomerGroup())) { $this->setCustomerGroupIds(explode(',', $this->getCustomerGroup())); } }
/** * Processing object after load data * * @return Maverick_Crawler_Model_Crawler */ protected function _afterLoad() { if ($type = $this->getType()) { Mage::dispatchEvent($type . '_load_after', $this->_getEventData()); } return parent::_afterLoad(); }
protected function _afterLoad() { parent::_afterLoad(); // if (!$this->getTaxPostcode()) { // $this->setTaxPostcode('*'); // } }
protected function _afterLoad() { parent::_afterLoad(); Mage::getSingleton('oscommerce/config')->initForeignConnection($this->getData()); // if (Mage::app()->getRequest()->getActionName() == 'run') { // $this->importStores(); // } }
/** * Decrypts encrypted details once they are loaded from DB * */ protected function _afterLoad() { parent::_afterLoad(); foreach (array('username', 'password') as $field) { $this->setData($field, $this->decrypt($this->getData($field))); } return $this; }
protected function _afterLoad() { if ($this->getData('unsubscribed_customers') !== null && is_string($this->getData('unsubscribed_customers'))) { $this->setData('unsubscribed_customers', explode(',', $this->getData('unsubscribed_customers'))); } else { $this->setData('unsubscribed_customers', array()); } return parent::_afterLoad(); }
protected function _afterLoad() { if (is_null($storeIds = $this->getCategoryStoreIds())) { $this->setCategoryStoreIds($this->getResource()->getStoreIds($this->getId())); } elseif (!is_array($storeIds)) { $this->setCategoryStoreIds(array_unique(explode(',', $storeIds))); } return parent::_afterLoad(); }
/** * @return Firegento_FlexCms_Model_Content_Data */ protected function _afterLoad() { /** @var Firegento_FlexCms_Model_Content_Data $contentData */ $contentData = $this->getContentDataModel(); $this->setContent($contentData->getContent()); $this->setDefaultContent($contentData->getDefaultContent()); $this->setIsActive($contentData->getIsActive()); return parent::_afterLoad(); }
/** * Perform actions after object load */ protected function _afterLoad() { Mage_Core_Model_Abstract::_afterLoad(); $conditionsArr = unserialize($this->getConditionsSerialized()); if (!empty($conditionsArr) && is_array($conditionsArr)) { $this->getConditions()->loadArray($conditionsArr); } return $this; }
protected function _afterLoad() { if (is_string($this->getGuiData())) { $guiData = unserialize($this->getGuiData()); } else { $guiData = ''; } $this->setGuiData($guiData); parent::_afterLoad(); }
protected function _afterLoad() { $messages = @unserialize($this->getData('messages')); if (is_array($messages)) { foreach ($messages as $message) { $this->addMessage($message['text'], $message['admin_user'], $message['date']); } } return parent::_afterLoad(); }
/** * @return Firegento_FlexCms_Model_Content_Data */ protected function _afterLoad() { if (!is_array($this->getContent())) { try { $this->setContent(Zend_Json::decode($this->getContent())); } catch (Exception $e) { $this->setContent(array()); } } return parent::_afterLoad(); }
/** * Processing object after load data * * @return Mage_Core_Model_Abstract */ protected function _afterLoad() { if (!$this->getId() && !$this->getPosition()) { $this->setPosition($this->_getNextPosition()); } if (strpos($this->getAttributeCode(), ',') !== false) { $this->setAttributeCode(explode(',', $this->getAttributeCode())); } $this->setOptions(unserialize($this->getOptions())); return parent::_afterLoad(); }
protected function _afterLoad() { $helper = Mage::helper('core'); $normalParams = $helper->jsonDecode($this->getParams()); $hoverParams = $helper->jsonDecode($this->getHover()); $style['normal'] = $this->_parseToCss($normalParams); $style['hover'] = $this->_parseToCss($hoverParams); $style['settings'] = $helper->jsonDecode($this->getSettings()); $this->setData('style', $style); parent::_afterLoad(); }
protected function _afterLoad() { parent::_afterLoad(); if (is_string($this->getTransactionObject())) { $this->setTransactionObject(Mage::helper('SaferpayCw')->unserialize($this->getTransactionObject())); $orderId = $this->getOrderId(); if (!empty($orderId)) { Customweb_SaferpayCw_Model_ConfigurationAdapter::setStore($this->getOrder()); } } }
/** * Unserialize value * @return */ protected function _afterLoad() { $value = $this->getData('value'); if (!empty($value)) { $value = explode(',', $value); } else { $value = array(); } $this->setData('value', $value); return parent::_afterLoad(); }
protected function _afterLoad() { parent::_afterLoad(); if (!$this->getId()) { return $this; } if (strlen($this->getStoreIds())) { $this->setStoreId(explode(',', $this->getStoreIds())); } try { $this->refreshDatetimeObject(); } catch (Exception $e) { } $status = (int) $this->getData('status'); if ($status < self::STATUS_COMPLETE && $this->getData('start_time_obj')) { $oldStatus = $status; $status = self::STATUS_PENDING; if (time() > $this->getData('start_time_obj')->getTimestamp()) { $status = self::STATUS_PROCESSING; } if (time() > $this->getData('end_time_obj')->getTimestamp()) { $status = self::STATUS_DIALING; } $this->setData('status', $status); if ($oldStatus != $status) { $isChangedStatus = true; try { $this->save(); } catch (Exception $e) { } } } if ($this->getData('status') == self::STATUS_DIALING) { if ($this->getData('auto_prize')) { $this->setData('status', self::STATUS_COMPLETE); try { $this->save(); $this->dialLuckDraw(); } catch (Exception $e) { } try { $this->sendAdminEmail(); } catch (Exception $e) { } } elseif (isset($isChangedStatus) && $isChangedStatus) { try { $this->sendAdminEmail(); } catch (Exception $e) { } } } return $this; }
protected function _afterLoad() { parent::_afterLoad(); if ($this->getData('expired_time') && strtotime($this->getData('expired_time')) < time() && $this->getData('status') < self::STATUS_USED) { $this->setData('status', self::STATUS_EXPIRED); try { $this->save(); } catch (Exception $e) { } } return $this; }
protected function _afterLoad() { $guiData = ''; if (is_string($this->getGuiData())) { try { $guiData = Mage::helper('core/unserializeArray')->unserialize($this->getGuiData()); } catch (Exception $e) { Mage::logException($e); } } $this->setGuiData($guiData); parent::_afterLoad(); }
protected function _afterLoad() { if (is_array($cache = @unserialize($this->getData('cache')))) { $this->setData('cache', $cache); } else { $this->setData('cache', null); } if (is_array($variables = @unserialize($this->getData('custom_variables')))) { $this->setData('custom_variables', $variables); } else { $this->setData('custom_variables', null); } return parent::_afterLoad(); }
protected function _afterLoad() { //need to create new record (with default data) if it first time using of paybox direct if (!$this->getAccountHash()) { $this->setAccountHash($this->_accountHash); $this->setIncrementValue(1); $this->save(); } unset($this->_accountHash); //need to set default value of question number if it reach max value if ($this->getIncrementValue() >= self::MAX_QUESTION_NUMBER_VALUE) { $this->setResetDate('CURRENT_TIMESTAMP')->setIncrementValue(1); } return parent::_afterLoad(); }
/** * Perform actions after object load * * @return Enterprise_Reminder_Model_Rule */ protected function _afterLoad() { Mage_Core_Model_Abstract::_afterLoad(); $conditionsArr = unserialize($this->getConditionsSerialized()); if (!empty($conditionsArr) && is_array($conditionsArr)) { $this->getConditions()->loadArray($conditionsArr); } $storeData = $this->_getResource()->getStoreData($this->getId()); $defaultTemplate = self::XML_PATH_EMAIL_TEMPLATE; foreach ($storeData as $data) { $template = empty($data['template_id']) ? $defaultTemplate : $data['template_id']; $this->setData('store_template_' . $data['store_id'], $template); $this->setData('store_label_' . $data['store_id'], $data['label']); $this->setData('store_description_' . $data['store_id'], $data['description']); } return $this; }
/** * Perform actions after object load * * @return Bronto_Reminder_Model_Rule */ protected function _afterLoad() { Mage_Core_Model_Abstract::_afterLoad(); if (Mage::helper('bronto_verify')->isVersionMatch(Mage::getVersionInfo(), 1, array(array('<=', 6), array('edition' => 'Professional', 'major' => 9), 10, 11))) { $conditionsArr = unserialize($this->getConditionsSerialized()); if (!empty($conditionsArr) && is_array($conditionsArr)) { $this->getConditions()->loadArray($conditionsArr); } } $messageData = $this->_getResource()->getMessageData($this->getId()); foreach ($messageData as $data) { $message = empty($data['message_id']) ? null : $data['message_id']; $sendType = empty($data['send_type']) ? 'transactional' : $data['send_type']; $this->setData('store_message_' . $data['store_id'], $message)->setData('store_message_sendtype_' . $data['store_id'], $sendType)->setData('store_message_sendflags_' . $data['store_id'], $data['send_flags']); } return $this; }
/** * Unserialize database fields * @return AW_Autorelated_Model_Blocks */ protected function _afterLoad() { if ($this->getData('currently_viewed') && is_string($this->getData('currently_viewed'))) { $this->setData('currently_viewed', @unserialize($this->getData('currently_viewed'))); } if ($this->getData('related_products') && is_string($this->getData('related_products'))) { $this->setData('related_products', @unserialize($this->getData('related_products'))); } if ($this->getData('customer_groups') !== null && is_string($this->getData('customer_groups'))) { $this->setData('customer_groups', @explode(',', $this->getData('customer_groups'))); } if ($this->getData('date_from') && is_empty_date($this->getData('date_from'))) { $this->setData('date_from', ''); } if ($this->getData('date_to') && is_empty_date($this->getData('date_to'))) { $this->setData('date_to', ''); } if ($this->getData('store') !== null && is_string($this->getData('store'))) { $this->setData('store', @explode(',', $this->getData('store'))); } $this->humanizeData(); return parent::_afterLoad(); }
/** * Processing object after loading * * @return Mage_Core_Model_Abstract */ protected function _afterLoad() { if (!is_array($this->getSettings())) { $this->setSettings(unserialize($this->getSettings())); } $cronExpression = $this->getCronExpression(); if ($cronExpression) { //0 0 * * 1 $cronExpression = explode(' ', $cronExpression); $startTime = array($cronExpression[1], $cronExpression[0], 0); $this->setMepCronStartTime(implode(',', $startTime)); $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY; $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY; $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; if ($cronExpression[2] == '1') { $this->setMepCronFrequency($frequencyMonthly); } if ($cronExpression[4] == '1') { $this->setMepCronFrequency($frequencyWeekly); } } return parent::_afterLoad(); }
protected function _afterLoad() { if (is_null($categoryIds = $this->getCategoryIds())) { $this->setCategoryIds($this->getResource()->getCategoryIds($this->getId())); } elseif (!is_array($categoryIds)) { $this->setCategoryIds(array_unique(explode(',', $categoryIds))); } if (!is_null($categoryNamesIds = $this->getCategoryNamesIds())) { $this->setCategoryNamesIds($this->_parseCategoryNamesIds($categoryNamesIds)); } // processing tags if (is_null($tags = $this->getArticleTags())) { $tags = $this->getResource()->getTags($this->getId()); } elseif (!is_array($tags)) { $tags = explode(',', $tags); } if (isset($tags)) { foreach ($tags as $key => $value) { $tags[$key] = urldecode($value); } $this->setArticleTags($tags); } return parent::_afterLoad(); }
/** * Abstracting away the parent's after load method to make the code more unit testable * * @return Mage_Core_Model_Abstract */ protected function _parentAfterLoad() { return parent::_afterLoad(); }
/** * Trigger collect totals after loading, if required * * @return Mage_Sales_Model_Quote */ protected function _afterLoad() { // collect totals and save me, if required if (1 == $this->getData('trigger_recollect')) { $this->collectTotals()->save(); } return parent::_afterLoad(); }
/** * Apply event status * * @return Enterprise_CatalogEvent_Model_Event */ protected function _afterLoad() { $this->_initDisplayStateArray(); parent::_afterLoad(); $this->getStatus(); return $this; }