Jump to content
henri

OSC-Affiliate

Recommended Posts

Ok I know this maybe a dumb quetion but anyhow,

 

I installed osC Affiliate 2.5a_1 So far so good, My question is, Is there supposed to be a part in the admin to add FAQS to the FAQS page or do you have manually go into the affiliate_faqs.php and change things there. I checked several packages and none of the above includes such a thing. I do have the FAQS System 2_1a installed if that matters any. If not I could try to incorparate the two together. Hey that could be my first contrib.

 

But anyhow,

 

Thanks for any help in advance


Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites

Ok sorted my problem out, created a field in customers table and write to there, then in Affiliate_checkout_process check for the refere id being set and then give commision, quite easy really, just took a little figuring out.


"Know that this is your God, who could not consent to send anyone else to save you, but would come himself that he might gain for himself all your love." St Alphonsus Ligouri

Share this post


Link to post
Share on other sites
I installed osC Affiliate 2.5a_1 So far so good, My question is, Is there supposed to be a part in the admin to add FAQS to the FAQS page or do you have manually go into the affiliate_faqs.php and change things there. I checked several packages and none of the above includes such a thing. I do have the FAQS System 2_1a installed if that matters any. If not I could try to incorparate the two together. Hey that could be my first contrib.

 

Matrix, you have to change manually the language\english\affiliate_faqs.php

 

Would be a good addition to be able to do it in the admin, but its quite quick and easy to do in the language file.


"Know that this is your God, who could not consent to send anyone else to save you, but would come himself that he might gain for himself all your love." St Alphonsus Ligouri

Share this post


Link to post
Share on other sites
Matrix, you have to change manually the language\english\affiliate_faqs.php

 

Would be a good addition to be able to do it in the admin, but its quite quick and easy to do in the language file.

 

I changed the faqs page and is all good now. Now I would like to have a secure login for affiliates so I changed the "NONSSL" to "SSL" and I get

 

ERROR

Unable to determin page link

 

What do I need to do to get it where its on a secure page.

 

Thanks

 

Sorry correction

 

its only when I try to sign up as an affiliate using my other website address.

I then delete it and my store goes back to normal.

Edited by matrix2223

Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites

Sorry again here is the full error

 

Error!

 

Unable to determine connection method on a link!

 

Known methods: NONSSL SSL

 

Again this is only when I sign up as an affiliate using my other site.


Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites
I changed the faqs page and is all good now. Now I would like to have a secure login for affiliates so I changed the "NONSSL" to "SSL" and I get

after:

require('includes/application_top.php');

 

Add:

if (!tep_session_is_registered('affiliate_id'))

{

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); // change this to the name for affiliate_affiliate.php (I've moded mine to work of one account)

}

 

That should do the trick

 

Dont understand what you mean by sorry correction...


"Know that this is your God, who could not consent to send anyone else to save you, but would come himself that he might gain for himself all your love." St Alphonsus Ligouri

Share this post


Link to post
Share on other sites

Oh I fixed the one and inquired a new error

 

for some reason when I create an affiliate account subscrib to the newsletter and check the read terms n conditions and click continue I get this error

 

Error!

 

Unable to determine connection method on a link!

 

Known methods: NONSSL SSL

 

it displays under the heading off the affiliates box colum left I could post a link if you would like to see what Im talkin about

 

Thanks


Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites

ally what file do i put that in.

 

Thanks


Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites

well I solved both issues

(I am using osc ms2.2 and osc affiliate 2.5a1)

1) With the catalog/includes/boxes/affiliate.php was causing me errors with the continue button and everything else so

Fix: I downloaded the v2.03 deleted the .../boxes/affiliate.php file and replaced it with the one from 2.03

 

2) I some how got the login to be secure.

 

So far everything works well now.


Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites
QUOTE(LPallasch @ Feb 11 2006, 09:24 AM) *

 

SORRY - ANSWER TO POST FROMA2JC4life @ Jan 29 2006

 

Hi,

 

i?ve solved the problem in my shop - in the file affiliate_payment.php (admin) the queries use the language_id - i have changed each query and deleted the part "and affiliate_language_id=...." - the it works.

 

Backup your affiliate_payment.php and try it! ;-)

 

CU

 

Lars

 

 

Your affiliate payment page (admin panel) work fine ?

Can you show this page ?

 

can you show your code? how did you do this? what did you change in each affiliate_language_id query?

Share this post


Link to post
Share on other sites

Found a little bug in osC Affiliate:

