Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-Affiliate


henri

Recommended Posts

And while I'm at it, what is the purpose of affiliate_news.php? Based on its corresponding language file, it appears it should be another banner selection file. But the file itself does not contain any database lookup code and doesn't even reference the language file's banner selection constants.

 

Is there something missing?

 

Dan

Link to comment
Share on other sites

what is the purpose of affiliate_news.php? Based on its corresponding language file, it appears it should be another banner selection file. But the file itself does not contain any database lookup code...

I figured this one out. TEXT_INFORMATION in affiliate_news.php's language file is rather misleading, as it refers to copying banner links and what not. I emptied the text from that language constant and tried out adding a news release to the admin area. Sure enough, it worked fine and had no misleading message! The part I overlooked for pulling in the database news info is:

 

include(DIR_WS_MODULES . FILENAME_AFFILIATE_NEWS);

 

A couple other questions and comments after additional setup and testing:

 

- In the admin area, affiliate_payment.php has a "Start Billing" button that leads to the message, "your affiliates have been successfully billed," but it isn't terribly clear what is being done here. What are the instructions saying??? Why would you "bill" an affiliate? Or does it really mean "paid"?

 

- Why all the fields in the afiliate_banners table that are unused in the admin area? (affiliate_banners_group, affiliate_banners_html_text, affiliate_expires_impressions, affiliate_expires_date, affiliate_date_scheduled, affiliate_date_status_change, affiliate_status)

 

- TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS & TEXT_NEW_AFFILIATE_NEWS are missing from affiliate_news.php admin language file.

 

Other than the miscellaneous remaining questions, everything seems to be working properly as far as I can tell. Nice work on this contribution!

 

Dan

Link to comment
Share on other sites

I need help with this error I can not seem to figure out. I am thinking it has to do with permission or something, But can not seem to track it down. I get this when I try to add a banner in the admin section.

Warning: copy(/hsphere/local/home2/mystic32/magickalstore.com/catalog/images/mslogo.jpg): failed to open stream: Permission denied in /hsphere/local/home2/mystic32/magickalstore.com/catalog/admin/affiliate_banners.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home2/mystic32/magickalstore.com/catalog/admin/affiliate_banners.php:71) in /hsphere/local/home2/mystic32/magickalstore.com/catalog/admin/includes/functions/general.php on line 18

 

Can anyone help?

 

Thanks,

Kevin

Link to comment
Share on other sites

Hello,

 

Well I have managed to fix the line 108 problem.

 

Now I have 1 more issue that needs to be addressed.

 

When YOU LOGIN AS AN AFFILIATE, and click on the products link in the affiliate box, the page displays ok, but the image of the banner DOES NOT.

 

ALSO, when you click on the Banner Links there is no banners what so ever on the page, just a line that reads :

Please choose from the banners below

 

Is there a solution for this? Perhaps one would need more detail to help me solve this problem. If so please let me know what you need and I will try to get you this info.

 

Regards,

John

Orbit Solution

What did you do to fix the line 108 error? I'm getting the same error message when I login as an affiliate. Although my line 108 is

