private function isValidCommission(Pap_Contexts_Click $context) { $context->debug(' Checking if we should save commissions for this click'); if(!$context->getDoTrackerSave()) { $context->debug(" Saving cookies in Tracker is disabled (getDoTrackerSave() returned false), so we set also saving comissions (getDoCommissionsSave() to false"); return false; } if($context->getCampaignObject() == null) { $context->debug(' STOPPING, campaign not recognized'); return false; } $clickCommission = $this->getCampaignClickCommissions($context); if ($clickCommission == null) { $context->debug(' STOPPING, campaign does not have per click commission'); return false; } $context->setCommissionTypeObject($clickCommission); if (!$this->setCurrency($context)) { $context->debug(' STOPPING, no default currency defined'); return false; } $this->initTransactionObject($context); $context->debug(' Checking ended'); $context->debug(''); return true; }
public function saveRotatorClick(Pap_Contexts_Click $context) { $context->debug('FEATURE BannerRotator: saveRotatorClick started'); if($context->getDoTrackerSave()) { $banner = $context->getBannerObject(); if($banner != null && is_object($banner) && $banner->getParentBanner()!=null){ $context->debug(' FEATURE BannerRotator: Saving rotator click'); $this->saveChildClick($banner, $context); } else { $context->debug(' FEATURE BannerRotator: Banner is not in rotator, skipping'); } } else { $context->debug('FEATURE BannerRotator: Saving in Tracker is disabled (getDoTrackerSave() returned false), continuing without saving'); } $context->debug('FEATURE BannerRotator: saveRotatorClick ended'); $context->debug(''); return Gpf_Plugins_Engine::PROCESS_CONTINUE; }