Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC-Affiliate


henri

Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
  • 3 months later...
  • 1 month later...

i was attemping to upgrade this addon to work with osc 2.3.x and i received this errtor any one have any ideas on how to fix this it is the box for coulm left or right and any other corection it might need.

 

thanks

lenard

 

: syntax error, unexpected T_VARIABLE in /home/adulttoy/public_html/includes/modules/boxes/bm_affiliate.php on line 77

 

 

<?php

/*

$Id$

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2010 osCommerce

Released under the GNU General Public License

*/

class bm_information {

var $code = 'bm_affiliate';

var $group = 'boxes';

var $title;

var $description;

var $sort_order;

var $enabled = false;

function bm_affiliate() {

$this->title = MODULE_BOXES_AFFILIATE_TITLE;

$this->description = MODULE_BOXES_AFFILIATE_DESCRIPTION;

if ( defined('MODULE_BOXES_INFORMATION_STATUS') ) {

$this->sort_order = MODULE_BOXES_AFFILIATE_SORT_ORDER;

$this->enabled = (MODULE_BOXES_AFFILIATE_STATUS == 'True');

$this->group = ((MODULE_BOXES_AFFILIATE_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');

}

}

function execute() {

global $oscTemplate;

 

if (tep_session_is_registered('affiliate_id')) {

$info_box_contents = array();

$data = '<div class="ui-widget infoBoxContainer">' .

' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_AFFILIATE_BOX_TITLE . '</div>' .

' <div class="ui-widget-content infoBoxContents">' .

'<b><a href="' . tep_href_link(FILENAME_AFFILIATE_SUMMARY, '', 'SSL') . '">' . BOX_AFFILIATE_SUMMARY . '</a></b><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_ACCOUNT, '', 'SSL') . '">' . BOX_AFFILIATE_ACCOUNT . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_PASSWORD, '', 'SSL') . '">' . BOX_AFFILIATE_PASSWORD . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_NEWSLETTER, '', 'SSL') . '">' . BOX_AFFILIATE_NEWSLETTER . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_NEWS, '', 'SSL') . '">' . BOX_AFFILIATE_NEWS . '</a><br>' .

'<b><a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS . '</a></b><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BANNERS, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_BANNERS . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_BUILD . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD_CAT, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_BUILD_CAT . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_CATEGORY, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_CATEGORY . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_PRODUCT, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_PRODUCT . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_TEXT, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_TEXT . '</a><br>' .

'<b><a href="' . tep_href_link(FILENAME_AFFILIATE_REPORTS, '', 'SSL') . '">' . BOX_AFFILIATE_REPORTS . '</a></b><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_CLICKS, '', 'SSL'). '">' . BOX_AFFILIATE_CLICKRATE . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_SALES, '', 'SSL'). '">' . BOX_AFFILIATE_SALES . '</a><br>' .

'  <a href="' . tep_href_link(FILENAME_AFFILIATE_PAYMENT, '', 'SSL'). '">' . BOX_AFFILIATE_PAYMENT . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_AFFILIATE_CONTACT, '', 'SSL') . '">' . BOX_AFFILIATE_CONTACT . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_AFFILIATE_FAQ, '', 'SSL') . '">' . BOX_AFFILIATE_FAQ . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_AFFILIATE_LOGOUT). '">' . BOX_AFFILIATE_LOGOUT . '</a>'.

 

//else

'<div class="ui-widget infoBoxContainer">' .

' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_AFFILIATE_BOX_TITLE . '</div>' .

' <div class="ui-widget-content infoBoxContents">' .

'<a href="' . tep_href_link(FILENAME_AFFILIATE, '', 'SSL') . '">' . BOX_AFFILIATE_LOGIN . '</a><br>'.

'<a href="' . tep_href_link(FILENAME_AFFILIATE_INFO, '', 'NONSSL'). '">' . BOX_AFFILIATE_INFO . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_AFFILIATE_FAQ, '', 'NONSSL') . '">' . BOX_AFFILIATE_FAQ . '</a>'

 

//);

//' </div>' .

// '</div>';

 

 

$oscTemplate->addBlock($data, $this->group);

// }

function isEnabled() {

return $this->enabled;

}

function check() {

return defined('MODULE_BOXES_AFFILIATE_STATUS');

}

function install() {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Affiliate Module', 'MODULE_BOXES_AFFILIATE_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_AFFILIATE_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_AFFILIATE_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");

}

function remove() {

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

}

function keys() {

return array('MODULE_BOXES_AFFILIATE_STATUS', 'MODULE_BOXES_AFFILIATE_CONTENT_PLACEMENT', 'MODULE_BOXES_AFFILIATE_SORT_ORDER');

}

}

?>

Parse error

Link to comment
Share on other sites

  • 7 months later...
  • 2 months later...

Hi everyone,

 

For what it's worth - I had the same issue with the affiliate_sales table not being populated when it should be.

I solved the problem by changing the following line in affiliate_checkout_process.php :

 

if ($HTTP_SESSION_VARS['affiliate_ref']) {

 

to

 

if ($affiliate_ref) {

 

 

Hope that can be of use to somebody.

 

silus, I created an account just to say you are the man. Thanks for this. I had seen the session vars earlier and made a mental note to remember. Should have written it down because I drove myself crazy trying to figure out why sales weren't being recorded!! Above totally fixed it. (w00t)

Link to comment
Share on other sites

  • 3 weeks later...

So i have just installed this contribution 2.8.1 on an v2.2 rc2 install but i get this error when I look at the summary tab. any pointers welcome!

 

1054 - Unknown column 'AFFILIATE_PAYMENT_ORDER_MIN_STATUS' in 'where clause'

 

select count(*) as count, sum(affiliate_value) as total, sum(affiliate_payment) as payment from affiliate_sales a left join orders o on (a.affiliate_orders_id = o.orders_id) where o.orders_status >= AFFILIATE_PAYMENT_ORDER_MIN_STATUS

 

[TEP STOP]

Link to comment
Share on other sites

  • 1 year later...

I'm having two problems on a OSC 2.2 website which has OSC_Affiliate installed. It appears to be working from a user / admin standpoint, I'm having three issues

 

1. I ran a couple of test sales using an affiliate link. I can see the click-throughs in the affiliate admin area, but the sales are not reqistering. as affiliate sales. The system is set to not pay for a 30 day refund period, but I've looked in the database and I can find nowhere that the sales are stored so that when the 30 day refund waitning period is over, they'll be eligible for affiliate payment..

 

Does anyone know how that waiting period for refunds works and where I would see the sales that have been made, but aren't eligible for payout because they haven't yet passed the 30 day refund period?

 

2. Does anyone know how I can tell which version of the OSC Affiliate addon I have installed. There aren't any headers that state which version that I can identify.

 

3. Is anyone actually supporting this addon?

 

Thanks.

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