Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-Affiliate


henri

Recommended Posts

Great. I tested it on CVC.

 

and now I have a division by 1 error on these lines.

 

Warning: Division by zero in /home/discount/public_html/catalog/includes/classes/split_page_results.php on line 59

 

Warning: Division by zero in /home/discount/public_html/catalog/includes/classes/split_page_results.php on line 86

Warning: Division by zero in /home/discount/public_html/catalog/includes/classes/split_page_results.php on line 89

 

 

If I go to the includes/classes/split_page_results.php. What would a safe division be: by one etc.?

Link to comment
Share on other sites

I can.

Also he has a very bad attititude  for assisting any of us with ideas or suggestions as to even where to look for this problem.

Maybe he needs a new girlfriend or needs to go back to school and take a course in social ettiquite.

Or maybe he RIPPED the code from someone else and just has no idea how to fix it.

I am really developing an bad attitude about people such as him. Also as I have knowm MANY Germans in the past and they all seem to be this way.

What gives? Must be a Euro thing.

 

And you really think this motivates me to work on the affiliate?

Reading this i have some thoughts:

- first adjusting my other contributions when MS2 is out

- stop doing anything with the affiliate

 

Must think about it, one more time...

Link to comment
Share on other sites

Great.  I tested it on CVC.  

 

and now I have a division by 1 error on these lines.

 

Warning: Division by zero in /home/discount/public_html/catalog/includes/classes/split_page_results.php on line 59

 

Warning: Division by zero in /home/discount/public_html/catalog/includes/classes/split_page_results.php on line 86

Warning: Division by zero in /home/discount/public_html/catalog/includes/classes/split_page_results.php on line 89

 

 

If I go to the includes/classes/split_page_results.php.  What would a safe division be:  by one etc.?

 

Ooops! I think I meant to say:

 

$affiliate_sales_split = new splitPageResults($affiliate_sales_raw, MAX_DISPLAY_SEARCH_RESULTS);

 

but dont count on it working - hard to do this without actually having MS2 installed!

Ian-san

Flawlessnet

Link to comment
Share on other sites

On the face of it, you just need to change line 36 to:

$affiliate_sales_split = new splitPageResults($affiliate_sales_raw, $HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS);

but as I said, I am not using MS2 and cannot test this.

 

I tried this but, I keep getting back to this.

 

Warning: Division by zero in /home/discount/public_html/catalog/includes/classes/split_page_results.php on line 86

Warning: Division by zero in /home/discount/public_html/catalog/includes/classes/split_page_results.php on line 89[/code]

 

What is the easiest way to roll back the verision to 2.2M1 if I need to?

Link to comment
Share on other sites

Hi -

 

I've been trying to figure this out but am having problems.

 

Instead of giving each affiliate a header image, I want to use the same header image but have "In conjunction with <AFFILIATE_COMPANY>" (that field from the SQL database in the affiliate_affiliate table).

 

When there wasn't an affiliate, that phrase wouldn't appear at all.

 

Can someone give me some ideas?

 

Thanks,

Scott

Link to comment
Share on other sites

I just downloaded the MS2.

1.5 hours later i commited the first changes to cvs.

http://sourceforge.net/projects/oscaffiliate

I don't know if i fixed everything, but the small tests i made seem to be working.

 

Don't have time for more, these days. Sorry

Bu the first step is done on the way to the next release.

 

If someone checks it out and gives feedback...

Warning:

CVS is not compatible to MS1 and older Snapshots (due to change of the split_page_results class).

There is a multitier levelsystem in it, which is absolutly unsupported.

(Development is at the moment frozen cause the promised donations never arrived. But it should be working)

 

Have fun.

Link to comment
Share on other sites

I am using a old snapshot tep_pr2.2_B20020224.zip , I have got this mod to work due to the great planning of the development team to allow old osc builds to function...THANKS FOR THAT. I had to make 1 or 2 edits to get it to work and have a couple of questions.

 

in affiliate_application_top.php this array seems to cause the problem.

 

if (!$link_to) $link_to = "0";

$sql_data_array = array('affiliate_id' => $affiliate_ref,

'affiliate_clientdate' => $affiliate_clientdate,

'affiliate_clientbrowser' => $affiliate_clientbrowser,

'affiliate_clientip' => $affiliate_clientip,

'affiliate_clientreferer' => $affiliate_clientreferer,

'affiliate_products_id' => $affiliate_products_id,

'affiliate_banner_id' => $affiliate_banner_id);

 