if ($messageStack->size('account') > 0) {

1. I have the same problem, does anyone have the solution for this 'line 108' problem?

 

2. In addition to that, when I try to 'Change Password', I got this error

 

Fatal error: Call to a member function on a non-object in affiliate_password.php on line 105

 

Line 105 read: if ($messageStack->size('a_password') > 0) {

 

Everything else seems to be working ok accept the following:

 

3. When the client log in, the 'Affiliate Reports' show:

 

Affiliate Program: Clickthroughs

Total clickthroughs from your site: 3 -- but in the table below it said

Date [?] Product or Page [?] Referrer [?]

No clickthroughs have been recorded from your site.

 

Affiliate Program: Sales

Sales from your homepage: 3

Date [?] Sale Value (excl.) [?] Commission Rate [?] Affiliate Earnings (excl.) [?] Sale Status [?]

No sales have been recorded yet.

Your current earnings amount (excl.) to: $0.00

Only delivered sales are counted! -- The sales were delivered indeed, but still not recorded. Any idea why?

 

Sorry, it seems like lot of problem, but maybe I haven't fully understood how the affiliate system works yet?

Link to comment
Share on other sites

Those numbers should be updating regardless of the billing delay setting. Sounds like some sort of configuration problem with your installation, but I would have to leave it to someone more familiar with the overall contribution to answer if it is a known problem.

 

Dan

Link to comment
Share on other sites

Hi!

 

I need to generate commissions to affiliates without the need for them to have a website.

 

Actually, when an affiliate is logged-in, any sale performed by the affiliate for a third party does not generate commission. You absolutely need to put a ref# in a text link (or banner) string as here:

 

<a href="http://www.mystore.com/catalog/product_info.php?ref=1&products_id=123&affiliate_banner_id=1" target="_blank">My product</a>

 

I want my affiliates ref# to apprear on every url generated on my site when the affiliate is registered and logged-in, so they can place order for their customers and cumulate comm. without the need to to click on a remote web page.

 

How can I achieve that?

 

Thanks for any help

It ain't easy being me either

Link to comment
Share on other sites

Hello,

 

Dis anyone tried to install the affiliate contribution together witn simple template system contribution?

If yes, could you tell me how I can make the affiliate box appear on template.html.

I've tried making it like the other boxes, in column_left.php:

  ob_start();

  require(DIR_WS_BOXES . 'affiliate.php');

  $osc_block['affiliatebox'] = ob_get_contents();

  ob_end_clean();

and adding

  echo $osc_block['affiliatebox'];

then placing $affiliatebox on my template.html file

 

BUT IT DOESN'T WORK!

 

Does anyone knows how to fix this?

 

Thanks

It ain't easy being me either

Link to comment
Share on other sites

OK, I've fixed my affiliate box problem.

 

For some reason, I've installed STS version 1.2, updated on 09/09/2003,

which does not have all the features...

http://www.oscommerce.com/community/contributions,1506

 

Don't know why this is still supported?? Anyway, I've re-installed with v1.8

http://www.oscommerce.com/community/contributions,1524

which has all the features appearing on the forum.

 

The 2 contribs should appear on the same page, so people installing it for the first time can find the right one first. I'm quite frustrated because I've spent too many hours trying to adapt an old version without finding why I was wrong.

 

Have a nice day you all !

It ain't easy being me either

Link to comment
Share on other sites

Installed mod v2.02 a couple a days ago. Everythings works fine (after some patches to make it MS2.2 compliant) but the last package seems to be missing files affiliate_help19.php till help22. These help files are used in the payment report (affiliate_payment.php).

 

Does someone have them ?

 

:huh:

 

Didier.

Link to comment
Share on other sites

hello

thanks for the great contribution which without it i wouldn't be able to use osc.i am trying to use the osc as a pos system.i have a few sales people and trying to use affilliates program to keep track of their comp so i need to make a few changes in the affilliate program to make it work for my store.

1-i need to be enable the customer to choose the affilliate.i have added an extra input field to my payment modules so the customer can enter an affilliate id but it would be nice if i had a dropdown list of affilliate to choose from.

2- i want to change the affilliate_address_id that is used in the invoice from 2 to 5

3-i want to include products purchase in the affilliate invoice.

4-want to keep a month to date and a year to date of payments made to affilliates and have it in the invoice and in admin if possible

5-want to have start and end date of billing period in invoice and admin area

6-i have installed the job scheduler contribution and was wondering if invoicing the affilliate can be automated.

please if you have any idea on how to do any of thesee or pm me if you can do all

Link to comment
Share on other sites

I was thinking that the following payout models may be worth considering:

 

1) The affiliate earns a percentage per sale, and whatever amount earned can ONLY be spent as credit on your own website ;)

 

2) The affiliate earns a fixed number of points for every dollar of referrel fee they earn, and they can exchange these points for items on a special point exchange catalog page on your site.

 

3) A pay-per-sale whereby an affiliate earns a gift for every X number of sales they generate regardless of dollar amount. This may require hiding of the amount from sales the affiliate refers, though, in case they feel that whatever they're getting is not corresponding to the amount that they have sent your way :D Gotta be able to reset the number of sales earned once the gift is sent out as well.

 

I've not had the chance to use OSC-Affiliate because I'm on MS1, but have looked through it. Here's hoping for a faster release :)

Edited by Avium
Link to comment
Share on other sites

1) The affiliate earns a percentage per sale, and whatever amount earned can ONLY be spent as credit on your own website? ;)

-> Combine it with the giftvoucher. Pay you affiliate via giftvoucher

 

2 and 3 just code it.

 

 

I've not had the chance to use OSC-Affiliate because I'm on MS1, but have looked through it. Here's hoping for a faster release :)

There is a Version for MS1 ;)

 

Cu Henri

Edited by henri
Link to comment
Share on other sites

1-i need to be enable the customer to choose the affilliate.i have added an extra input field to my payment modules so the customer can enter an affilliate id but it would be nice if i had a dropdown list of affilliate to choose from.

Shouldn't be a big problem. -> hope you don't have a lot affiliates cause then you get a big dropdown ;)

 

