Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-Affiliate


henri

Recommended Posts

Before I implement this contribution, can someone tell me if there is an option for affiliates to create TEXT links only? I'd hate to just give the affiliates 1 option of banners.

Michelle

 

Hi Michelle,

 

I haven't done it yet, but I am going to put up a page of text and category links for my affiliates to go to and they will just need to add their affiliate number. I will post it as an example in a day or so, other issues distracted me :)

 

I think the text links are explained earlier in the thread by Henri.

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Help - I'm lost

 

I've looked through the menu options, forums, searched for relevant words throughout the code, read the manual from oscdox.com and any thing else I can think of.

 

I cant find where to manage/enter the affiliate commission rate %'s.

 

Please point me in the right direction.

 

Thanks

 

Kenny Macleod

If you learn more than you forget then that's a good thing.

Link to comment
Share on other sites

In the admin menu, under Configuration, at the bottom of the box will be Affiliates, that is where you set up the percentage and level for payments, etc. I had trouble finding it at first too. :)

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Nope - still can't find it - these are the menu options I have in Adnin. Does it look as if i've an option missing?

 

CONFIGURATION

My Store

Minimum Values

Maximum Values

Images

Shipping/Packaging

Product Listing

Stock

Logging

Cache

E-Mail Options

Download

GZip Compression

 

AFILIATES

Summary

Affiliates

Payment

Sales

Clicks

Banners

Contact

If you learn more than you forget then that's a good thing.

Link to comment
Share on other sites

Nope - still can't find it - these are the menu options I have in Adnin. Does it look as if i've an option missing?

 

CONFIGURATION

My Store

Minimum Values

Maximum Values

Images

Shipping/Packaging

Product Listing

Stock

Logging

Cache

E-Mail Options

Download

GZip Compression

 

Affiliate Program should be at the bottom of this list. As Henri pointed out, did you add the new information to your database?

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

I had already run the .sql file that came in the affiliate contribution and can see all the new tables.

 

took out & ran only the configuration insert - seemed to do th etrick - i have the menu option now

 

I'll play with it and see how it works -

 

THanks a lot

 

Kenny

If you learn more than you forget then that's a good thing.

Link to comment
Share on other sites

Well, I've installed the module and am very pleased thusfar. I implemented on and created a way to output a "Text Link" option for affiliates, and it works, counts clicks - and tracks fine...but I want to be able to track impressions on text. The only way I can think to do this is to create a "false" banner (a clear img @ 1x1 pixel) to add to the code. However, this "false" banner would appear under created banners. I am sure I'll find a solution, but if anyone else wants to give it a go...my brain is fried (6 hours sleep in last 2 days).

 

Regards,

Michelle

 

(If you'd like me to post the add-on for the text code...let me know. It was quite simple really - and just a few additional lines.)

 

 

Before I implement this contribution, can someone tell me if there is an option for affiliates to create TEXT links only? I'd hate to just give the affiliates 1 option of banners.

 

Regards,

Michelle

Link to comment
Share on other sites

In affiliate_banners.php

 

1.) Locate around line 87 and change:

 

<?php

