Ejemplo n.º 1
0
 public function initDataTypes(Pap_Common_Reports_StatisticsBase $statistics) {
     foreach ($this->getUserCommissionTypes($statistics->getCampaignId()) as $commissionTypeRecord) {
         $commissionType = new Pap_Db_CommissionType();
         $commissionType->fillFromRecord($commissionTypeRecord);
         $statistics->addDataType(new Pap_Features_ActionCommission_ActionDataType($commissionType, Pap_Stats_Computer_Graph_Transactions::COUNT, $commissionTypeRecord->get('campaignname')));
         $statistics->addDataType(new Pap_Features_ActionCommission_ActionDataType($commissionType, Pap_Stats_Computer_Graph_Transactions::COMMISSION, $commissionTypeRecord->get('campaignname')));
         $statistics->addDataType(new Pap_Features_ActionCommission_ActionDataType($commissionType, Pap_Stats_Computer_Graph_Transactions::TOTALCOST, $commissionTypeRecord->get('campaignname')));
     }
 }
Ejemplo n.º 2
0
    public function initDataTypes(Pap_Common_Reports_StatisticsBase $statistics) {                
		$statistics->addDataType(new Pap_Common_Reports_Chart_TransactionDataType(
            'recurringCount', $this->_('Number of Recurring'), Pap_Stats_Computer_Graph_Transactions::COUNT, Pap_Common_Constants::TYPE_RECURRING));
        $statistics->addDataType(new Pap_Common_Reports_Chart_TransactionDataType(
            'recurringCommission', $this->_('Commission of Recurring'), Pap_Stats_Computer_Graph_Transactions::COMMISSION, Pap_Common_Constants::TYPE_RECURRING));
        $statistics->addDataType(new Pap_Common_Reports_Chart_TransactionDataType(
            'recurringTotalCost', $this->_('Revenue of Recurring'), Pap_Stats_Computer_Graph_Transactions::TOTALCOST, Pap_Common_Constants::TYPE_RECURRING));
    }
Ejemplo n.º 3
0
    /**
     * Clicks - Raw
     Clicks - Unique
     Tier 1 - Trial Subscription
     Tier 1 - Recurring Subsription
     Tier 1 - Sales
     Tier 1 - Commissions
     Tier 2 - Trial Subscription
     Tier 2 - Recurring Subsription
     Tier 2 - Sales
     Tier 2 - Commissions
     Grand Total Sales
     Grand Total Commissions
     */
    public function initDataTypes(Pap_Common_Reports_StatisticsBase $statistics) {
        $statistics->clearDataTypes();

        $statistics->addDataType(new Pap_Common_Reports_Chart_ClickDataType($this->_('Clicks - Raw'), Pap_Db_Table_Clicks::RAW));
        $statistics->addDataType(new Pap_Common_Reports_Chart_ClickDataType($this->_('Clicks - Unique'), Pap_Db_Table_Clicks::UNIQUE));

        foreach ($this->getUserCommissionTypes($statistics->getCampaignId()) as $commissionTypeRecord) {
            $commissionType = new Pap_Db_CommissionType();
            $commissionType->fillFromRecord($commissionTypeRecord);
            $statistics->addDataType(new CustomOptionsInTrendsReport_TierActionDataType($commissionType, 1));
            $statistics->addDataType(new CustomOptionsInTrendsReport_TierActionDataType($commissionType, 2));
        }

        $statistics->addDataType(new CustomOptionsInTrendsReport_TierTransactionDataType(
            'saleTotalCost1', $this->_('Tier 1 - Sales'), Pap_Stats_Computer_Graph_Transactions::COUNT, 1));
        $statistics->addDataType(new CustomOptionsInTrendsReport_TierTransactionDataType(
            'saleTotalCost2', $this->_('Tier 2 - Sales'), Pap_Stats_Computer_Graph_Transactions::COUNT, 2));
        
        $statistics->addDataType(new CustomOptionsInTrendsReport_TierTransactionDataType(
            'saleCommission1', $this->_('Tier 1 - Commissions'), Pap_Stats_Computer_Graph_Transactions::COMMISSION, 1));
        $statistics->addDataType(new CustomOptionsInTrendsReport_TierTransactionDataType(
            'saleCommission2', $this->_('Tier 2 - Commissions'), Pap_Stats_Computer_Graph_Transactions::COMMISSION, 2));
        
        $statistics->addDataType(new Pap_Common_Reports_Chart_TransactionDataType(
            'saleTotalCost', $this->_('Grand Total Sales'),
            Pap_Stats_Computer_Graph_Transactions::COUNT, Pap_Common_Constants::TYPE_ACTION));
        $statistics->addDataType(new CustomOptionsInTrendsReport_TierTransactionDataType(
            'saleCommission', $this->_('Grand Total Commissions'), Pap_Stats_Computer_Graph_Transactions::COMMISSION, Pap_Stats_Computer_Graph_Transactions::ALL_TIERS));
    }