if i comment out //'affiliate_products_id' => $affiliate_products_id, all the banner links work fine but doing this makes it so the admin it will not show "clicked products" it then only shows why the user came as Startpage not the product_id image that was click.

Now if i use it as above code as is the problem is the link will work ref=1&products_id=3&affiliate_banner_id=1 , but an non product specific link will not ref=1&affiliate_banner_id=1 giving the error below .... note that the affiliate_products_id is then not present in the insert sql:

 

insert into affiliate_clickthroughs (affiliate_id, affiliate_clientdate, affiliate_clientbrowser, affiliate_clientip, affiliate_clientreferer, affiliate_products_id, affiliate_banner_id) values ('1', '2003-07-17 01:20:57', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)', '192.168.0.10', 'http://www.site.com/', , '1')

 

 

I tried playing with affiliate_products_id below but each way seemed to break another part.

 

if (!$link_to) $link_to = "0";

$sql_data_array = array('affiliate_id' => $affiliate_ref,

'affiliate_clientdate' => $affiliate_clientdate,

'affiliate_clientbrowser' => $affiliate_clientbrowser,

'affiliate_clientip' => $affiliate_clientip,

'affiliate_clientreferer' => $affiliate_clientreferer,

//'affiliate_products_id' => (!$affiliate_products_id) ? '0' : $affiliate_products_id,

//'affiliate_products_id' => '0',

'affiliate_products_id' => $affiliate_products_id,

'affiliate_banner_id' => $affiliate_banner_id);

 

Has anyone else had the problem with ref=1&products_id=3&affiliate_banner_id=1 working and a link ref=1&affiliate_banner_id=1 ending in an error?

Is it ok to run the script as below? Will it truly only affect the tracking of what product a user click to come to the site?:

 

if (!$link_to) $link_to = "0";

$sql_data_array = array('affiliate_id' => $affiliate_ref,

'affiliate_clientdate' => $affiliate_clientdate,

'affiliate_clientbrowser' => $affiliate_clientbrowser,

'affiliate_clientip' => $affiliate_clientip,

'affiliate_clientreferer' => $affiliate_clientreferer,

//'affiliate_products_id' => $affiliate_products_id,

'affiliate_banner_id' => $affiliate_banner_id);

 

 

If anyone needs to know what edits i did to make it work on an older CSV just email me I will be happy to let you know.

 

Hats off to you Henri Schmidhuber

thanks for the excellent mod.

crshNbrn living on the edge.....

Link to comment
Share on other sites

1064 - You have an error in your SQL syntax near ' '1')' at line 1

 

insert into affiliate_clickthroughs (affiliate_id, affiliate_clientdate, affiliate_clientbrowser, affiliate_clientip, affiliate_clientreferer, affiliate_products_id, affiliate_banner_id) values ('1', '2003-07-17 02:25:40', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)', '192.168.0.10', 'http://www.site.com/', , '1')

 

[TEP STOP]

 

Notice that the , , for affiliate_products_id is blank.

 

Thanks for yourr help

crshNbrn living on the edge.....

Link to comment
Share on other sites

Ok, just checked it out

 

put an echo in the tep_db_perform function:

 

insert into affiliate_clickthroughs (affiliate_id, affiliate_clientdate, affiliate_clientbrowser, affiliate_clientip, affiliate_clientreferer, affiliate_products_id, affiliate_banner_id) values ('1', '2003-07-17 11:08:59', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;)', '127.0.0.1', '', '', '2')

 

here comes the ''. So i think you should look at the tep_db_perform...

 

 

@all:

 

at sourceforge you can download a zipfile with the first changes for MS2

Link to comment
Share on other sites

on the banner display, I was getting:

 

[Thu Jul 17 11:27:27 2003] [error] PHP Notice: Use of undefined constant DIR_FS_DOCUMENT_ROOT - assumed 'DIR_FS_DOCUMENT_ROOT' in /Library/WebServer/Documents/catalog/affiliate_show_banner.php on line 124

[Thu Jul 17 11:27:27 2003] [error] PHP Notice: Use of undefined constant DIR_WS_CATALOG - assumed 'DIR_WS_CATALOG' in /Library/WebServer/Documents/catalog/affiliate_show_banner.php on line 124

 

...and no image.

 

Replacing those two on line 124 with:

 

