Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-Affiliate


henri

Recommended Posts

All credit to Terra, who now manages the osCommerce Pay Pal IPN (this is from the help files)

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

 

oscAffiliate v2.5a and PayPal IPN

 

Back up your files first!

 

To combine the two, open /includes/modules/payment/paypal_ipn.php

 

*********************************************

 

Find this code around line 76:

function confirmation() {

global $cartID, $cart_PayPal_IPN_ID, $customer_id, $languages_id, $insert_id, $order, $order_total_modules;

 

directly below add this code:

global $affiliate_ref, $affiliate_clientdate, $affiliate_clientbrowser, $affiliate_clientip, $affiliate_clickthroughs_id, $HTTP_SESSION_VARS;

 

*********************************************

 

Find this code around line 245:

tep_session_register('cart_PayPal_IPN_ID');

$cart_PayPal_IPN_ID = $cartID . '-' . $insert_id;

}

}

return false;

}

 

and change to:

tep_session_register('cart_PayPal_IPN_ID');

$cart_PayPal_IPN_ID = $cartID . '-' . $insert_id;

}

}

 

// Include OSC-AFFILIATE

require(DIR_WS_INCLUDES . 'affiliate_checkout_process.php');

 

return false;

}

 

*********************************************

 

Vger

 

hey chooch or Vger..do either of you know why affiliate sales are lost if paying through paypal? is there a way around this so that the affiliate sale is still tracked if PP is used for the payment method?

 

The reason i ask one of you 2 is because you seem to be the best versed with understanding this mod ;) lucky you ;)

Edited by Vger
Link to comment
Share on other sites

I recently moved my osCommerce installation from a php 4.4.6 server to a php 4.4.4 server. All worked well prior to the move on the original install. But, on the new server I was getting errors on Affiliate Log In and, in general, whenever a file containing. Remember - I made no changes whatsover in the DB or files.

 

require('includes/functions/affiliate_functions.php');

 

was called.

 

The error was:

 

Fatal error: Cannot redeclare affiliate_check_url() (previously declared in /home/my_domain/public_html/catalog/includes/functions/affiliate_functions.php:17) in /home/my_domain/public_html/catalog/includes/functions/affiliate_functions.php on line 17

 

Of course, if I commented that out, it would just error on the next function in that file.

 

affiliate_functions.php was being called several times. When I changed all occurrences of

 

 

require('includes/functions/affiliate_functions.php');

 

to

 

require_once('includes/functions/affiliate_functions.php');

 

Everything worked. Is this a bug? A difference in PHP configuration between servers? Are there any problems with this change? Why is there this difference between servers?

 

TIA

 

Martin

Link to comment
Share on other sites

I am hoping someone can help me. After install of the OSC affiliate, it changed my Admin Panel and pretty much locked it. Stating that table_affiliate_sales does not exist.....and I cannot get into the configuration panel. I changed the look of the admin panel completely.

 

I saw that someone else here had the same issue.....and she was told to upload the affiliate.sql file to her database via the myphpadmin.

 

Well, before I even read that, I had already uploaded to my database via myphpadmin. I am very familiar with myphpadmin...and the tables are there. So maybe I am just missing something? I even checked the php script for errors...and nothing. I did everything as the file said to do.

 

So if anyone has any suggestions, please let me know. Thank you in advance for any help.

 

Best regards,

Beverly

Link to comment
Share on other sites

Did you update includes/database_tables.php in the shop front and in admin?

 

Vger

 

Um, I would like to say I did so I don't look like a total moron. :rolleyes: Well, I did not and that is what the issue was...thank you so much! Have a wonderful day!!

Link to comment
Share on other sites

People I have few questions so if some can help me, it's not so hard. My affiliate program works great, but I need something more, so I have doubts, here is what I need:

 

1. How and is that even possible that I let for all my affiliates have discounts on my products? How can I get this?

 

2. What this means: "Payment Threshold"?

 

Thank you a lot and I need that quickly!

Link to comment
Share on other sites

I have a problem with the affiliate_signup.php file. When the typed information is OK you return to the same page again, aka affiliate_signup.php and not the /affiliate_signup_ok.php. Tried several file versions 2.5A, 2.6 = same result. I am in a NONSSL environment and i have tried to change the file according to this but with same result.

 

