Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-Affiliate


henri

Recommended Posts

PAYMENT

 

Not working or showing!

 

After reading 70+ pages, and alot of testing i found the solution to my problem!

 

The case is that i have uninstalled and reinstalled languages, for now im only using Norwegian.

 

It seems to my that "OSC-Affiliate" remembers the old settings (language ID), and sinse i have been messing around alot, it did not help me to set the ID of my only existing language (norwegian)

 

So i ended up using ID 4

CODE

 

INSERT INTO affiliate_payment_status (affiliate_payment_status_id, affiliate_language_id, affiliate_payment_status_name) VALUES("0", "4", "Utest?ende");

INSERT INTO affiliate_payment_status (affiliate_payment_status_id, affiliate_language_id, affiliate_payment_status_name) VALUES("1", "4", "Oppgjort");

 

 

Hope this tip helps some others:)

 

Best regards

Jan

 

I think my problem was solved with this (thanks Jan from Norway ). I have only one language (finnish) and it ID is 4. Now I changed this thing in the database manually.

 

So if you have weird problems in a admin/affiliate_payment.php this might help you too.

Link to comment
Share on other sites

I have just installed the latest 2.16 version and have come up against a problem

 

I installed all the files and did the updates as per the instructions, but the affilliates box (I put it in the right colum) does not show the correct info. Instead I get the following

 

BOX_HEADING_AFFILIATE

 

BOX_AFFILIATE_INFO

BOX_AFFILIATE_FAQ

BOX_AFFILIATE_LOGIN

 

And the links go nowhere.

 

 

I searched through this topic and the rest of the forum and found that it appears to be the affiliate_english.php files that are the cause of the problem. But those files (in the catalog AND Admin area) are present

 

 

The admin area seems to be working OK (all the menues are there and look correct)

 

Here is my column right code just incase that is wrong.

 

