Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-Affiliate


henri

Recommended Posts

@ strunkwriter

Of course I do, or why should make all this work :-))

www.klosterbrauerei.com

 

@all

I got a problem. I looked in the OSC-AFF Files and saw there is a new update file insided:

 

# $Id: update.txt,v 1.12 2003/02/20 16:36:19 simarilius Exp $

 

# 0.4->0.5:

 

# Use following SQL-Selects:

 

ALTER TABLE `affiliate_affiliate` ADD `affiliate_company` VARCHAR(32) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_gender` VARCHAR(1) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_fax` VARCHAR(32) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_dob` DATETIME NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_payment_paypal` VARCHAR(64) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_payment_bank_name` VARCHAR(64) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_payment_bank_branch_number` VARCHAR(64) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_payment_bank_swift_code` VARCHAR(64) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_payment_bank_account_name` VARCHAR(64) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_payment_bank_account_number` VARCHAR(64) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_company_taxid1` VARCHAR(64) NOT NULL AFTER `affiliate_company`;

ALTER TABLE `affiliate_affiliate` CHANGE `affiliate_street_address2` `affiliate_suburb` VARCHAR(64) NOT NULL;

ALTER TABLE `affiliate_affiliate` CHANGE `affiliate_payableto` `affiliate_payment_check` VARCHAR(100) NOT NULL;

ALTER TABLE `affiliate_affiliate` ADD `affiliate_commission_percent` DECIMAL(4,2) DEFAULT '0.00' NOT NULL;

ALTER TABLE `affiliate_clickthroughs` CHANGE `affiliate_id` `affiliate_id` INT(11) DEFAULT 'none';

ALTER TABLE `affiliate_payment` CHANGE `affiliate_payment` `affiliate_payment` DECIMAL(15,2) DEFAULT '0.00' NOT NULL;

ALTER TABLE `affiliate_payment` CHANGE `affiliate_payment_status` `affiliate_payment_status` INT(5) DEFAULT '0' NOT NULL;

ALTER TABLE `affiliate_sales` CHANGE `affiliate_clickthroughs_id` `affiliate_clickthroughs_id` INT(11) DEFAULT '0' NOT NULL;

ALTER TABLE `affiliate_sales` CHANGE `affiliate_billing_status` `affiliate_billing_status` INT(5) DEFAULT '0' NOT NULL;

ALTER TABLE `affiliate_sales` ADD `affiliate_percent` DECIMAL(4,2) NOT NULL;

ALTER TABLE `affiliate_payment` CHANGE `affiliate_street_address2` `affiliate_suburb` VARCHAR(64) NOT NULL;

ALTER TABLE `affiliate_payment` ADD `affiliate_payment_tax` DECIMAL(15,2) NOT NULL AFTER `affiliate_payment`;

ALTER TABLE `affiliate_payment` ADD `affiliate_payment_total` DECIMAL(15,2) NOT NULL AFTER `affiliate_payment_tax` ;

 

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','2002-09-25 04:38:42','0000-00-00 00:00:00',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', '5','2002-09-25 04:38:42','0000-00-00 00:00:00',NULL,NULL);

INSERT INTO configuration VALUES ('','Pay Affiliates with check', 'AFFILIATE_USE_CHECK', 'true', 'Pay Affiliates with check', '900', '6','2002-09-25 04:38:42','0000-00-00 00:00:00',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', '7','2002-09-25 04:38:42','0000-00-00 00:00:00',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', '8','2002-09-25 04:38:42','0000-00-00 00:00:00',NULL,'tep_cfg_select_option(array('true', 'false'), ');

INSERT INTO configuration VALUES ('','Individual Affiliate Percentage', 'AFFILATE_INDIVIDUAL_PERCENTAGE', 'true', 'Allow per Affiliate provision', '900', '9','2002-09-25 04:38:42','0000-00-00 00:00:00',NULL,'tep_cfg_select_option(array('true', 'false'), ');

 

update `affiliate_sales` set affiliate_percent=( (affiliate_payment / affiliate_value)*100) where affiliate_value!=0 and affiliate_percent=0;

 

Is it a good idea to run this on a live operating system, because I tried it with myphpadmin and it worked not, because many of the tables are already there.

 

Like affiliate_company, you can't alter than.

 

 

Also `affiliate_gender` was before CHAR now I can't change it to VARCHAR. It will not save the new way.

 

How do you handle this???

 

Please help.

 

Stefan Fritsche

and so

 

But I can't run it in mysql for e