Could anyone help, thx in adv.

Link to comment
Share on other sites

It's working ok for me. I installed version 2.7. Plus, I think the package is missing two lines from affiliate_signup.php

 

http://www.oscommerce.com/community/contri...ch,oscaffiliate

 

Also, when affiliate_affiliate.php is reloaded, make sure that none of the fields is open to entry. If it is, that means that the value entered was not correct.

Payam

Link to comment
Share on other sites

After my host upgraded their php, I managed to get the site to work again, but when affiliates login now, they only get a blank page at catalog/affiliate_summary.php. Anybody knows how to fix that? All the other pages are visible.

And are there any known issues regarding counting the sales after php upgrade? I only have 3 affiliates at the moment so it's hard to check that for me.

Thanks in advance

Link to comment
Share on other sites

I have a bit of an issue. I've recently installed OSC-Affiliate, but I don't really want just anybody signing up. I basically want to create click-through links for one particular client. Is there an easy way to do this?

Link to comment
Share on other sites

Get that one client to create an affiliate account, or create one for them, and then remove the affiliate links from your site (not the pages themselves). No one else will see the Affiliate Create Account or Login links so they won't know anything about the system.

 

Vger

I have a bit of an issue. I've recently installed OSC-Affiliate, but I don't really want just anybody signing up. I basically want to create click-through links for one particular client. Is there an easy way to do this?
Link to comment
Share on other sites

I typed in: 'affiliate_signup.php', assuming that's the right file, and I'm getting an error:

 

Warning: main(includes/languages/english/affiliate_signup.php) [function.main]: failed to open stream: No such file or directory in

/home/escap9/public_html/webstore/affiliate_signup.php on line 19

Link to comment
Share on other sites

Hi all, can someone assist me?

 

this is problem: I installed OSC Affiliate ver. 2.6. Everything went smooth and it seems to be working. but it messes up my layout.

First of all when I display a product page a PHP string appears out of nowhere: "FILENAMES.PHP in CATALOG ADD define('FILENAME_CATEGORIES_INFO', 'index.php');" how do I solve that?

 

Moreover, when and affiliate logs in and views the product page it shows a button (Build a link) which completely messes up my layout.

 

How can I solve those problems?

thank you.

Link to comment
Share on other sites

I have just installed osC Affiliate 2.7 onto my osCommerce site. However, now when I go to the admin pages or any pages that have to do with osC Affiliate they just appear blank.

 

The problem appears to be with this line in most cases.

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_AFFILIATE_INFO);

Link to comment
Share on other sites

affiliate_functions.php was being called several times. When I changed all occurrences of

require('includes/functions/affiliate_functions.php');

 

to

 

require_once('includes/functions/affiliate_functions.php');

 

I was having the exact same issue, this change fixed mine. thanks!

Link to comment
Share on other sites

URGENT!

 

I am building a site where I need to make two kinds of affiliates. I made it to work, I just renamed all words affiliates to MA and it works. And here is where I have a problem, that I think I solved, but I must be sure so I am asking you.

 

Here is what bugs me. Catching affiliate or ma ID, catching ref variable from address! Here is way I thought it should works:

 

I change that affiliate IDs goes from 1000 and up, and ma IDs from 1 to 999 so there is no mistake if it is a affiliate or ma. I add this lines in:

 

- affiliate_application_top.php:

 if ($HTTP_GET_VARS['ref'] > 999)

 

- ma_application_top.php:

 if ($HTTP_GET_VARS['ref'] < 1000)

 

just before:

 