<?php
/*
 $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_BOXES . 'shopping_cart.php');

 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

 if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');

//  if (isset($HTTP_GET_VARS['products_id'])) {
//	if (tep_session_is_registered('customer_id')) {
//	  $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
//	  $check = tep_db_fetch_array($check_query);
//	  if ($check['count'] > 0) {
 //	include(DIR_WS_BOXES . 'best_sellers.php');
//  } else {
//	include(DIR_WS_BOXES . 'product_notifications.php');
//	 }
// } else {
//	 include(DIR_WS_BOXES . 'product_notifications.php');
//   }
//  } else {
// include(DIR_WS_BOXES . 'best_sellers.php');
//  }

//  if (isset($HTTP_GET_VARS['products_id'])) {
//	if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
//  } else {
//	include(DIR_WS_BOXES . 'specials.php');
//  }

// require(DIR_WS_BOXES . 'reviews.php');

 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
//	include(DIR_WS_BOXES . 'languages.php');
include(DIR_WS_BOXES . 'currencies.php');
 }
 ?>
 <br />
 <td><div align="center"><img src="<?php echo DIR_WS_IMAGES  ?>/cards.gif" alt="" width=120 height=104 border="0"></div></td>
		</tr>

<?php
 require(DIR_WS_BOXES . 'affiliate.php');
?>

 

 

Any suggestions please

Edited by DeadDingo
Link to comment
Share on other sites

I wnated to change the order of the fields in the signup area. I tried to change the positions in affiliate_signup.php but it did not change anything. Where should I be editing them.

 

I want it to be:

 

Street address

address line 2

City

County/state

postcode

country

 

 

Cheers

Link to comment
Share on other sites

Should you not just edit the language files for the affiliate sign-up? All you have to do is change the text for each line to show it as you want it to be... simple really.

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

Link to comment
Share on other sites

I have removed the build a category links from mine as I could not get the pics to work for it.

 

I have also remove the picture link option from the build product links for 2 reasons (1: my pics were too large and broke my page layout. 2: They did not use the imagemagic mod I have added, so there were no watermarks on the pics)

 

 

I am trying to add a different version of the text links but am now stuck.

 

as well as having the links like

<a href="http://www.mydomain.com/product_info.php?ref=1&products_id=498&affiliate_banner_id=1" target="_blank">TEST LINK</a>

 

I would also like to have a forum friendly version like

[url=http://www.mydomain.com/product_info.php?ref=1&products_id=498&affiliate_banner_id=1]TEST LINK[/url]

 

but have come to a brick wall.

 

Can anyone give any help and hints to what I need to do.

 

 

Thanks a lot in advance

Link to comment
Share on other sites

Forget about it.

 

I didnt remember that I have ad-banner in my Firefox :)

 

You just saved me from pulling out my hair. I guess I'll have to add that advice to the text so that affiliates won't have the same problem!

Link to comment
Share on other sites

Sorted my problem from the previous page. I now show HTML and forums URL versions of the links (no picture version).

 

I changed the catalog/affiliate_banners_build.php to this

 

<?php
/*
 $Id: affiliate_banners_build.php,v 2.00 2003/10/12

 OSC-Affiliate

 Contribution based on:

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 - 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 if (!tep_session_is_registered('affiliate_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_AFFILIATE, '', 'SSL'));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_AFFILIATE_BANNERS_BUILD);

 $breadcrumb->add(NAvb script:popupWindow(\'' . tep_href_link(FILENAME_AFFILIATE_VALIDPRODUCTS) . '\')"><b>' . TEXT_AFFILIATE_VALIDPRODUCTS . '</b></a>'; ?>??<?php echo TEXT_AFFILIATE_INDIVIDUAL_BANNER_VIEW;?><br><?php echo TEXT_AFFILIATE_INDIVIDUAL_BANNER_HELP;?></td>
 </tr>
 <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if (tep_not_null($HTTP_POST_VARS['individual_banner_id']) || tep_not_null($HTTP_GET_VARS['individual_banner_id'])) {

if (tep_not_null($HTTP_POST_VARS['individual_banner_id'])) $individual_banner_id = $HTTP_POST_VARS['individual_banner_id'];
if ($HTTP_GET_VARS['individual_banner_id']) $individual_banner_id = $HTTP_GET_VARS['individual_banner_id'];
$affiliate_pbanners_values = tep_db_query("select p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $individual_banner_id . "' and pd.products_id = '" . $individual_banner_id . "' and p.products_status = '1' and pd.language_id = '" . $languages_id . "'");
if ($affiliate_pbanners = tep_db_fetch_array($affiliate_pbanners_values)) {
  switch (AFFILIATE_KIND_OF_BANNERS) {
   case 1:

  			$link2 = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1" target="_blank">' . $affiliate_pbanners['products_name'] . '</a>'; 
  			$link3 = '[url=' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1]' . $affiliate_pbanners['products_name'] . '[/url]'; 
  		break; 
	  case 2: 

  			$link2 = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1" target="_blank">' . $affiliate_pbanners['products_name'] . '</a>'; 
  			$link3 = '[url=' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1]' . $affiliate_pbanners['products_name'] . '[/url]'; 			
  		break;
	  case 3: 

  			$link2 = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1" target="_blank">' . $affiliate_pbanners['products_name'] . '</a>'; 
  			$link3 = '[url=' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1]' . $affiliate_pbanners['products_name'] . '[/url]'; 			
  		break;		
 } 
} 
?>
  <tr>
	<td><table width="100%" align="center" border="0" cellpadding="4" cellspacing="0" class="infoBoxContents">
	  <tr>
		<td class="infoBoxHeading" align="center"><?php echo TEXT_AFFILIATE_NAME; ?>?<?php echo $affiliate_pbanners['products_name']; ?></td>
	  </tr>

	  <tr> 
		<td class="smallText" align="center"><?php echo TEXT_AFFILIATE_HTML_INFO; ?></td> 
	  </tr> 
	  <tr> 
		<td class="smallText" align="center"> 
		 <textarea cols="60" rows="3" class="boxText" ><?php echo $link2; ?></textarea> 
		</td> 
	  </tr>
	   <tr> 
		<td class="smallText" align="center"><?php echo TEXT_AFFILIATE_FORUM_INFO; ?></td> 
	  </tr> 
	  <tr> 
		<td class="smallText" align="center"> 
		 <textarea cols="60" rows="3" class="boxText" ><?php echo $link3; ?></textarea> 
		</td> 
	  </tr>
	  </table>
<?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>
<?php
}
?>
 </td></tr>
 </td>
  </tr></table>
 </td>
  </tr>	
 </table></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

and the includes\languages\english\affiliate_banners_build.php to this

<?php
/*
 $Id: affiliate_banners_build.php,v 2.00 2003/10/12

 OSC-Affiliate

 Contribution based on:

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 - 2003 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Affiliate Program');
define('HEADING_TITLE', 'Affiliate Program - Build a Link');

define('TEXT_AFFILIATE_NAME', '<b>Item Name:</b>');
define('TEXT_INFORMATION', 'Enter the product number of the product you wish to build a link for:');
define('TEXT_AFFILIATE_INFO', 'Copy the code shown below and paste into your website');
define('TEXT_AFFILIATE_HTML_INFO', 'Copy the code shown below and paste into your website');
define('TEXT_AFFILIATE_FORUM_INFO', 'Copy the code shown below and paste into your forum post');
define('TEXT_AFFILIATE_INDIVIDUAL_BANNER','BUILD-A-LINK');
define('TEXT_AFFILIATE_INDIVIDUAL_BANNER_INFO','Enter the product number you wish to link to and press the enter?');
define('TEXT_AFFILIATE_VALIDPRODUCTS', 'Click Here:');
define('TEXT_AFFILIATE_INDIVIDUAL_BANNER_VIEW', 'to view available products.');
define('TEXT_AFFILIATE_INDIVIDUAL_BANNER_HELP', 'Select the product number from the popup window and enter the number in the Build A Link field.');

define('TEXT_VALID_PRODUCTS_LIST', 'Available Products List');
define('TEXT_VALID_PRODUCTS_ID', 'Product #');
define('TEXT_VALID_PRODUCTS_NAME', 'Products Name');

define('TEXT_CLOSE_WINDOW', '<u>Close Window</u> [x]');

define('IMAGE_BUTTON_BUILD_A_LINK', 'BUILD-A-LINK');
?>

 

 

 

Now I just need to figure out how to make the affiliate_validproducts.php link to the actual producat as some of my names are the same and I want it easier for them to choose. but this is beyond my PHP skills (I think)

 

Anyone able to help (while I still try it myself and fail)

 

Cheers

Edited by DeadDingo
Link to comment
Share on other sites

My customer asks how does this thing work practically.

 

Do I lie a lot if I told him that:

- When customer press the banner, it will save a cookie to customers browser

- When customer buy something the cookie will tell us that the banner was pressed earlier

 

 

Another question:

does it matter for a databaze that how long the cookie time will be set. eg. If I put the cookie lifetime for 2 months, does it affect to my database anyway or is it just the cookie lifetime in the clients browser?

Link to comment
Share on other sites

I am still having trouble getting the valid products popup, to show as links (either via the name or number)

 

I am guessing it is in this bit of code that i need to make the changes (in affiliate_validproducts.php) but don`t know what the changes need to be.

 

	$result = mysql_query("SELECT * FROM products, products_description WHERE products.products_id = products_description.products_id and products_description.language_id = '" . $languages_id . "' ORDER BY products_description.products_name");
if ($row = mysql_fetch_array($result)) {
	do {
		echo "<td class='infoBoxContents'> ".$row["products_id"]."</td>\n";
		echo "<td class='infoBoxContents'>".$row["products_name"]."</td>\n";
		echo "</tr>\n";
	}
	while($row = mysql_fetch_array($result));
}
echo "</table>\n";

 

 

Can anyone start me off in the right direction please.

 

Thanks

Link to comment
Share on other sites

when i upload the SQL file through phpadmin

This error msg pop out ..

 

SQL query:

INSERT INTO configuration_group
VALUES ( 900, 'Affiliate Program', 'Options for the Affiliate Program', 50, 1 );

MySQL said: Documentation
#1062 - Duplicate entry '900' for key 1

 

Then ignores it, and found 1 more error when i click the insert banner

 

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

insert into affiliate_banners (affiliate_banners_title, affiliate_products_id, affiliate_category_id, affiliate_banners_image, affiliate_banners_group, affiliate_date_added, affiliate_status) values ('dddd', '0', '0', '', '', now(), '1')

[TEP STOP]

 

Please help me ... :'(

Link to comment
Share on other sites

I am still having trouble getting the valid products popup, to show as links (either via the name or number)

 

I am guessing it is in this bit of code that i need to make the changes (in affiliate_validproducts.php) but don`t know what the changes need to be.

 

	$result = mysql_query("SELECT * FROM products, products_description WHERE products.products_id = products_description.products_id and products_description.language_id = '" . $languages_id . "' ORDER BY products_description.products_name");
if ($row = mysql_fetch_array($result)) {
	do {
		echo "<td class='infoBoxContents'> ".$row["products_id"]."</td>\n";
		echo "<td class='infoBoxContents'>".$row["products_name"]."</td>\n";
		echo "</tr>\n";
	}
	while($row = mysql_fetch_array($result));
}
echo "</table>\n";

Can anyone start me off in the right direction please.

 

Thanks

 

 

Can anyone help me with this. I have tried numerous things, but cannot get it to work.

 

Thanks

Link to comment
Share on other sites

1. Provided that the customer allows cookies to be set it's okay

 

2. Your site checks the cookie lifetime, as stored in the database, against the cookie on the customers computer - so yes, it does matter.

 

Vger

 

So does it matter for the database size or speed if I put the cookie lifetime for week or year? I mean do I get huge database size if putting long cookie lifetime? (sorry my english)

Link to comment
Share on other sites

Hi,

 

I need help with this great osC Affiliate V2.6 Contribution

 

I have installed the contribution and I have few bugs. The biguest one is that I can't Sign in as a returning affiliate. The page just reloads it self when I click the sign in button. But if I login as a regular customer, than I can login (on top of the first one) as a affiliate using 2 different accounts...I must have some kind of conflict with some other contribution.

 

The second bug is that banner image link does not work. The link to page works but not the image.

 

 

Thanks,

 

 

CL

Link to comment
Share on other sites

Cookies are not stored in the database, but I would recommend no longer than 7 days for a cookie lifetime (that's 604,800 seconds).

 

Vger

 

May I ask why do you not recommend longer cookie lifetime than 7 days (604,800 seconds)?

Link to comment
Share on other sites

Hi,

 

I need help with this great osC Affiliate V2.6 Contribution

 

I have installed the contribution and I have few bugs. The biguest one is that I can't Sign in as a returning affiliate. The page just reloads it self when I click the sign in button. But if I login as a regular customer, than I can login (on top of the first one) as a affiliate using 2 different accounts...I must have some kind of conflict with some other contribution.

 

The second bug is that banner image link does not work. The link to page works but not the image.

Thanks,

CL

 

 

I have installed this osC affiliate contribution on an out of the box osCommerce and it still doesn?t work properly!

 

No one seems to have the solution for this contribution? I wish that I could see one lucky site that has it working...

 

 

CL

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