ALTER TABLE `affiliate_affiliate` ADD `affiliate_company_taxid1` VARCHAR(64) NOT NULL AFTER `affiliate_company`;

Link to comment
Share on other sites

Ahh,

 

thanks a lot for the answer. So I don't have to change anything:-).

 

Thank you for this great contribution.

 

I already sold with the contribution :-).

 

Of course I sell the monastery stuff that the reason why it works :)

 

Stefan Fritsche

klosterbrauerei.com

Link to comment
Share on other sites

Hello:

 

Loaded the latest 2.2 snapshot on 06-29 and everything seems to work except for this small error:

Fatal error: Call to undefined function: tep_array_merge() in /var/www/html/tiendas/catalog/admin/affiliate_payment.php on line 355

 

Under of course affiliate payment.

 

Any ideas?

 

Also will the banner manager and this contrib work with the admin with levels contrib? I need to know the answer to this question before i blow up my new install. :D

ElLeonBlanco

 

"The man of genius makes no mistakes. His errors are volitional and are the portals of discovery." James Joyce (1882?1941)

Link to comment
Share on other sites

Loaded the latest 2.2 snapshot on 06-29 and everything seems to work except for this small error:  

Fatal error: Call to undefined function: tep_array_merge() in /var/www/html/tiendas/catalog/admin/affiliate_payment.php on line 355

 

OSC-AFFILIATE works with MS1

If MS2 is out and i find time it will be adjusted.

If you want to use it now, please adjust it yourself and send me the changes.

Link to comment
Share on other sites

Loaded the latest 2.2 snapshot on 06-29 and everything seems to work except for this small error:

Fatal error: Call to undefined function: tep_array_merge() in /var/www/html/tiendas/catalog/admin/affiliate_payment.php on line 355

 

I ran into the same problem when installing the affiliate module. All you have to do is change tep_array_merge() to array_merge() in the file it refers to.

Link to comment
Share on other sites

Hey!

Thanks for the help on that one. Helped me fix a couple of other page bugs too. Now I am greeted with this lovely little error:

 

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /var/www/html/tiendas/catalog/admin/affiliate_payment.php on line 392

 

I have crawlled all over this line and the few preceeding it with a fine toothed comb. Maybe I am just missing something TOO obvious. I can generally find small errors like this one. But, this time I am at a loss.

:?

Any suggestions?

ElLeonBlanco

 

"The man of genius makes no mistakes. His errors are volitional and are the portals of discovery." James Joyce (1882?1941)

Link to comment
Share on other sites

Sorry if this has already been discussed, but I can't find an easy way to search this giant thread. :oops:

 

I know the program will generate links that link to specific products, but can an affiliate link to the front page of the store and still receive credit for anything sold?

 

Thanks,

Scott

Link to comment
Share on other sites

Sorry if this has already been discussed, but I can't find an easy way to search this giant thread. :oops:

 

I know the program will generate links that link to specific products, but can an affiliate link to the front page of the store and still receive credit for anything sold?

 

Thanks,

Scott

 

Sorry, I figured it out. If I could delete this post, I would.

 

s

Link to comment
Share on other sites

If anyone has a working affiliate_payment.php that runs on MS2 could you please send me a copy? Or read my above post and tell me what I am missing in the code for line 392? Wasted my whole night trying to sort this one out. :cry:

ElLeonBlanco

 

"The man of genius makes no mistakes. His errors are volitional and are the portals of discovery." James Joyce (1882?1941)

Link to comment
Share on other sites

If anyone has a working affiliate_payment.php that runs on MS2 could you please send me a copy?

Did i miss something? Where can i download MS2?

Read my post above...

Link to comment
Share on other sites

I read your post above. I also thought that you came across with a bad attitude in it as well. Some of us are already working with the new release. I download and update daily. Sorry you feel so strongly against other people trying to make forward progress. I am sure that not everyone feels the way you do. It is a community of people working together that makes this project so strong and useful. I really enjoy working with oscommerce and think it is one of the finest shopping systems ever. The people that have developed it have done an exceptional job. You should be happy that someone is trying to use your contribution on a piece of work that is almost finished. It helps the whole community to advance at a more rapid pace. Instead of throwing flames and bad attitude you could offer a helpful tip or suggestion. :wink:

ElLeonBlanco

 

"The man of genius makes no mistakes. His errors are volitional and are the portals of discovery." James Joyce (1882?1941)

Link to comment
Share on other sites

If you update daily, then look why it stopped working some times ago, figure out why ;) And tell me and the others so we spare some time with the update.

I do a hell lot of support for my contributions (here,mail, german forum) an it's simply not possible to go with every change in CVS.