if (($HTTP_GET_VARS['ref'] || $HTTP_POST_VARS['ref'])) {

 

So I am asking you if this is OK, is there anything I need to change so this two affiliate contributions works on their own, without interfering each other?

 

Do I have to add these lines to in affiliate_show_banner.php and ma_show_banner.php? What this pages is used for, anyway?

 

Please help me about this.

Thank you a lot!

Link to comment
Share on other sites

Okay,

 

I have installed the contribution and although i have managed to resolve most issues there are still a couple i can't seem to nail and if anyone could help me it would be greatly appreciated.

 

1, when i attempt to sign up for an affiliate account the affiliate_signup.php screen just loops backs to the same page no matter what i try

 

i then noticed that there is a section with no options available for me to choose in the sign up process, the You get your money by: section?

 

2, When i go into the admin panel>configuartion>Affiliate Program the only option in there available to me is the email address?

 

Can anyone tell me what i may have missed and which section of the install refers to these parts.

 

Many Thanks

D4

Link to comment
Share on other sites

Okay,

 

I have installed the contribution and although i have managed to resolve most issues there are still a couple i can't seem to nail and if anyone could help me it would be greatly appreciated.

 

1, when i attempt to sign up for an affiliate account the affiliate_signup.php screen just loops backs to the same page no matter what i try

 

i then noticed that there is a section with no options available for me to choose in the sign up process, the You get your money by: section?

 

2, When i go into the admin panel>configuartion>Affiliate Program the only option in there available to me is the email address?

 

Can anyone tell me what i may have missed and which section of the install refers to these parts.

 

Many Thanks

D4

 

TO what same page?

 

Anyway for the rest of your two problems is that you did not enter a fully Affiliate SQl in you database, anyway this is what you need to run in your database or check for this in your sql file that you applied to your database? Please just check in table configuration_group if the Affiliate Program ID is 900, if not change all numbers 900 from code below to your Affiliate Program ID that you found in configuration_group!

 

INSERT INTO configuration VALUES ('','E-Mail Address', 'AFFILIATE_EMAIL_ADDRESS', '<[email protected]>', 'The E Mail Address for the Affiliate Program', 900, 1, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Affiliate Pay Per Sale Payment % Rate', 'AFFILIATE_PERCENT', '10.0000', 'Percentage Rate for the Affiliate Program', 900, 2, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Payment Threshold', 'AFFILIATE_THRESHOLD', '50.00', 'Payment Threshold for paying affiliates', 900, 3, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Cookie Lifetime', 'AFFILIATE_COOKIE_LIFETIME', '7200', 'How long does the click count (seconds) if customer comes back', 900, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Billing Time', 'AFFILIATE_BILLING_TIME', '30', 'Orders billed must be at least "30" days old.<br>This is needed if a order is refunded', 900, 5, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Order Min Status', 'AFFILIATE_PAYMENT_ORDER_MIN_STATUS', '3', 'The status an order must have at least, to be billed', 900, 6, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Pay Affiliates with check', 'AFFILIATE_USE_CHECK', 'true', 'Pay Affiliates with check', 900, 7, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Pay Affiliates with PayPal', 'AFFILIATE_USE_PAYPAL', 'true', 'Pay Affiliates with PayPal', 900, 8, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Pay Affiliates by Bank', 'AFFILIATE_USE_BANK', 'true', 'Pay Affiliates by Bank', 900, 9, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Individual Affiliate Percentage', 'AFFILATE_INDIVIDUAL_PERCENTAGE', 'true', 'Allow per Affiliate provision', 900, 10, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Use Affiliate-tier' , 'AFFILATE_USE_TIER', 'false', 'Multilevel Affiliate provisions', 900, 11, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Number of Tierlevels', 'AFFILIATE_TIER_LEVELS', '0', 'Number of Tierlevels', 900, 12, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Percentage Rate for the Tierlevels', 'AFFILIATE_TIER_PERCENTAGE', '8.00;5.00;1.00', 'Percent Rates for the tierlevels<br>Example: 8.00;5.00;1.00', 900, 13, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Affiliate News', 'MAX_DISPLAY_AFFILIATE_NEWS', '3', 'Maximum number of items to display on the Affiliate News page', 900, 14,  NULL, now(), NULL, NULL);

 

When you do this you will get your field Get your money by and full configuration in Admin!

 

I will not say "hope this will help you" because it is a solution for your problem but best luck to fix it, its not so hard. ;)

Link to comment
Share on other sites

Just installed OSC Affiliate and I get the following error in affiliate_signup.php.

 

 

Warning: main(includes/languages/english/FILENAME_AFFILIATE_SIGNUP) [function.main]: failed to open stream: No such file or directory in /home/shopfuze/public_html/affiliate_signup.php on line 19

 

Fatal error: main() [function.require]: Failed opening required 'includes/languages/english/FILENAME_AFFILIATE_SIGNUP' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/shopfuze/public_html/affiliate_signup.php on line 19

 

 

Any ideas?

Link to comment
Share on other sites

Hi,

 

Tried that but still no change.

 

I can see the configuration options within my database but they are not showing up in my admin panel?

 

Also, i have tried to enter the sql file in individual elements and the error that comes up is when i enter the following section:

 

INSERT INTO configuration_group VALUES (900, 'Affiliate Program', 'Options for the Affiliate Program', 50, 1);
INSERT INTO configuration VALUES ('','E-Mail Address', 'AFFILIATE_EMAIL_ADDRESS', '<[email protected]>', 'The E Mail Address for the Affiliate Program', 900, 1, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Affiliate Pay Per Sale Payment % Rate', 'AFFILIATE_PERCENT', '10.0000', 'Percentage Rate for the Affiliate Program', 900, 2, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Payment Threshold', 'AFFILIATE_THRESHOLD', '50.00', 'Payment Threshold for paying affiliates', 900, 3, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Cookie Lifetime', 'AFFILIATE_COOKIE_LIFETIME', '7200', 'How long does the click count (seconds) if customer comes back', 900, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Billing Time', 'AFFILIATE_BILLING_TIME', '30', 'Orders billed must be at least "30" days old.<br>This is needed if a order is refunded', 900, 5, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Order Min Status', 'AFFILIATE_PAYMENT_ORDER_MIN_STATUS', '3', 'The status an order must have at least, to be billed', 900, 6, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Pay Affiliates with check', 'AFFILIATE_USE_CHECK', 'true', 'Pay Affiliates with check', 900, 7, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Pay Affiliates with PayPal', 'AFFILIATE_USE_PAYPAL', 'true', 'Pay Affiliates with PayPal', 900, 8, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Pay Affiliates by Bank', 'AFFILIATE_USE_BANK', 'true', 'Pay Affiliates by Bank', 900, 9, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Individual Affiliate Percentage', 'AFFILATE_INDIVIDUAL_PERCENTAGE', 'true', 'Allow per Affiliate provision', 900, 10, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Use Affiliate-tier' , 'AFFILATE_USE_TIER', 'false', 'Multilevel Affiliate provisions', 900, 11, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Number of Tierlevels', 'AFFILIATE_TIER_LEVELS', '0', 'Number of Tierlevels', 900, 12, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Percentage Rate for the Tierlevels', 'AFFILIATE_TIER_PERCENTAGE', '8.00;5.00;1.00', 'Percent Rates for the tierlevels<br>Example: 8.00;5.00;1.00', 900, 13, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Affiliate News', 'MAX_DISPLAY_AFFILIATE_NEWS', '3', 'Maximum number of items to display on the Affiliate News page', 900, 14,  NULL, now(), NULL, NULL);
ALTER TABLE `affiliate_banners` ADD `affiliate_category_id` INT DEFAULT '0' NOT NULL AFTER `affiliate_products_id`;

 

The error states:

 

SQL query:

 

INSERT INTO configuration

VALUES (

 

'', 'E-Mail Address', 'AFFILIATE_EMAIL_ADDRESS', '<[email protected]>', 'The E Mail Address for the Affiliate Program', 900, 1, NULL , now( ) , NULL , NULL

)

 

MySQL said:

 

#1062 - Duplicate entry '0' for key 1

 

All the overs work fine

 

Any ideas?

 

Many Thanks

D4

Link to comment
Share on other sites

Just installed OSC Affiliate and I get the following error in affiliate_signup.php.

Warning: main(includes/languages/english/FILENAME_AFFILIATE_SIGNUP) [function.main]: failed to open stream: No such file or directory in /home/shopfuze/public_html/affiliate_signup.php on line 19

 

Fatal error: main() [function.require]: Failed opening required 'includes/languages/english/FILENAME_AFFILIATE_SIGNUP' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/shopfuze/public_html/affiliate_signup.php on line 19

Any ideas?

 

Hi!

 

Make sure you have this line in catalog/includes/affiliate_application_top.php:

 

define('FILENAME_AFFILIATE_SIGNUP', 'affiliate_signup.php');

 

If that not helping see if somewhere around line 19 in affiliate_signup.php is:

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_AFFILIATE_SIGNUP);

 

and that you included affiliate_application_top.php in catalog/includes/application_top.php

 

require(DIR_WS_INCLUDES . 'affiliate_application_top.php');

 

You should not get this error if you installed based package, withour changing it. Say if it this helped, if not to find what it is.

Edited by cunga_lunga
Link to comment
Share on other sites

Hi,

 

Tried that but still no change.

 

I can see the configuration options within my database but they are not showing up in my admin panel?

 

Also, i have tried to enter the sql file in individual elements and the error that comes up is when i enter the following section:

 

INSERT INTO configuration_group VALUES (900, 'Affiliate Program', 'Options for the Affiliate Program', 50, 1);
INSERT INTO configuration VALUES ('','E-Mail Address', 'AFFILIATE_EMAIL_ADDRESS', '<[email protected]>', 'The E Mail Address for the Affiliate Program', 900, 1, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Affiliate Pay Per Sale Payment % Rate', 'AFFILIATE_PERCENT', '10.0000', 'Percentage Rate for the Affiliate Program', 900, 2, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Payment Threshold', 'AFFILIATE_THRESHOLD', '50.00', 'Payment Threshold for paying affiliates', 900, 3, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Cookie Lifetime', 'AFFILIATE_COOKIE_LIFETIME', '7200', 'How long does the click count (seconds) if customer comes back', 900, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Billing Time', 'AFFILIATE_BILLING_TIME', '30', 'Orders billed must be at least "30" days old.<br>This is needed if a order is refunded', 900, 5, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Order Min Status', 'AFFILIATE_PAYMENT_ORDER_MIN_STATUS', '3', 'The status an order must have at least, to be billed', 900, 6, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Pay Affiliates with check', 'AFFILIATE_USE_CHECK', 'true', 'Pay Affiliates with check', 900, 7, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Pay Affiliates with PayPal', 'AFFILIATE_USE_PAYPAL', 'true', 'Pay Affiliates with PayPal', 900, 8, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Pay Affiliates by Bank', 'AFFILIATE_USE_BANK', 'true', 'Pay Affiliates by Bank', 900, 9, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Individual Affiliate Percentage', 'AFFILATE_INDIVIDUAL_PERCENTAGE', 'true', 'Allow per Affiliate provision', 900, 10, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Use Affiliate-tier' , 'AFFILATE_USE_TIER', 'false', 'Multilevel Affiliate provisions', 900, 11, NULL, now(), NULL,'tep_cfg_select_option(array(\'true\', \'false\'), ');
INSERT INTO configuration VALUES ('','Number of Tierlevels', 'AFFILIATE_TIER_LEVELS', '0', 'Number of Tierlevels', 900, 12, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Percentage Rate for the Tierlevels', 'AFFILIATE_TIER_PERCENTAGE', '8.00;5.00;1.00', 'Percent Rates for the tierlevels<br>Example: 8.00;5.00;1.00', 900, 13, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES ('','Affiliate News', 'MAX_DISPLAY_AFFILIATE_NEWS', '3', 'Maximum number of items to display on the Affiliate News page', 900, 14,  NULL, now(), NULL, NULL);
ALTER TABLE `affiliate_banners` ADD `affiliate_category_id` INT DEFAULT '0' NOT NULL AFTER `affiliate_products_id`;

 

The error states:

All the overs work fine

 

Any ideas?

 

Many Thanks

D4

 

Hey D4.

 

I am not sure why you get this error, but my advice is to delete all from your database that applies to affiliate contribution (delete all affiliate_xxxx tables from your database, delete a row from table configuration_group where configuration_group = 900, delete from table configuration all that applies to affiliate (all rows that has configuration_group = 900)) And start from begining!

 

Next my advice is for you is first to upload the sql codes that applies only on configuration tables and see if you will get all options for Affiliate Program in Admin -> Configuration?! Than apply rest of the sql code and make affiliate_xxxx tables

 

NOTE: before anything, please just make a BACKUP of your database (phpMyAdmin -> Export)!

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