Exemplo n.º 1
0
 public function onLoadSignupForm(Am_Event $e)
 {
     $type = $this->getDi()->auth->getUserId() ? SavedForm::D_MEMBER : SavedForm::D_SIGNUP;
     if (($r = $e->getReturn()) && $r->isDefault($type) && $this->getConfig('redirect_to_cart')) {
         Am_Controller::redirectLocation(REL_ROOT_URL . '/cart');
     }
 }
Exemplo n.º 2
0
 public function onEmailTemplateTagSets(Am_Event $event)
 {
     $tagSets = $event->getReturn();
     $tagSets['reseller'] = array('%reseller.name_f%' => 'Reseller First Name', '%reseller.name_l%' => 'Reseller Last Name', '%reseller.login%' => 'Reseller Username', '%reseller.email%' => 'Reseller E-Mail', '%reseller.user_id%' => 'Reseller Internal ID#', '%reseller.street%' => 'Reseller Street', '%reseller.street2%' => 'Reseller Street (Second Line)', '%reseller.city%' => 'Reseller City', '%reseller.state%' => 'Reseller State', '%reseller.zip%' => 'Reseller ZIP', '%reseller.country%' => 'Reseller Country');
     foreach ($this->getDi()->userTable->customFields()->getAll() as $field) {
         if (@$field->sql && @$field->from_config) {
             $tagSets['reseller']['%reseller.' . $field->name . '%'] = 'Reseller ' . $field->title;
         }
     }
     $event->setReturn($tagSets);
 }
Exemplo n.º 3
0
 public function onEmailTemplateTagSets(Am_Event $event)
 {
     $tagSets = $event->getReturn();
     $tagSets['user']['%user.aff_link%'] = ___('User Affiliate Link');
     $tagSets['affiliate'] = array('%affiliate.name_f%' => 'Affiliate First Name', '%affiliate.name_l%' => 'Affiliate Last Name', '%affiliate.login%' => 'Affiliate Username', '%affiliate.email%' => 'Affiliate E-Mail', '%affiliate.user_id%' => 'Affiliate Internal ID#', '%affiliate.street%' => 'Affiliate Street', '%affiliate.street2%' => 'Affiliate Street (Second Line)', '%affiliate.city%' => 'Affiliate City', '%affiliate.state%' => 'Affiliate State', '%affiliate.zip%' => 'Affiliate ZIP', '%affiliate.country%' => 'Affiliate Country');
     foreach ($this->getDi()->userTable->customFields()->getAll() as $field) {
         if (@$field->sql && @$field->from_config) {
             $tagSets['affiliate']['%affiliate.' . $field->name . '%'] = 'Affiliate ' . $field->title;
         }
     }
     $tagSets['affiliate']['%affiliate.aff_link%'] = ___('Affiliate Affiliate Link');
     $event->setReturn($tagSets);
 }