I don't have the free time to check every change of the cvs with all of my addons. So i said i go for the MS Releases.

 

I don't use a cvs release at the moment and personally i don't think i will use MS2 in the next future. But i will adjust the addons as soon as possible.

And for this i have to take my free time to check the changes in OSC :(

My paying customers have a higher priority. Sorry I have to earn money to live.

 

But it's a free world, the contributions are GPL you can take them and do what you want.

 

At the moment it looks that everyone who uses the CVS has problems with this (and other) contributions and if someone has fixed it, he didn't post the solution...

 

Thats life...

 

Sorry you feel so strongly against other people trying to make forward progress.

I don't have anything against these people and i would support them if i had the time. I only said that i won't support non MS Releases at the moment, if someone else does fine. :)

 

Cu Henri

Link to comment
Share on other sites

alright, well I hit just hit a snag which I can't seem to fix now. I was never too good at MySQL anyways.

 

On the affiliate page for affiliates (not the admin part) if I click on any of the report options (Payment, Sales, Clickthrough) I get the following error.

 

1064 - You have an error in your SQL syntax near 'select a.*, o.orders_status as orders_status_id, os.orders_status_name as order' at line 2



select count( select a.*, o.orders_status as orders_status_id, os.orders_status_name as orders_status from affiliate_sales a left join orders o on (a.affiliate_orders_id = o.orders_id) left join orders_status os on (o.orders_status = os.orders_status_id and language_id = '1') where a.affiliate_id = '1' order by affiliate_date DESC ) as total 



[TEP STOP]

 

Anybody have any ideas about this?

 

Again it is only these three files:

affiliate_sales.php

affiliate_clicks.php

affiliate_payment.php

 

Thanks,

Mike[/code]

Link to comment
Share on other sites

1064 - You have an error in your SQL syntax near 'select a.*, pd.products_name from affiliate_clickthroughs a left join prod' at line 2

 

select count( select a.*, pd.products_name from affiliate_clickthroughs a left join products p on (p.products_id = a.affiliate_products_id) left join products_description pd on (pd.products_id = p.products_id and pd.language_id = '1') where a.affiliate_id = '1' ORDER BY a.affiliate_clientdate desc ) as total

 

[TEP STOP]

 

 

I figured I would work this one out later after i got my affiliate_payment line 392 problem solved. Looks like you are with me on trying to get this to run on the new CVS of MS2. Watch for the great flaming Henri! By the way how did you fix the LINE 392 problem?

:P

ElLeonBlanco

 

"The man of genius makes no mistakes. His errors are volitional and are the portals of discovery." James Joyce (1882?1941)

Link to comment
Share on other sites

I never got that line 392 problem, try going through all of your files and changing the out of date functions like tep_array_merge to just array_merge. That is what I did. I have everything working for the module now except those report pages.

 

I will post what I have around line 392 here, maybe something happened with the file sometime. Compare this code with yours.

 

<?php

   if ($HTTP_GET_VARS['sID']) {

     // Search only payment_id by now

     $sID = tep_db_prepare_input($HTTP_GET_VARS['sID']);

     $payments_query_raw = "select p.* , s.affiliate_payment_status_name from " . TABLE_AFFILIATE_PAYMENT . " p , " . TABLE_AFFILIATE_PAYMENT_STATUS . " s where p.affiliate_payment_id = '" . tep_db_input($sID) . "' and p.affiliate_payment_status = s.affiliate_payment_status_id and s.affiliate_language_id = '" . $languages_id . "' order by p.affiliate_payment_id DESC";

   } elseif (is_numeric($HTTP_GET_VARS['status'])) {

     $status = tep_db_prepare_input($HTTP_GET_VARS['status']);

     $payments_query_raw = "select p.* , s.affiliate_payment_status_name from " . TABLE_AFFILIATE_PAYMENT . " p , " . TABLE_AFFILIATE_PAYMENT_STATUS . " s where s.affiliate_payment_status_id = '" . tep_db_input($status) . "' and p.affiliate_payment_status = s.affiliate_payment_status_id and s.affiliate_language_id = '" . $languages_id . "' order by p.affiliate_payment_id DESC";

   } else {

     $payments_query_raw = "select p.* , s.affiliate_payment_status_name from " . TABLE_AFFILIATE_PAYMENT . " p , " . TABLE_AFFILIATE_PAYMENT_STATUS . " s where p.affiliate_payment_status = s.affiliate_payment_status_id and s.affiliate_language_id = '" . $languages_id . "' order by p.affiliate_payment_id DESC";

   }

   $payments_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $payments_query_raw, $payments_query_numrows);

   $payments_query = tep_db_query($payments_query_raw);

   while ($payments = tep_db_fetch_array($payments_query)) {

     if (((!$HTTP_GET_VARS['pID']) || ($HTTP_GET_VARS['pID'] == $payments['affiliate_payment_id'])) && (!$pInfo)) {

       $pInfo = new objectInfo($payments);

     }



     if ( (is_object($pInfo)) && ($payments['affiliate_payment_id'] == $pInfo->affiliate_payment_id) ) {

       echo '              <tr class="dataTableRowSelected" onmouseover="this.style.cursor='hand'" onclick="document.location.href='' . tep_href_link(FILENAME_AFFILIATE_PAYMENT, tep_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=edit') . ''">' . "n";

     } else {

       echo '              <tr class="dataTableRow" onmouseover="this.className='dataTableRowOver';this.style.cursor='hand'" onmouseout="this.className='dataTableRow'" onclick="document.location.href='' . tep_href_link(FILENAME_AFFILIATE_PAYMENT, tep_get_all_get_params(array('pID')) . 'pID=' . $payments['affiliate_payment_id']) . ''">' . "n";

     }