When you delete an order from the admin panel it doesn't delete the Affiliate_sale so the totals you see in admin Affiliate summary are incorrect.

 

I added this around line 78 in admin/orders.php:

 

tep_db_query("delete FROM " . TABLE_AFFILIATE_SALES . " WHERE affiliate_orders_id =  '" . (int)$oID . "'");

so it looks like:

 

	  case 'deleteconfirm':
	$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

	tep_remove_order($oID, $HTTP_POST_VARS['restock']);

	tep_db_query("delete FROM " . TABLE_AFFILIATE_SALES . " WHERE affiliate_orders_id =  '" . (int)$oID . "'");

	tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));
	break;

Can someone confirm that this is a genuine bug and not just my gibberish.

ally

Edited by allymacneil

"Know that this is your God, who could not consent to send anyone else to save you, but would come himself that he might gain for himself all your love." St Alphonsus Ligouri

Share this post


Link to post
Share on other sites

Please help

 

After follwing all of the insturctions I get everything to work except sale tracking -- it tracks clicks etc..

 

 

www.candmmills.com

Share this post


Link to post
Share on other sites

Ah,

 

Not a bug after all, stumbled across this in affilate_configure.php:

 

define ('AFFILIATE_DELETE_ORDERS','false'); // Delete affiliate_sales if an order is deleted (Warning: Only not yet billed sales are deleted)

 

 

Doh!


"Know that this is your God, who could not consent to send anyone else to save you, but would come himself that he might gain for himself all your love." St Alphonsus Ligouri

Share this post


Link to post
Share on other sites

Hi,

 

My affiliate mod works fine except it doesnt allow any discounts to be taken in acoun twhen paying the affiliate.

 

here's whats on my orders.php:

 

Sub-Total: ?199.25

Table Rate (Best Way): ?8.50

Discount Coupon Used:testcoupon1: -?24.78

Gift Vouchers Balance: -?152.50

Total: ?30.48

 

 

and in the affiliate payment section it shows a sale of: ?199.25 and commission of (10%) ?19.93

 

by my reckoning the affiliate payment section should be ?30.48 and a commission of (10%) ?3.05

 

Can anyone please give me some advice?


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Hello,

I have installed osCommerce 051113 and DevosC 3.1.5. I currently get the following problem when someone checks out an item on the site and I view the order from admin->customers->orders:

 

No PayPal Transaction Information Available (7e1238828d76f323541b415dd890b601)

 

I tried searching through the forums on paypal problems, but have had no success. I see that many people have had this problem before, but no one has really posted their solutions to this (of the ones that have, they don't work for me). Can anyone help me out?

Thanks!

 

Hi,

 

My affiliate mod works fine except it doesnt allow any discounts to be taken in acoun twhen paying the affiliate.

 

here's whats on my orders.php:

 

Sub-Total: ?199.25

Table Rate (Best Way): ?8.50

Discount Coupon Used:testcoupon1: -?24.78

Gift Vouchers Balance: -?152.50

Total: ?30.48

and in the affiliate payment section it shows a sale of: ?199.25 and commission of (10%) ?19.93

 

by my reckoning the affiliate payment section should be ?30.48 and a commission of (10%) ?3.05

 

Can anyone please give me some advice?

Share this post


Link to post
Share on other sites

This problem with the total being incorrect is because whoever wrote that part of the Affiliate contribution is an idiot.

 

Here's the modification you need to make at the very beginning of affiliate_checkout_process.php:

 

// fetch the net total of an order
 $affiliate_total = 0;
 //for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
 //  $affiliate_total += $order->products[$i]['final_price'] * $order->products[$i]['qty'];
 //}
 //$affiliate_total = tep_round($affiliate_total, 2);
 $affiliate_total = $order->info['total_value'];

 

If you are interested... This problem exists because the bright guy who originally wrote this thought it was a dandy idea to go through the order and add up the cost of each product to arrive at the order total. Meanwhile, the real order total, with all discounts already taken out - the total we affiliate program owners really would want the commission to be based from - is simply available from $order->info['total_value'].

Share this post


Link to post
Share on other sites
This problem with the total being incorrect is because whoever wrote that part of the Affiliate contribution is an idiot.

 

Here's the modification you need to make at the very beginning of affiliate_checkout_process.php:

 

// fetch the net total of an order
 $affiliate_total = 0;
 //for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
 //  $affiliate_total += $order->products[$i]['final_price'] * $order->products[$i]['qty'];
 //}
 //$affiliate_total = tep_round($affiliate_total, 2);
 $affiliate_total = $order->info['total_value'];

 

If you are interested... This problem exists because the bright guy who originally wrote this thought it was a dandy idea to go through the order and add up the cost of each product to arrive at the order total. Meanwhile, the real order total, with all discounts already taken out - the total we affiliate program owners really would want the commission to be based from - is simply available from $order->info['total_value'].

thanks for the reply.....

 

after applying your code, this what i get in the affiliate sales bit:

 

30/03/2006 286 ?0.00 7.50% ?0.00 Pending

 

the order was for 95, but after discounts it was for around 75...

 

any tips please?


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites
This problem with the total being incorrect is because whoever wrote that part of the Affiliate contribution is an idiot.

 

Here's the modification you need to make at the very beginning of affiliate_checkout_process.php:

 

// fetch the net total of an order
 $affiliate_total = 0;
 //for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
 //  $affiliate_total += $order->products[$i]['final_price'] * $order->products[$i]['qty'];
 //}
 //$affiliate_total = tep_round($affiliate_total, 2);
 $affiliate_total = $order->info['total_value'];

 

If you are interested... This problem exists because the bright guy who originally wrote this thought it was a dandy idea to go through the order and add up the cost of each product to arrive at the order total. Meanwhile, the real order total, with all discounts already taken out - the total we affiliate program owners really would want the commission to be based from - is simply available from $order->info['total_value'].

 

Easy to criticise and boast isnt it ?

However your answered is flawed on many points

1- The author is not an idiot, Osc Affiliate has NOT been created with Coupon and GV in mind, makes sense since this is not part of an MS2 install !!

2- Your solution is in fact the stupid one, since by doing it your way simply could end up screwing up the all code .. Plus it does not work :)

 

