protected function loadSetting() {
        parent::loadSetting();        
        
        $this->addSetting(Pap_Settings::AFFILIATE_LOGOUT_URL);
        $this->addSetting(Pap_Settings::AFFILIATE_AFTER_LOGIN_SCREEN);
        $this->addSetting(Pap_Settings::AFFILIATE_AFTER_LOGIN_SCREEN_MAXIMIZE);

        $this->addSetting(Pap_Settings::SUPPORT_VAT_SETTING_NAME);
        
        $this->addValue('signupSubaffiliatesLink', Pap_Affiliates_Promo_SignupForm::getSignupScriptUrl());
        $this->addValue('signupPageUrl', Gpf_Paths::getAffiliateSignupUrl());       
        
        $this->addSetting(Pap_Settings::AFF_NOTIFICATION_ON_NEW_SALE_ENABLED_SETTING_NAME);
        $this->addSetting(Pap_Settings::AFF_NOTIFICATION_ON_CHANGE_COMMISSION_STATUS_ENABLED_SETTING_NAME);
        $this->addSetting(Pap_Settings::AFF_NOTIFICATION_ON_SUBAFF_SIGNUP_ENABLED_SETTING_NAME);
        $this->addSetting(Pap_Settings::AFF_NOTIFICATION_ON_SUBAFF_SALE_ENABLED_SETTING_NAME);
        $this->addSetting(Pap_Settings::AFF_NOTIFICATION_ON_DIRECT_LINK_ENABLED);
        $this->addSetting(Pap_Settings::AFF_NOTIFICATION_DAILY_REPORT_ENABLED);
        $this->addSetting(Pap_Settings::AFF_NOTIFICATION_WEEKLY_REPORT_ENABLED);
        $this->addSetting(Pap_Settings::NOTIFICATION_WEEKLY_REPORT_SENT_ON);
        $this->addSetting(Pap_Settings::NOTIFICATION_WEEKLY_REPORT_START_DAY);
        $this->addSetting(Pap_Settings::AFF_NOTIFICATION_MONTHLY_REPORT_ENABLED);
        $this->addSetting(Pap_Settings::NOTIFICATION_MONTHLY_REPORT_SENT_ON);
        $this->addSetting(Pap_Settings::AFFILIATE_CANNOT_CHANGE_HIS_USERNAME);
        $this->addSetting(Pap_Settings::MAIL_TO_FRIEND_ALLOW_TO_USE_SYSTEM_EMAIL);
    }   
Пример #2
0
 public static function getSignupScriptUrl($useParent = true, Pap_Common_User $user = null) {  	
     $url = Gpf_Paths::getAffiliateSignupUrl();
     if ($useParent) {
         if ($user == null) {
         	$user = Pap_Affiliates_User::getUserById(Gpf_Session::getAuthUser()->getPapUserId());
         }
         $url .= '?' . Pap_Tracking_Request::getAffiliateClickParamName() . '=' . $user->getRefId();
     }
     return $url;   
 }