Пример #1
0
	public function setCampaignsVariable(Pap_Mail_UserMail $mailTemplate) {
	    if ($mailTemplate->getUser() == null) {
	       $mailTemplate->setVariable('affiliatecampaigns', array());
	       return;
	    }
		$affiliateCampaigns = new Pap_Common_Campaign_AffiliateCampaigns($this->getCampaigns(), $mailTemplate->getUser()->getId());
		$mailTemplate->setVariable('affiliatecampaigns', $affiliateCampaigns->getAffiliateCampaigns()->toArray());
	}
 /**
  * Load list of template variables for custom template
  *
  * @service mail_template read
  * @param Gpf_Rpc_Params $params
  */
 public function getTemplateVariables(Gpf_Rpc_Params $params)
 {
     $recordSet = new Gpf_Data_RecordSet();
     $recordSet->setHeader(array('code', 'name'));
     //TODO - treba prerobit cez extension point ... v pap newsletter feature budu premenne definovane cez Pap_Mail_UserMail
     $objTemplate = new Pap_Mail_UserMail();
     foreach ($objTemplate->getTemplateVariables() as $code => $name) {
         $recordSet->add(array($code, $name));
     }
     return $recordSet;
 }
Пример #3
0
    /**
     * Load list of template variables for custom template
     *
     * @service mail_template read
     * @param Gpf_Rpc_Params $params
     */
    public function getTemplateVariables(Gpf_Rpc_Params $params) {
        $recordSet = new Gpf_Data_RecordSet();
        $recordSet->setHeader(array('code', 'name'));

        $objTemplate = new Pap_Mail_UserMail();

        foreach ($objTemplate->getTemplateVariables() as $code => $name) {
            $recordSet->add(array($code, $name));
        }

        return $recordSet;
    }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'on_subaffiliate_signup.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - New Subaffiliate signup');
     $this->subject = Gpf_Lang::_runtime('New subaffiliate signed up');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'autoregisteringaffiliates_affiliate_on_first_sale.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Auto Registering Affiliates - Affiliate - First Sale / Lead');
     $this->subject = Gpf_Lang::_runtime('Welcome to our affiliate program - First Sale / Lead');
 }
Пример #6
0
 protected function setTimeVariableValues($timeOffset = 0) {
     parent::setTimeVariableValues($timeOffset);
     $firstClickTime = Gpf_Common_DateUtils::getTimestamp($this->transaction->get(Pap_Db_Table_Transactions::FIRST_CLICK_TIME));
     $lastClickTime = Gpf_Common_DateUtils::getTimestamp($this->transaction->get(Pap_Db_Table_Transactions::LAST_CLICK_TIME));
     $this->setVariable('firstclicktime', Gpf_Common_DateUtils::getDateTime($firstClickTime + $timeOffset));
     $this->setVariable('lastclicktime', Gpf_Common_DateUtils::getDateTime($lastClickTime + $timeOffset));
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'new_user_signup_approved.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - New User Signup Approved');
     $this->subject = '{$firstname}' . Gpf_Lang::_runtime(', welcome to our affiliate program');
 }
 protected function setVariableValues() {
 	parent::setVariableValues();    	
 	$this->setVariable('invoice', $this->payout->getInvoice());
 	$this->setVariable('affiliatenote', $this->payout->getAffiliateNote());
 	$this->setVariable('amount', $this->payout->getAmountAsText());
 	$this->setVariable('invoicenumber', $this->payout->getInvoiceNumber());
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'new_user_signup_declined.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - New User Signup Declined');
     $this->subject = Gpf_Lang::_runtime('You have been declined in affiliate program');
 }