What is required is to check the order total and substract all possible discount:

 

so just before

 

$affiliate_total = tep_round($affiliate_total, 2);

 

add:

 

//subtract discount   
 // get order total info
 $totals_query = tep_db_query("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$insert_id . "' order by sort_order");
 $discount='0';
 while ($totals = tep_db_fetch_array($totals_query)) {
  if($totals['class'] == "ot_coupon") {
	  $discount += $totals['value'];
  }
  if($totals['class'] == "ot_gv ") {
	  $discount += $totals['value'];
  }
  if($totals['class'] == "ot_lev_discount") {
	  $discount += $totals['value'];
  }
  if($totals['class'] == "ot_qty_discount") {
	  $discount += $totals['value'];
  }
 }
 $affiliate_total -=  $discount;  
//end subtract discount

 

This should do the trick, if you have any other kinds of discount class just add a test to the loop

Test this change throughly though as I have not had the time to do so

Share this post


Link to post
Share on other sites
This should do the trick, if you have any other kinds of discount class just add a test to the loop

Test this change throughly though as I have not had the time to do so

Hi Phocea....

 

Lemme start by saying a big old THANKS :-)

 

I was going around in circles and was basically giving myself a headache BIGTIME!!

 

It does workfine with all discounts. What it does is allow the following:

 

SUBTOTAL: $100 (yes)

SHIPPING: $20 (no)

COUPONS: $7 (no)

VOUCHER: $10 (no)

GRAND TOTAL: $63 (no)

 

The only payment the affiliate will get a commission on is the SUBTOTAL, which is the way I wanted it!!

 

I just need a little more testing on applying it to FREE SHIPPING COUPONS and re-arranging the ORDER TOTALS (just to make sure it is completely bug or hassle free)....

 

Many thanks again :-)

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

i really screwed that post up above with the layout... i cant believe i did that i must a been tired!

 

thanks, because the mod does work... what i should have said was:

 

" The only payment the affiliate will get a commission on is the SUBTOTAL, MINUS ALL DISCOUNTS PROVIDED BY ME, which is the way I wanted it!! "

 

surely i cant be only person with Affiliates installed who faced this issue... if anyone else has the same problem and wants their affiliates to only receive commissions after coupons have been applied, please add the code mentioned above and it will work :-)

 

EXAMPLE:

 

Sub-Total: ?10.50

Table Rate (Best Way): ?8.50

Discount Coupon Used:3f0db0: -?1.50

Gift Vouchers Balance: -?1.69

Total: ?15.81

 

 

on the standard affiliate mod, the affiliae is to get (your set %) commission at the payment made to you of ?15.81.. at 7.5% that is a payout of ?1.19

 