if ($HTTP_POST_VARS['individual_banner_id'] || $HTTP_GET_VARS['individual_banner_id'] ) {



if ($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'];

$sql="select products_image  from " . TABLE_PRODUCTS . " where products_id ='" . $individual_banner_id . "' ";

$affiliate_pbanners_values=tep_db_query($sql);

if ($affiliate_pbanners=tep_db_fetch_array($affiliate_pbanners_values)) {

   switch (AFFILIATE_KIND_OF_BANNERS) {

    case 1:

  $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $affiliate_pbanners['affiliate_banners_image'] . '" border="0"></a>';

  break;

 case 2:

  // Link to Products

  $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $affiliate_id . '&affiliate_pbanner_id=' . $individual_banner_id . '" border="0"></a>';

  break;  

    }

}

?>

 

To new:

 

<?php

if ($HTTP_POST_VARS['individual_banner_id'] || $HTTP_GET_VARS['individual_banner_id'] ) {



if ($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'];

$sql="select products_image from " . TABLE_PRODUCTS . " where products_id ='" . $individual_banner_id . "' ";

$sql="select products_name  from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id ='" . $individual_banner_id . "' ";

$affiliate_pbanners_values=tep_db_query($sql);

if ($affiliate_pbanners=tep_db_fetch_array($affiliate_pbanners_values)) {

   switch (AFFILIATE_KIND_OF_BANNERS) {

    case 1:

  $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $affiliate_pbanners['affiliate_banners_image'] . '" border="0"></a>';

  $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>';

  break;

 case 2:

  // Link to Products

  $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $individual_banner_id . '&affiliate_banner_id=1" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $affiliate_id . '&affiliate_pbanner_id=' . $individual_banner_id . '" border="0"></a>';

  $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>';

  break;

    }

}

?>

 

2.) Locate around line 106 and change:

 

          <tr>

           <td class="smallText" align="center"><br><?php echo $link; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center"><?php echo TEXT_AFFILIATE_INFO; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center">

    <textarea cols="60" rows="6" class="boxText"><?php echo $link; ?></textarea></td>

         </tr>

         <tr>

           <td><br><td>

         </tr>

 

To new:

 

          <tr>

           <td class="smallText" align="center"><?php echo $link; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center"><?php echo TEXT_AFFILIATE_INFO; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center">

            <textarea cols="60" rows="6" class="boxText"><?php echo $link; ?></textarea>

  </td>

         </tr>

         <tr>

           <td> <td>

         </tr>

         <tr>

           <td class="smallText" align="center"><b>Text Version:</b> <?php echo $link2; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center"><?php echo TEXT_AFFILIATE_INFO; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center">

            <textarea cols="60" rows="6" class="boxText"><?php echo $link2; ?></textarea>

  </td>

         </tr>

         <tr>

           <td> <td>

         </tr>

 

3.) Locate around line 128 and change:

 

 <?php

if (tep_db_num_rows($affiliate_banners_values)) {



  while ($affiliate_banners = tep_db_fetch_array($affiliate_banners_values)) {

$prod_id=$affiliate_banners['affiliate_products_id'];

$ban_id=$affiliate_banners['affiliate_banners_id'];

   switch (AFFILIATE_KIND_OF_BANNERS) {

    case 1:

  // Link to Products

  if ($prod_id>0) {



   $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $affiliate_banners['affiliate_banners_image'] . '" border="0"></a>';

  }

  // generic_link

  else {

   $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $affiliate_banners['affiliate_banners_image'] . '" border="0"></a>';

            }

  break;

 case 2:

  // Link to Products

  if ($prod_id>0) {



   $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" border="0"></a>';

  }

  // generic_link

  else {

   $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" border="0"></a>';

            }

  break;  

    }



?>

 

To new:

 

 <?php

if (tep_db_num_rows($affiliate_banners_values)) {



  while ($affiliate_banners = tep_db_fetch_array($affiliate_banners_values)) {

$prod_id=$affiliate_banners['affiliate_products_id'];

$prod_name=$affiliate_banners['affiliate_banners_title'];

$ban_id=$affiliate_banners['affiliate_banners_id'];

   switch (AFFILIATE_KIND_OF_BANNERS) {

    case 1:

  // Link to Products

  if ($prod_id>0) {



   $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $affiliate_banners['affiliate_banners_image'] . '" border="0"></a>';

   $link2= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank">' . $prod_name . '</a>';

  }

  // generic_link

  else {

   $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $affiliate_banners['affiliate_banners_image'] . '" border="0"></a>';

   $link2= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank">' . $prod_name . '</a>';

            }

  break;

 case 2:

  // Link to Products

  if ($prod_id>0) {



   $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" border="0"></a>';

   $link2= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank">' . $prod_name . '</a>';

  }

  // generic_link

  else {

   $link= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" border="0"></a>';

   $link2= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank">' . $prod_name . '</a>';

            }

  break;  

    }



?>

 

4.) Locate around line 165 and change:

 

 

          <tr>

           <td class="smallText" align="center"><br><?php echo $link; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center"><?php echo TEXT_AFFILIATE_INFO; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center">

    <textarea cols="60" rows="6" class="boxText"><?php echo $link; ?></textarea></td>

         </tr>

 

 

To new:

 

          <tr>

           <td class="smallText" align="center"><br><?php echo $link; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center"><?php echo TEXT_AFFILIATE_INFO; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center">

            <textarea cols="60" rows="6" class="boxText"><?php echo $link; ?></textarea>

     </td>

         </tr>

         <tr>

           <td> <td>

         </tr>

         <tr>

           <td class="smallText" align="center"><b>Text Version:</b> <?php echo $link2; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center"><?php echo TEXT_AFFILIATE_INFO; ?></td>

         </tr>

         <tr>

           <td class="smallText" align="center">

            <textarea cols="60" rows="6" class="boxText"><?php echo $link2; ?></textarea>

  </td>

         </tr>

 

5.) Save affiliate_banners.php and test.

 

Regards,

Michelle

Link to comment
Share on other sites

I don't know if anyone has done this already, I hadn't seen it in this thread anyways...but I created new buttons for the admin section to compliment the latest osCommerce release. Just copy these and upload them to your admin/includes/languages/english/images/buttons/ folder.

 

I've included a blank if someone wants to create buttons for different languages. Font used is: MS Sans Serif - Regular - Size 10

 

button_affiliate_banners.gif

button_affiliate_billing.gif

button_affiliate_clickthroughs.gif

button_affiliate_sales.gif

button_blank.gif

 

Regards,

Michelle

Link to comment
Share on other sites

You'll have to download the latest release (0.4) and then browse the repository (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/oscaffiliate) for the file changes. It helps to sort by date when doing this...so you can see which files have been changes since the January 22nd release. It's really not as bad as it sounds. Hope this helps.

 

Regards,

Michelle

 

Hi.

 

Just wonderin how to download the wholepackage with the updated files with it.

 

Sorry for being dumb

Link to comment
Share on other sites

i am not sure if i am missing something, but i have clicked a test purchase through, it worked. from admin side i can see the credit to the test affiliate account being credited under summary, but when i click payment there is nothing showing.

 

is it me, or something i have to set? i imagine that i there is some way to pay out affiliates... isn't there?

 

thanks for the great contribution.

Link to comment
Share on other sites

hello Ryan,

If I am correct, the affiliate will only show in the payments page if the affiliate has reached the "treshold" set by you in the admin panel.

 

If you haven't set the treshold, go into admin and click on "Configuration" then on "Affiliate Program" and change the settings there.

 

Hope this helps? :D

Link to comment
Share on other sites

There is a place where you have to click to process/post payments. Under Affiliates, Payment, you should see a button to "Start Billing". I think that will process the payments.

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

In your affiliate config file, your payment settings will not process payments less than 30 days old. If you're just testing, set this to 0. But don't forget to change it back. :wink:

 

Regards,

Michelle

 

yeah i hit that button. it looks like there should be a list of payments on that page. there aren't any though.
Link to comment
Share on other sites

Just thought I'd elaborate...You need to change the admin/includes/affiliate_configure.php file. Look for this:

 

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

 

 

In your affiliate config file, your payment settings will not process payments less than 30 days old. If you're just testing, set this to 0. But don't forget to change it back. :wink:

 

Regards,

Michelle

 

yeah i hit that button. it looks like there should be a list of payments on that page. there aren't any though.
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...