/** * Set template, label and description data per store * * @return Enterprise_Reminder_Model_Rule */ protected function _afterLoad() { parent::_afterLoad(); $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; }
/** * Set coupon code and uses per coupon * * @return Mage_SalesRule_Model_Rule */ protected function _afterLoad() { return parent::_afterLoad(); }
/** * Set coupon code and uses per coupon * * @return Mage_SalesRule_Model_Rule */ protected function _afterLoad() { $this->setCouponCode($this->getPrimaryCoupon()->getCode()); if ($this->getUsesPerCoupon() !== null && !$this->getUseAutoGeneration()) { $this->setUsesPerCoupon($this->getPrimaryCoupon()->getUsageLimit()); } return parent::_afterLoad(); }
protected function _afterLoad() { parent::_afterLoad(); if (is_string($this->_getData('payment_methods_ids'))) { $this->setPaymentMethodsIds(explode(',', $this->_getData('payment_methods_ids'))); } if (is_string($this->_getData('shipping_methods_ids'))) { $this->setShippingMethodsIds(explode(',', $this->_getData('shipping_methods_ids'))); } if (is_string($this->_getData('customer_group_ids'))) { $this->setCustomerGroupIds(explode(',', $this->_getData('customer_group_ids'))); } if (is_string($this->_getData('website_ids'))) { $this->setWebsiteIds(explode(',', $this->_getData('website_ids'))); } }