Пример #10
0
	protected function setTimeVariableValues($timeOffset = 0) {
		$this->timeOffset = $timeOffset;
		parent::setTimeVariableValues($this->timeOffset);
		$this->initDate($this->statsParams, $this->timeOffset);
		$this->setVariable('dateFrom', Gpf_Common_DateUtils::getDateInLocaleFormat(strtotime($this->dateFrom) + $this->timeOffset));
		$this->setVariable('dateTo', Gpf_Common_DateUtils::getDateInLocaleFormat(strtotime($this->dateTo) + $this->timeOffset));
	}
 protected function setVariableValues() {
     parent::setVariableValues();
     
     $this->setVariable('directlinks_approved', $this->approvedDirectLinks);
     $this->setVariable('directlinks_declined', $this->declinedDirectLinks);
     $this->setVariable('directlinks_pending', $this->pendingDirectLinks);
     $this->setVariable('directlinks_deleted', $this->deletedDirectLinks);
 }
 protected function setVariableValues() {
     parent::setVariableValues();
     $quickTaskGroup = new Gpf_Tasks_QuickTaskGroup();
     $this->setVariable('new_user_signup_approve_link', 
                         $this->createApproveDeclineTask($quickTaskGroup, Pap_Common_Constants::STATUS_APPROVED));
     $this->setVariable('new_user_signup_decline_link',
                         $this->createApproveDeclineTask($quickTaskGroup, Pap_Common_Constants::STATUS_DECLINED));
     $this->setVariable('new_user_signup_status', $this->getUser()->getStatus());
 }
 protected function setVariableValues() {
     parent::setVariableValues();
     $this->setVariable('campaignid', $this->campaign->getId());
     $this->setVariable('campaignname', Gpf_Lang::_localizeRuntime($this->campaign->getName(), $this->getRecipientLanguage()));
     $this->setVariable('campaignstatus', Pap_Common_Constants::getStatusAsText($this->campaign->getCampaignStatus()));
     $this->setVariable('campaigntype', $this->getTypeAsText($this->campaign->getCampaignType()));
     $this->setVariable('campaigndescription', Gpf_Lang::_localizeRuntime($this->campaign->getDescription(), $this->getRecipientLanguage()));
     $this->setVariable('campaignlongdescription', Gpf_Lang::_localizeRuntime($this->campaign->getLongDescription(), $this->getRecipientLanguage()));
 }
 protected function setVariableValues() {
     parent::setVariableValues();
     
     $this->createQuickTaskVariables();
     $this->setVariable('directlink_url', $this->directLink->getUrl());
     $this->setVariable('directlink_note', $this->directLink->getNote());
     $this->setVariable('directlink_approve', $this->quickTaskApproveUrl);
     $this->setVariable('directlink_decline', $this->quickTaskDeclineUrl);
 }
Пример #15
0
 protected function setVariableValues() {
 	parent::setVariableValues();
 	
 	$this->setVariable('payment', $this->payout->getAmountAsText());
 	$this->setVariable('payoutcurrency', $this->payout->getCurrency()->getSymbol());
 	$this->setVariable('invoicenumber', $this->payout->getInvoiceNumber());
 	if ($this->payout->getPayoutOption() != null) {
         $this->setVariable('payoutmethod', Gpf_Lang::_localizeRuntime($this->payout->getPayoutOption()->getName(), $this->getRecipientLanguage()));
 	}
 }
    public function setUserMailTemplateVariables(Pap_Mail_UserMail $template) {
        try {
            if ($template->getUser() == null) {
                throw new Gpf_Exception('User not set in UserMail');
            }
            $location = $this->getLocation($template->getUser()->getIp()); //-----------------------
            
            $template->setVariable('affiliateIpCountryCode', $location->getCountryCode());
            $template->setVariable('affiliateIpCountryName', $location->getCountryName());
            $template->setVariable('affiliateIpCity', $location->getCity());
            $template->setVariable('affiliateIpLongitude', $location->getLongitude());
            $template->setVariable('affiliateIpLatitude', $location->getLatitude());

        } catch (Gpf_Exception $e) {
            $template->setVariable('affiliateIpCountryCode', $this->_('Undefined'));
            $template->setVariable('affiliateIpCountryName', $this->_('Undefined'));
            $template->setVariable('affiliateIpCity', $this->_('Undefined'));
            $template->setVariable('affiliateIpLongitude', $this->_('Undefined'));
            $template->setVariable('affiliateIpLatitude', $this->_('Undefined'));
        }
    }
 protected function setVariableValues() {
 	parent::setVariableValues();
 	$this->setVariable("emailsubject", $this->userSubject);
 	$this->setVariable("emailtext", $this->userText);
 }    
 protected function buildSelect() {
     $template = new Pap_Mail_UserMail();
     $this->buildSelectFromTemplateVariables($template->getTemplateVariables());
 }
 protected function setVariableValues() {
     parent::setVariableValues();
     $this->setVariable('confirmationLink', $this->createApproveDeclineTask(Pap_Common_Constants::STATUS_APPROVED));
 }