$pic = DIR_FS_CATALOG . DIR_WS_IMAGES . $banner;

 

 

Seems to work. MS2 BTW.

Link to comment
Share on other sites

Hi, i have a problem with affiliate module and ssl.

 

First i thought the problem was for using SID KILLER, a module that kills the session id until the user loggs in.

 

But if i turn off the ssl it works fine.

 

I have changed the links for disabling ssl directly from the affiliate pages:

 

for example:

 tep_redirect(tep_href_link(FILENAME_AFFILIATE_SUMMARY,' ','SSL'));

 

into:

 

 tep_redirect(tep_href_link(FILENAME_AFFILIATE_SUMMARY,' '));

 

Now i've got a working affiliate system, but working in non ssl pages.

 

What is the problem with the ssl?, it's finally the SID KILLER module killing my ssl affiliate program too?.

 

Thank you for helping me, (i think i've read all the posts related to this)

Link to comment
Share on other sites

Yes, i think it's a problem with the SID Killer.

You have to change some things there. But don't ask me.

I contributed the spider killer and only removed the sid killer on non working shops some times...

Cu Henri

Link to comment
Share on other sites

:oops: Finally didn't tell you the problem i have with the ssl on!

 

With ssl on, the affiliate can't login and is ckiked out to the login page affiliate_affiliate.php again and again,

The user can make an account, but in the final stage of that process, instead of being logged into the affiliate_summary.php, he's prompted again to login in affiliate_affiliate.php

Link to comment
Share on other sites

Sid killer tell us to add this code on application top.php

//================================================================

if ( ($HTTP_GET_VARS['currency']) ) {

  tep_session_register('kill_sid');

  $kill_sid=false;

 }

if (basename($_SERVER['HTTP_REFERER']) == 'allprods.php' ) $kill_sid = true;

if ( ( !tep_session_is_registered('customer_id') ) && ( $cart->count_contents()==0 ) && (!tep_session_is_registered('kill_sid') ) ) $kill_sid = true;

if ((basename($PHP_SELF) == FILENAME_LOGIN) && ($HTTP_GET_VARS['action'] == 'process') ) $kill_sid = false;

if (basename($PHP_SELF) == FILENAME_CREATE_ACCOUNT_PROCESS) $kill_sid = false;

// Uncomment line bellow to disable SID Killer

// $kill_sid = false; 

//================================================================

 

 

I thought adding a line like this:

if (basename($PHP_SELF) == FILENAME_AFFILIATE) $kill_sid = false;

 

may work, but it didnt, of course. am i in the wrong way?

 

Thank you people, very much

Link to comment
Share on other sites

Thank you Henri, so you think the better solution is to desinstall sid killer and install spider killer?

I have installed sid k. instead of spider k. because someone told me that spider killer have a pair of serious lacks, first, the ip's of the spiders are constantly changing, and you have to be always changing a list of that ip's, and i don't remember the subsequent one's :) . Well, if you tell me this is bullsheet i'll take that way,

 

Thank you again Henri, and excuse my English

:D

Link to comment
Share on other sites

I am finding that i now have 2 problems that seem to be the same.

 

Problem 1

 

If i use the code without edits all works fine but when a banner is clicked if the link does not have the &product_id in the link tag the 'affiliate_products_id' => $affiliate_products_id, is then entered blank and it fails

 

Error Below:

insert into affiliate_clickthroughs (affiliate_id, affiliate_clientdate, affiliate_clientbrowser, affiliate_clientip, affiliate_clientreferer, affiliate_products_id, affiliate_banner_id) values ('1', '2003-07-17 01:20:57', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)', '192.168.0.10', 'http://www.site.com/', , '1')

 

Problem 2

 

When a user comes from a non affiliate banner (direct from google lets say) and they buy the result error is as below

 

Error:

insert into affiliate_sales (affiliate_id, affiliate_date, affiliate_browser, affiliate_ipaddress, affiliate_value, affiliate_payment, affiliate_orders_id, affiliate_clickthroughs_id, affiliate_percent) values ('1', '2003-07-07 01:59:55', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)', '192.168.0.10', 119.99, 2.4, 366, , '2.0000')

 

Notice in both problems the value desired is not present and thus seems to result in the insert error... any hints on what might be happening to this.

 

Note the server is not Apache but windows IIS server. Can this be making the difference on entering a blank value?

 

Regards

Tom

crshNbrn living on the edge.....

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