Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

oscAffiliate v1.0 problem with tracking sales


Recommended Posts

Hi I installed the Affiliate system but when ordering a product via an affiliate link, I get the following error on checkout:


1054 - Unknown column 'affiliate_salesman' in 'field list'


insert into affiliate_sales (affiliate_id, affiliate_date, affiliate_browser, affiliate_ipaddress, affiliate_value, affiliate_payment, affiliate_orders_id, affiliate_clickthroughs_id, affiliate_percent, affiliate_salesman) values ('1', '2003-08-29 12:59:23', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', '', '26.85', '2.69', '46', '12', '10.00', '1')





Now I checked the database and there is no column affiliate_salesman in the sql db. It?s not included in the supplied sql installation file as well. Does this mean that this is a mistake made by the author or and if so, what do I have to do to add the column to the affiliate_sales table?


Kind regards

Link to comment
Share on other sites

can you post the url to the contribution you have downloaded? Is it Henri's affiliate module? If it is it works fine on my site :o


ultrAslan - ultrAslan - ultrAslan

Link to comment
Share on other sites

I also picked out the line in catalog/includes/affiliate_checkout_process that causes the error:


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

                           'affiliate_date' => $affiliate_clientdate,

                           'affiliate_browser' => $affiliate_clientbrowser,

                           'affiliate_ipaddress' => $affiliate_clientip,

                           'affiliate_value' => $affiliate_total,

                           'affiliate_payment' => $affiliate_payment,

                           'affiliate_orders_id' => $insert_id,

                           'affiliate_clickthroughs_id' => $affiliate_clickthroughs_id,

                           'affiliate_percent' => $affiliate_percent,

                           'affiliate_salesman' => $affiliate_ref);


The last line of code is a non existing column in my table. In addition, I noticed that the first and last column are to be filled with the same $affiliate_ref.


I haven?t tried removing the last line yet since I don?t know what it?s supposed to do.

Link to comment
Share on other sites

Just looked at the sql file. It's in it.

DROP TABLE IF EXISTS affiliate_sales;


CREATE TABLE affiliate_sales (


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


affiliate_date datetime NOT NULL default '0000-00-00 00:00:00',


affiliate_browser varchar(100) NOT NULL default '',


affiliate_ipaddress varchar(20) NOT NULL default '',


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


affiliate_value decimal(15,2) NOT NULL default '0.00',


affiliate_payment decimal(15,2) NOT NULL default '0.00',


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


affiliate_billing_status int(5) NOT NULL default '0',


affiliate_payment_date datetime NOT NULL default '0000-00-00 00:00:00',


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


affiliate_percent DECIMAL(4,2) NOT NULL default '0.00',


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


PRIMARY KEY (affiliate_orders_id,affiliate_id)





ALTER TABLE `affiliate_sales` ADD `affiliate_salesman` INT( 11 ) NOT NULL ;


should work to

Link to comment
Share on other sites

Hi Henri,


Your?re the best, adding the line solved the problem as could be expected. however, I checked my SQl file but Im confident the affiliate_salesman int(11) NOT NULL default '0', line isn?t in it.


Anywayz, that?s history now. I?ll now try to install the branding module (now known as shop). Is it wise to update to a newer edition of osAffiliate first?


Kind regards and thanks for your help, again!




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.

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