BUT

 

after the code is replaced, the affiliate shows a sale of ?9 but the order.php shows it up correctly at ?15.81. this leaves the affiliate with a commisson of ?0.68

 

the reason the affiliate commission shows ?9 is because the shipping costs are not counted towards affiliates commissions but the coupons are minused - in this case leaving ?9.

 

For those who also want the gift voucher to work within this format so that the affiliate doesnt get commission if a gift voucher used (box checked) will have to modify the code.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

I'm evaluating OSC-Affiliate to determine if it fits my requirements. I haven't been able to find a list of features. Could someone point me towards the list if it exists?

 

I'd also appreciate any comments on how well OSC-Affiliate fits and any issues I may be facing. Here's the business model:

 

It's a web based services business that receives recurring subscription payments. Customers first sign up for a free trial period. Customers can pay monthly, quarterly or annually. Payments are received online by credit card or PayPal, or checks via snailmail. Affiliates will get paid based on the number of referrals that become paying customers. The amount paid will be dependent on the level of service that the customer chooses. However, there are options that the customer can choose that are not subject to affiliate commission. I also would like to be able to credit affiliates once for the new customer or based on the recurring revenue stream. In my perfect world, I'll also be able to use OSC-Affiliate to track the effectiveness of other types of advertising campaigns.

 

All feedback is highly appreciated.

 

Steve

Share this post


Link to post
Share on other sites
add:

 

//subtract discount   
 // get order total info
 $totals_query = tep_db_query("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$insert_id . "' order by sort_order");
 $discount='0';
 while ($totals = tep_db_fetch_array($totals_query)) {
  if($totals['class'] == "ot_coupon") {
	  $discount += $totals['value'];
  }
  if($totals['class'] == "ot_gv ") {
	  $discount += $totals['value'];
  }
  if($totals['class'] == "ot_lev_discount") {
	  $discount += $totals['value'];
  }
  if($totals['class'] == "ot_qty_discount") {
	  $discount += $totals['value'];
  }
 }
 $affiliate_total -=  $discount;  
//end subtract discount

 

This should do the trick, if you have any other kinds of discount class just add a test to the loop

Test this change throughly though as I have not had the time to do so

that did do the trick - many thanks once again....

 

but I don't know how to stop a negative payment showing in the affiliate sales, in both the catalog end fr the affiliate to see and the admin end?

 

here's what it says in admin/order:

 

Sub-Total: ?23.90

Table Rate (Best Way): ?8.50

Discount Coupon Used:verynice: -?3.51

Gift Vouchers: -?25.00

Total: ?3.89

 

and here's what it says in admin/affiliate sales and catalog/affiliate sales:

 

this generated the affliliate sales as:

 

?-4.61 total sale

7.50% commission rate

?-0.33 commision due to affiliate

 

once a coupon and/or voucher is applied it is clearly possible to have an amount to pay via cc/paypal etc BUT at the same time because shipping isn't added to affiliate sales, it generates a negative amount!

 

can anyone please give some tips? everytime i put more code in it just goes totally wrong?

 

Many Thanks

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Try this:

 

Just after

$affiliate_total -= $discount;

 

add

 

if ($affiliate_total < 0) {
$affiliate_total = 0:
}

Share this post


Link to post
Share on other sites
Try this:

 

Just after

$affiliate_total -= $discount;

 

add

 

if ($affiliate_total < 0) {
$affiliate_total = 0:
}

Yup, thats working fine now... many thanks for saving the day again Phocea :-)

 

this great contribution looks like it just got better!


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

I have two websites, one has Ultimate SEO URLs v2.1 installed, the other does not. It is for testing only.

 

 

The other site has osc Affiliate running, the 2nd does not. After installing osc Affiliate onto the 1st site and found it working OK, it was added to the 2nd site, the one that had no trouble running Ultimate SEO URLs v2.1.

 

The site crashed after installing the osc Affiliate.

 

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

 

Checked it 3-4 times and can't find the problem. Decided to attempt to remove the Ultimate SEO URLs v2.1, as having the affiliate mod running was rated higher in importance.

 

 

Does anyone know the complete list of files that were changed/modified by the Ultimate SEO URLs v2.1 software?

 

Better yet, has anyone else experienced the same problem? We have shared hosting and the new and improved version of osCommerce (05-1113?)

 

Thanss in advance for your suggestions.


Doctor Mason, World's #1 "Temporary Webmaster"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×