Latest News: (loading..)
henri

OSC-Affiliate

2,489 posts in this topic

Ok,

the first Release.

 

Differences to Steve Alpha:

-Optimised a lot of SQL Querys

-Bugfixes

-new Database Strukture

-removed not yet working things

-Introduced a billing system in the Admin

 

Get it here

contributions

 

Test it and find the bugs

(hope i didn't produced some news with the last changes i did today)

 

what do i want to do until 1.0:

- registration: more fields

- perhaps a change of the bannermanger

- some codeoptimation (getting it to OSC-Standards)

- check for unused defines and other old stuff which is in the code

 

 

I will try to fix upcoming bugs very fast, new features have to wait due lack of time.

 

Whats would be usefull:

- someone makes the missing / changes the worse Buttons

- Translation to german/espanol

 

Have Fun

Henri

Edited by Johnson

Share this post


Link to post
Share on other sites
(hope i didn't produced some news with the last changes i did today)

Wat did i wrote here :?:

Hope i didn't produce some new bugs with the last changes i did today

Share this post


Link to post
Share on other sites

Any way you could set up a CVS commits mailing list Henri? I really want to set this up but I want to be able to add any changes ASAP.

 

I'll help test and submit all the bugs I can find. :onfire:

Share this post


Link to post
Share on other sites
Any way you could set up a CVS commits mailing list Henri? I really want to set this up but I want to be able to add any changes ASAP.

 

I'll help test and submit all the bugs I can find.  :onfire:

Mailing List? Yes i'll check it out as soon as posible, (don't know so much of sourceforge yet).

Share this post


Link to post
Share on other sites

Hello Henri,

 

tried to set up the osc affiliate.

 

running the affiliate.sql (using phpmyadmin) i get the following Error:

 

SQL-query :

 

INSERT INTO affiliate_payment_status

VALUES ( 0, 1, 'Pending' )

 

MySQL said:

 

Table 'test.affiliate_payment_status' doesn't exist

 

 

With which parameters I have to insert the affiliate_payment_status table?

 

Thanks in advance,

 

EL Bavaro :cry:

Share this post


Link to post
Share on other sites

Yes just saw it, I updated the inserts for all languages and somehow put them before the create Statement. The part must look so:

(remove the inserts before)

 

DROP TABLE IF EXISTS affiliate_payment_status;

CREATE TABLE affiliate_payment_status (

affiliate_payment_status_id int(11) NOT NULL default '0',

affiliate_language_id int(11) NOT NULL default '1',

affiliate_payment_status_name varchar(32) NOT NULL default '',

PRIMARY KEY (affiliate_payment_status_id,affiliate_language_id),

KEY idx_affiliate_payment_status_name (affiliate_payment_status_name)

) TYPE=MyISAM;

 

INSERT INTO affiliate_payment_status VALUES (0, 1, 'Pending');

INSERT INTO affiliate_payment_status VALUES (1, 1, 'Payed');

INSERT INTO affiliate_payment_status VALUES (0, 2, 'Offen');

INSERT INTO affiliate_payment_status VALUES (1, 2, 'Ausgezahlt');

INSERT INTO affiliate_payment_status VALUES (0, 3, 'Pending');

INSERT INTO affiliate_payment_status VALUES (1, 3, 'Payed');

Share this post


Link to post
Share on other sites

Thanks Henri,

sql problem solved! Great work.

 

Some minor bugs I came across (possibly my errors):

 

1. I inserted 3 different banners (one jpg - and two gifs) - but can not see any banner in the /catalog/affiliate_banners.php. The banner text is shown perfectly.

(I remember that on your site - the banner was shown also).

 

2. If I insert the link into "an affiliates webpage" the banner does also not show up.

 

3. Having sold something to a customer via the affiliate link - the sales do show up properly in the affiliates page.

But i can not Bill it. I set the threshold down to $3 but I can not get any bill having set. Whenever I press the "Start Billing"-Button it says "Your Affiliates have been sucessfully billed" - but nothing had been billed.

Do I do something wrong?

 

Well that's it for the moment - perhaps you can help me out.

 

Best Bavarian Regards,

 

EL Bavaro :D

Share this post


Link to post
Share on other sites

Hi

 

1+2: I think I must see it; can you mail me a url?

 

3: Have you set the status of the order to delivered?

Share this post


Link to post
Share on other sites

Hi Henri,

 

1+2 - sorry - but it is an internal server.

 

3 - yes - i tried it all - pending & confirmed, but neither didn't work.

 

EL Bavaro

Share this post


Link to post
Share on other sites

Ok to 1:

You get a img Url:

http://.../affiliate_show_banner.php?ref=3569&products_id=&affiliate_pbanner_id=28

 

Take this URL and try it in a new Browser Window.

Perhaps an error happens, if not send me an mail (with the link you get) and i send you an modified version to check for errors.

 

you can also try:affiliate_configure.php -> set set AFFILIATE_KIND_OF_BANNERS to 1 (but then no stats)

 

to 3:

Perhaps:

admin/includes/afiliate_configure.php

 

define ('AFFILIATE_BILLING_TIME','30'); // Orders billed must be at leat '30' days old.

// needed if a order is refunded

Share this post


Link to post
Share on other sites

Ok released 0.2

- fixes the installation Bug in the sql

- minor changes in the banners

Share this post


Link to post
Share on other sites

Hi!

 

I get following error, on both admin and affiliate customer..

 

osaff_error.jpg

 

Any who got any idea?

 

 

Best Regards! :D

 

/Patrick Andersson

Share this post


Link to post
Share on other sites

Hi!

 

What has "affiliate_payment_status" for function?

I havent figured it out yet. :?:

 

I inserted

INSERT INTO affiliate_payment_status VALUES (5, 4, 'Mottagen');

INSERT INTO affiliate_payment_status VALUES (9, 4, 'V?ntar p? svar');

INSERT INTO affiliate_payment_status VALUES (10, 4, 'Restnoterad');

INSERT INTO affiliate_payment_status VALUES (6, 4, 'Behandlas');

INSERT INTO affiliate_payment_status VALUES (7, 4, 'Levererad');

INSERT INTO affiliate_payment_status VALUES (8, 4, 'Raderad');

INSERT INTO affiliate_payment_status VALUES (11, 4, 'F?rskott');

INSERT INTO affiliate_payment_status VALUES (12, 4, 'V?ntar p? betalning');

INSERT INTO affiliate_payment_status VALUES (13, 4, 'Betald - Uth?mtad');

 

I use the same orders_status in OsC admin..

 

Please, explain for me..

 

 

Best Regards,

Patrick Andersson

Share this post


Link to post
Share on other sites

Hi!

 

Even more errors... Hmmm

 

When I made a test order, and then I went to affiliate_summary.php I got following error..

 

Fatal error: Call to undefined function: tep_round() in /affiliate_summary.php on line 45

 

Line 45 is..

$affiliate_conversions = tep_round($affiliate_clickthroughs/$affiliate_transactions,2)."%";

 

 

And when i goes to admin I get following error..

Fatal error: Call to undefined function: tep_round() in /affiliate_summary.php on line 41

 

Line 41 is..

$affiliate_conversions = tep_round($affiliate_transactions/$affiliate_clickthroughs,6)."%";

 

 

Hmmm...

 

Best Regards,

Patrick Andersson

Share this post


Link to post
Share on other sites

Hi!

 

I forgott..

 

Where is the column_right.php on affiliate_summary.php (customer)

 

I have tried to edit affiliate_summary.php, but I cant find the error. :cry:

 

 

Best Regards,

Patrick Andersson

Share this post


Link to post
Share on other sites

tep_round is a OSC-Function in general.php

 

Which Snapshot du you use? Try to copy it from a actuell Snapshot to general.php. If you find more of those funvctions please post it here, thn i try to find a solution.

 

Cu Henri

Share this post


Link to post
Share on other sites

Ok, i started inserting compatibility functions for older snapshots :)

