----------------------------------------------------------------------
@OSC-Affiliate@CXg[iosCommerce2.2MS1Jpj
----------------------------------------------------------------------

CXg[ƂsȂOɂłȌԂɖ߂悤Ƀ[JɃf[^
̃obNAbvĂB


1.@f[^x[X쐬uaffiliate.sqlv

affiliate.sqlgpāA݂g̃f[^x[XɃe[uǉĂB

----------------------------------------------------------------------

2.@t@C̃Abv[h

osCommerce2.2MS1Jgł邱ƂmFĂt@C㏑ĂB
ucatalog/vuadmin/vׂ̂Ẵt@CAbv[hĂB

----------------------------------------------------------------------

3.@J^O̒ǉ

///// 菇1 /////@catalog/includes/apprication_top.php /////

ŏIsi"?>"̒OjɈȉ̍s}ĂB

// Include OSC-AFFILIATE
  require(DIR_WS_INCLUDES . 'affiliate_application_top.php');


///// 菇2 /////@catalog/checkout_process.php /////

\[XR[hňȉ̋LqTĂ

  // load the after_process function from the payment modules
  $payment_modules->after_process();

L̋Lq̒OɈȉ̍s}ĉB

  // Include OSC-AFFILIATE 
  require(DIR_WS_INCLUDES . 'affiliate_checkout_process.php');


///// 菇3 /////@catalog/includes/column_left.php /////

\[XR[hňȉ̋LqTĂ

  if ( (USE_CACHE == 'true') && !SID) {
    echo tep_cache_categories_box();
  } else {
    include(DIR_WS_BOXES . 'categories.php');
  }

  if ( (USE_CACHE == 'true') && !SID) {
    echo tep_cache_manufacturers_box();
  } else {
    include(DIR_WS_BOXES . 'manufacturers.php');
  }

̍sɈȉ̍sǉĂ

  require(DIR_WS_BOXES . 'affiliate.php');

@菇3ɊւẮABOẌʒu̕\ꏊ̃Tvł̂ŁA
Dȏꏊɕ\đvłB

///// 菇4 /////@catalog/includes/languages/japanese.php /////

ŏIsi"?>"̒OjɈȉ̍s}ĂB

include("affiliate_japanese.php");

*****@J^OI@*****

----------------------------------------------------------------------

4.@Ǘʑ̒ǉ

///// 菇1 /////@admin/index.php /////

\[XR[hňȉ̋LqTĂ

  require('includes/application_top.php');

̍sɈȉ̍sǉĂB

  require(DIR_WS_CLASSES . 'currencies.php');
  $currencies = new currencies();


///// 菇2 /////@admin/index.php /////

\[XR[hňȉ̋LqTĂ

array('title' => REPORTS_ORDERS, 'link' => tep_href_link(FILENAME_STATS_CUSTOMERS, 'selected_box=reports')))),

̍sɈȉ̍sǉĂ

               array('title' => BOX_HEADING_AFFILIATE,
                     'image' => 'affiliate.gif',
                     'href' => tep_href_link(FILENAME_AFFILIATE_SUMMARY, 'selected_box=affiliate'),
                     'children' => array(array('title' => BOX_AFFILIATE, 'link' => tep_href_link(FILENAME_AFFILIATE, 'selected_box=affiliate')),
                                         array('title' => BOX_AFFILIATE_BANNERS, 'link' => tep_href_link(FILENAME_AFFILIATE_BANNERS, 'selected_box=affiliate')))),


///// 菇3 /////@admin/index.php /////

\[XR[hňȉ̋LqTĂ

                <td width="140" valign="top"><table border="0" width="140" height="390" cellspacing="0" cellpadding="2">

ȉ̋LqɒuĂ

                <td width="160" valign="top"><table border="0" width="160" height="390" cellspacing="0" cellpadding="2">


///// 菇4 /////@admin/index.php /////

\[XR[hňȉ̋LqTĂ

  $contents[] = array('params' => 'class="infoBox"',
                      'text'  => BOX_ENTRY_CUSTOMERS . ' ' . $customers['count'] . '<br>' .
                                 BOX_ENTRY_PRODUCTS . ' ' . $products['count'] . '<br>' .
                                 BOX_ENTRY_REVIEWS . ' ' . $reviews['count']);

  $box = new box;
  echo $box->menuBox($heading, $contents);

  echo '<br>';

̍sɈȉ̍sǉĂ

$affiliate_sales_raw = "select count(*) as count, sum(affiliate_value) as total, sum(affiliate_payment) as payment from " . TABLE_AFFILIATE_SALES . " ";
$affiliate_sales_query= tep_db_query($affiliate_sales_raw);
$affiliate_sales= tep_db_fetch_array($affiliate_sales_query);

$affiliate_clickthroughs_raw = "select count(*) as count from " . TABLE_AFFILIATE_CLICKTHROUGHS . " ";
$affiliate_clickthroughs_query=tep_db_query($affiliate_clickthroughs_raw);
$affiliate_clickthroughs= tep_db_fetch_array($affiliate_clickthroughs_query);
$affiliate_clickthroughs=$affiliate_clickthroughs['count'];

$affiliate_transactions=$affiliate_sales['count'];
if ($affiliate_transactions>0) {
	$affiliate_conversions = tep_round($affiliate_transactions/$affiliate_clickthroughs,6)."%";
}
else $affiliate_conversions="n/a";

$affiliate_amount=$affiliate_sales['total'];
if ($affiliate_transactions>0) {
	$affiliate_average=tep_round($affiliate_amount/$affiliate_transactions,2);
}
else {
	$affiliate_average="n/a";
}
$affiliate_commission=$affiliate_sales['payment'];

$affiliates_raw = "select count(*) as count from " . TABLE_AFFILIATE . "";
$affiliates_raw_query=tep_db_query($affiliates_raw);
$affiliates_raw = tep_db_fetch_array($affiliates_raw_query);
$affiliate_number= $affiliates_raw['count'];


  $heading = array();
  $contents = array();

  $heading[] = array('params' => 'class="menuBoxHeading"',
                     'text'  => BOX_TITLE_AFFILIATES);

  $contents[] = array('params' => 'class="infoBox"',
                      'text'  => BOX_ENTRY_AFFILIATES . ' ' . $affiliate_number . '<br>' .
                                 BOX_ENTRY_CONVERSION . ' ' . $affiliate_conversions . '<br>' .
                                 BOX_ENTRY_COMMISSION . ' ' . $currencies->display_price($affiliate_commission, ''));

  $box = new box;
  echo $box->menuBox($heading, $contents);

  echo '<br>';


///// 菇5 /////@admin/includes/application_top.php /////

ŏIsi"?>"̒OjɈȉ̍s}ĂB

// Include OSC-AFFILIATE
  require('includes/affiliate_application_top.php');


///// 菇6 /////@admin/includes/column_left.php /////

\[XR[hňȉ̋LqTĂ

  require(DIR_WS_BOXES . 'reports.php');

̍sɈȉ̋LqǉĂ

  require(DIR_WS_BOXES . 'affiliate.php');

///// 菇7 /////@admin/includes/languages/japanese.php /////

ŏIsi"?>"̒OjɈȉ̍s}ĂB

include("affiliate_japanese.php");


----------------------------------------------------------------------

ȏŃAtBGCgW[̑gݍݍƂ͏IłB