public function addCommission(Pap_Contexts_Signup $signupContext) { if (($user = $signupContext->getUserObject()) == null) { return; } $campaignId = Gpf_Settings::get(SignupActionCommissions_Config::AFTER_SIGNUP_ACTION_CAMPAIGNID); $actionCode = Gpf_Settings::get(SignupActionCommissions_Config::AFTER_SIGNUP_ACTION_CODE); if ($actionCode == '') { Gpf_Log::error('SignupActionCommissions plugin: No Action code set'); return; } $saleTracker = new Pap_Tracking_ActionTracker(); $action = $saleTracker->createAction($actionCode); $action->setAffiliateID($user->getId()); $action->setStatus($user->getStatus()); $action->setOrderId(SignupActionCommissions_Config::DEFAULT_ORDER_ID); if ($campaignId != '') { $action->setCampaignID($campaignId); } try { $saleTracker->register(); } catch (Gpf_Exception $e) { Gpf_Log::error('SignupActionCommissions plugin: '.$e->getMessage()); } }
public function afterSignup(Pap_Contexts_Signup $signupContext) { $form = $signupContext->getFormObject(); if (!$form->existsField('a_cid')) { return false; } $this->signUserToCampaign($signupContext->getUserObject()->getId(), $form->getFieldValue('a_cid'), $form); }
private function sendNotificationToMerchant(Pap_Contexts_Signup $context) { $context->debug('Sending notification email to merchant started'); $context->debug('Notification on new affiliate signup email is enabled, sending to address: '.Pap_Common_User::getMerchantEmail()); $this->sendMerchantNewUserSignupMail($context->getUserObject(), Pap_Common_User::getMerchantEmail()); $context->debug('Sending notification email to merchant ended'); }
public function sendMail(Pap_Contexts_Signup $context) { $mail = new AutoResponsePlus_Mail(); $mail->setUser($context->getUserObject()); $mail->addRecipient(Gpf_Settings::get(AutoResponsePlus_Config::REMOTE_CONTROL_EMAIL)); $mail->sendNow(); }
public function afterSignup(Pap_Contexts_Signup $signupContext) { $campaignsIds = $this->getCampaignsIdsFromString(Gpf_Settings::get(SignupToPrivateCampaigns_Config::CAMPAIGNS_IDS)); foreach ($campaignsIds as $campaignId) { $this->signUserToCampaign($signupContext->getUserObject()->getId(), $campaignId, $signupContext->getFormObject()); } }
public function sendMail(Pap_Contexts_Signup $context) { $mail = new AWeber_Mail(); $mail->setUser($context->getUserObject()); $mail->addRecipient(Gpf_Settings::get(AWeber_Config::AUTORESPONDER_ADDRESS)); $mail->sendNow(); }
private function sendBeforeApprovalEmail(Pap_Contexts_Signup $context) { $context->debug(' Sending before-approval email to affiliate started'); $context->debug('Before-approval email is enabled, sending to email address: '.$context->getUserObject()->getEmail()); $this->sendNewUserSignupBeforeApprovalMail($context->getUserObject(), $context->getUserObject()->getEmail(), $context); $context->debug('Sending before-approval email to affiliate ended'); }