CVS-Only untill the next release

(files: affiliate_application_top, and /functions/affiliate_functions.php in catalog and admin)

 

>Where is the column_right.php on affiliate_summary.php

I think it doesn't show up couse of the error...

Share this post


Link to post
Share on other sites

Hi!

 

My Osc is from july 02, but I took a "new" general.php and used it instead.

It works.. :)

 

Best Regards,

Patrick

 

 

tep_round is a OSC-Function in general.php

 

Which Snapshot du you use? Try to copy it from a actuell Snapshot to general.php. If you find more of those funvctions please post it here, thn i try to find a solution.

 

Cu Henri

Share this post


Link to post
Share on other sites

The affiliate Sales where added like this in the database

 

Product Price + Tax + Shipping

 

I think the bug is in the affiliate_checkout_process

I think this file is for the old oders Table. Thats why the file add the shipping. Is the bug in the first line after $affiliate_total ?

 

my shop is 2.2 from 30.10.2002

 

 

 

$affiliate_total = $order->info['total']-$order->info['shipping_cost'];

$affiliate_percentage = AFFILIATE_PERCENT/100;

$affiliate_payment = $affiliate_total*$affiliate_percentage;

 

if ($HTTP_SESSION_VARS['affiliate_ref']) {

$sql= "insert into ". TABLE_AFFILIATE_SALES ."

(affiliate_id , affiliate_date, affiliate_browser , affiliate_ipaddress , affiliate_value , affiliate_payment , affiliate_orders_id , affiliate_clickthroughs_id )

VALUES ('$affiliate_ref', '$affiliate_clientdate', '$affiliate_clientbrowser', '$affiliate_clientip','$affiliate_total', '$affiliate_payment','$insert_id','$affiliate_clickthroughs_id')

";

tep_db_query($sql);

}

 