2- i want to change the affilliate_address_id that is used in the invoice from 2 to 5

3-i want to include products purchase in the affilliate invoice.

Should be done with simple changes in the code.

 

4-want to keep a month to date and a year to date of payments made to affilliates and have it in the invoice and in admin if possible

Either i don't understand what you mean or i think we have it ;)

 

6-i have installed the job scheduler contribution and was wondering if invoicing the affilliate can be automated.

Normally i would say yes. I don't know the job schedule contribution so i would do it vi cron.

 

Cu Henri

Edited by henri
Link to comment
Share on other sites

1) The affiliate earns a percentage per sale, and whatever amount earned can ONLY be spent as credit on your own website? ;)

-> Combine it with the giftvoucher. Pay you affiliate via giftvoucher

 

2 and 3 just code it.

Hi Henri,

 

As much as I would love to code it myself, I'm a complete greenhorn when it comes to PHP. I would love to integrate the giftvoucher mod with the affiliate mod, but I've absolutely no idea how to begin :(

 

Needless to say, coding the other mods will be beyond my technical expertise.

Link to comment
Share on other sites

Henri,

 

If I'm not mistaken, you're one of (or THE?) the people responsible for putting together this excellent contribution? If so, can I draw your attention to highlights from a couple of posts I made a page or two back which did not seem to get noticed by anyone ... some questions and comments:

 

Question regarding affiliate_banners_banners.php: What's the reasoning behind the 'if ($prod_id < 1)' requirements for showing a banner? It seems like it would be impossible for any banner to meet that criteria... I commented out those checks and the page loads fine (blank banners section otherwise). I also noted that in affiliate_banners_text.php (which works as it should) that they are 'if ($prod_id>0)' checks. That seems much more reasonable.

 

In the admin area, affiliate_payment.php has a "Start Billing" button that leads to the message, "your affiliates have been successfully billed," but it isn't terribly clear what is being done here. What are the instructions saying??? Why would you "bill" an affiliate? Or does it really mean "paid"?

 

Why all the fields in the afiliate_banners table that are unused in the admin area? (affiliate_banners_group, affiliate_banners_html_text, affiliate_expires_impressions, affiliate_expires_date, affiliate_date_scheduled, affiliate_date_status_change, affiliate_status)

 

what is the purpose of affiliate_news.php? Based on its corresponding language file, it appears it should be another banner selection file. But the file itself does not contain any database lookup code...

 

I figured this one out. TEXT_INFORMATION in affiliate_news.php's language file is rather misleading, as it refers to copying banner links and what not. I emptied the text from that language constant and tried out adding a news release to the admin area. Sure enough, it worked fine and had no misleading message! The part I overlooked for pulling in the database news info is:

 

include(DIR_WS_MODULES . FILENAME_AFFILIATE_NEWS);

 

TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS & TEXT_NEW_AFFILIATE_NEWS are missing from affiliate_news.php admin language file.

Dan

Link to comment
Share on other sites

hello henry

thanks for your response i managed to do almost everything.except creating the dropdown list of affiliates. i am using vac_two field to enter the affiliate_id now and i would want the dropdown.but no matter what i do i cant get it to work

<?php
/*
 $Id: po.php,v 1.2 2002/12/10 12:00:00 olby $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 class po {
   var $code, $title, $description, $enabled;

// class constructor
   function po() {
     global $order;
     $this->code = 'po';
     $this->title = MODULE_PAYMENT_PO_TEXT_TITLE;
     $this->description = MODULE_PAYMENT_PO_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_PAYMENT_PO_SORT_ORDER;
     $this->enabled = ((MODULE_PAYMENT_PO_STATUS == 'True') ? true : false);
     $this->email_footer = MODULE_PAYMENT_PO_TEXT_EMAIL_FOOTER;
   }

// class methods
   function javascript_validation() {
     $validation_string = 'if (payment_value == "' . $this->code . '") {' . "\n" .
                          '  var account_name = document.checkout_payment.account_name.value;' . "\n" .
                          '  var account_number = document.checkout_payment.account_number.value;' . "\n" .
                          '  var po_number = document.checkout_payment.po_number.value;' . "\n" .
                          '  if (account_name.length == 0) {' . "\n" .
                          '    error_message = error_message + "' . MODULE_PAYMENT_PO_TEXT_JS_ACC_NAME . ' ";' . "\n" .
                          '    error = 1;' . "\n" .
                          '  }' . "\n" .
                          '  if (account_number.length == 0) {' . "\n" .
                          '    error_message = error_message + "' . MODULE_PAYMENT_PO_TEXT_JS_ACC_NUMBER . ' ";' . "\n" .
                          '    error = 1;' . "\n" .
                          '  }' . "\n" .
                          '  if (po_number.length == 0) {' . "\n" .
                          '    error_message = error_message + "' . MODULE_PAYMENT_PO_TEXT_JS_PO_NUMBER . '";' . "\n" .
                          '    error = 1;' . "\n" .
                          '  }' . "\n" .
                          '}' . "\n";
     return $validation_string;
   }

   function selection() {
//////////i think here is where i need to change 
     $selection = array('id' => $this->code,
                        'module' => $this->title,
                        'fields' => array(array('title' => MODULE_PAYMENT_PO_TEXT_ACCOUNT_NAME,
                                                'field' => tep_draw_input_field('account_name')),
                                          array('title' => MODULE_PAYMENT_PO_TEXT_ACCOUNT_NUMBER,
                                                'field' => tep_draw_input_field('account_number')),
                                          array('title' => MODULE_PAYMENT_PO_TEXT_PO_NUMBER,
                                                'field' => tep_draw_input_field('po_number')),
array('title' => MODULE_PAYMENT_PO_TEXT_VAC_ONE,
                                                'field' => tep_draw_input_field('vac_one')),
array('title' => MODULE_PAYMENT_PO_TEXT_VAC_TWO,
                                                'field' => tep_draw_input_field('vac_two')),
 array('title' => MODULE_PAYMENT_PO_TEXT_VAC_THREE,
                                                'field' => tep_draw_input_field('vac_three'))));



     return $selection;

   }

   function pre_confirmation_check() {
     return false;
   }

   function confirmation() {
     global $HTTP_POST_VARS;

     $confirmation = array('title' => $this->title,
                           'fields' => array(array('title' => MODULE_PAYMENT_PO_TEXT_ACCOUNT_NAME,
                                                   'field' => $HTTP_POST_VARS['account_name']),
                                             array('title' => MODULE_PAYMENT_PO_TEXT_ACCOUNT_NUMBER,
                                                   'field' => $HTTP_POST_VARS['account_number']),
                                             array('title' => MODULE_PAYMENT_PO_TEXT_PO_NUMBER,
                                                   'field' => $HTTP_POST_VARS['po_number']),
array('title' => MODULE_PAYMENT_PO_TEXT_VAC_ONE,
                                                   'field' => $HTTP_POST_VARS['vac_one']),
array('title' => MODULE_PAYMENT_PO_TEXT_VAC_TWO,
                                                  
'field' => $HTTP_POST_VARS['vac_two']),
array('title' => MODULE_PAYMENT_PO_TEXT_VAC_THREE,
                                                   'field' => $HTTP_POST_VARS['vac_three'])));

  return $confirmation;
   }

   function process_button() {
     global $HTTP_POST_VARS;

     $process_button_string = tep_draw_hidden_field('account_name', $HTTP_POST_VARS['account_name']) .
                              tep_draw_hidden_field('account_number', $HTTP_POST_VARS['account_number']) .
                              tep_draw_hidden_field('po_number', $HTTP_POST_VARS['po_number']).
                              tep_draw_hidden_field('vac_one', $HTTP_POST_VARS['vac_one']).
tep_draw_hidden_field('vac_two', $HTTP_POST_VARS['vac_two']).
tep_draw_hidden_field('vac_three', $HTTP_POST_VARS['vac_three']);
     return $process_button_string;
   }

   function before_process() {
     return false;
   }

   function after_process() {
     return false;
   }

   function get_error() {
     return false;
   }

   function check() {
     if (!isset($this->_check)) {
       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PO_STATUS'");
       $this->_check = tep_db_num_rows($check_query);
     }
     return $this->_check;
   }

   function install() {
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Purchase Orders', 'MODULE_PAYMENT_PO_STATUS', 'True', 'Do you want to accept Purchase Orders?', '6', '6',  'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_PAYMENT_PO_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
   }

   function remove() {
     tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
   }

   function keys() {
     return array('MODULE_PAYMENT_PO_STATUS', 'MODULE_PAYMENT_PO_SORT_ORDER');
   }
 }
?>

Link to comment
Share on other sites

i forgot

i also have a question i guess for steve regarding the tier system i understand that the front end of this still not done but since my customers will choose their affiliates i was wondering that how the part that is ready should work . i am trying to find a way to split the comp bet diffrent affiliates. or credit multiple affiliates for the same order.lets say affiliate one gets 10% and affiliate two gets 2%. of the order 255 .great contribution you guys thanks

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.

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...