?>

 

I'll post if I ever find out how to fix this SQL error.

Link to comment
Share on other sites

hi , i have installed the affliate mod everything in admin seems to be fine:

 

But when i go through catalog and signup and then click sales report or clicks report i get the following error at the affiliate_clicks.php page:

 

1064 - You have an error in your SQL syntax near 'select a.*, pd.products_name from affiliate_clickthroughs a left join prod' at line 2

 

select count( select a.*, pd.products_name from affiliate_clickthroughs a left join products p on (p.products_id = a.affiliate_products_id) left join products_description pd on (pd.products_id = p.products_id and pd.language_id = '1') where a.affiliate_id = '1' ORDER BY a.affiliate_clientdate desc ) as total

 

and on the affiliate_sales.php

 

1064 - You have an error in your SQL syntax near 'select a.*, pd.products_name from affiliate_clickthroughs a left join prod' at line 2

 

select count( select a.*, pd.products_name from affiliate_clickthroughs a left join products p on (p.products_id = a.affiliate_products_id) left join products_description pd on (pd.products_id = p.products_id and pd.language_id = '1') where a.affiliate_id = '1' ORDER BY a.affiliate_clientdate desc ) as total

 

hope you can help me website:

http://ridesign.staghosting.com/catalog/

 

Thank you

Link to comment
Share on other sites

I'm using the 7/2/03 snapshot with Henri's OSC-Affiliate v1.3 2003/03/03.

 

I changed the tep_merge_array to merge_array in both the admin/affiliate_affiliates.php and admin/affiliate_payment.php, and it seems to have solved all of my problems..

 

I'll monitor it over time, and let you know if I come up with any new issues..

Link to comment
Share on other sites

Oops.. :o

 

Now I'm noticing the SQL 1064 errors in all three affiliate reports... Payment, Clickthrough, and Sales...

 

1064 - You have an error in your SQL syntax near 'select a.*, o.orders_status as orders_status_id, os.orders_status_name as order' at line 2

 

select count( select a.*, o.orders_status as orders_status_id, os.orders_status_name as orders_status from affiliate_sales a left join orders o on (a.affiliate_orders_id = o.orders_id) left join orders_status os on (o.orders_status = os.orders_status_id and language_id = '1') where a.affiliate_id = '1' order by affiliate_date DESC ) as total

 

[TEP STOP]

Link to comment
Share on other sites

heh, same problem for all of us :(

 

I am not using this but looking at your problem, I would say it is caused by the recent changes to the splitPageResults class. Just out of interest, try commenting out line 36 of affiliate_sales.php.

 

Maybe nothing to do with this but you never know!

Ian-san

Flawlessnet

Link to comment
Share on other sites

I am having the same problem with a 1064 error on the sales report, clickthrogh report and banner report.

 

I tried to comment out the split page results on line 36. That showed the results. But I am now getting an error on line 123 for function not defining a non-existing object.

 

It has to do with that split page function. Maybe it needs to be renamed to format the correct results in the reports. :wink:

Link to comment
Share on other sites

I tried to comment out the split page results on line 36.  That showed the results.  But I am now getting an error on line 123 for function not defining a non-existing object.  

 

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.

Ian-san

Flawlessnet

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.

ElLeonBlanco

 

"The man of genius makes no mistakes. His errors are volitional and are the portals of discovery." James Joyce (1882?1941)

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