Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error messages received when adding in the osc aff


ladygueneva

Recommended Posts

Error messages received when adding in the osc affiliate addon Question

 

The entire administration panel gets a message tep stop when I add this into the index file in the admin folder

 

$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>';

 

 

 

 

 

I get error opening classes in admin when adding this to application_top.php file in the admin / includes folder

 

// Include OSC-AFFILIATE

require('includes/affiliate_application_top.php');

 

 

In column_left.php in the admin/includes directory find line 19 approx

 

require(DIR_WS_BOXES . 'reports.php');

 

and on a new line add this after it:

 

require(DIR_WS_BOXES . 'affiliate.php');

 

any ideas?

Thank you for your help

 

p.s. with the header tag controller addon what does this mean "Run header.sql first" I installed it and tried to run it through going to it in my webbrowser but it just tries to download as a file to my computer

 

Thank you for helping this novice in advance

 

Christine

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...