?>

 

 

Chris

Share this post


Link to post
Share on other sites

Just checked it:

 

Zwischensumme: 34.79EUR inc. Tax

Tax.: 4.80EUR

Shiping: 10.00EUR

Nachnahmegeb?hr: 3.48EUR <- comes from a german extra modul

Sum: 48.27EUR

 

10% Provision: 3.82EUR

 

 

$affiliate_total = $order->info['total']-$order->info['shipping_cost'];

$affiliate_percentage = AFFILIATE_PERCENT/100;

 

48.27Euro - 10.00 Euro = 38.27 Euro

38.27 Euro *10/100 = 3,82 Euro (10%)

 

Seems to be right. (its like amazon bills here)

So if you want to calc stuff without tax, you have to substract it also.

If you are using this Nachname-Modul you shou subtract its cost too..

 

And as i recall it works with all Checkouts, cause i didn't adjust it for the new one.

Share this post


Link to post
Share on other sites

Hi!

 

I have tried so many times, but it don?t works.

 

I?ve got only one language id=4

INSERT INTO languages VALUES (4, 'Svenska', 'se', 'icon.gif', 'svenska', 0);

 

And the orderstatus I want to use is 13.

INSERT INTO orders_status VALUES (13, 4, 'Betald - Uth?mtad');

 

My admin affiliate_configure.php looks like..

 

define ('AFFILIATE_BILLING_TIME','-1'); // Orders billed must be at leat '30' days old.

// needed if a order is refunded

// CHECKIT

define ('AFFILIATE_PAYMENT_ORDER_MIN_STATUS','13') // Which status must an order have, to be billed

 

 

Why will it dont work??

When I press "Payment" its empty, i have made testorders, and I have set orderstatus 13 - Betald - Uth?mtad.

 

Please..

 

Best Regards,

Patrick Andersson

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