
Originally Posted by
picandnix
Hi there Lat9

luvin' the latest editions.
Noticed on the upgrade info data that there's a file path missing, (nit picking I know but somebody is bound to get lost one day)
Files changed:
/includes/classes/observers/class.snap_order_observer.php
/includes/templates/YOUR_TEMPLATE/**templates**/tpl_referrer_tools_default.php
/YOUR_ADMIN/referrers.php
/YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
/YOUR_ADMIN/includes/languages/english/referrers.php
Thanks, picandnix, I'll get that into the updated readme.html.

Originally Posted by
picandnix
what has been changed to this file since v2.10 please?
/includes/classes/observers/class.snap_order_observer.php
Er, in my local copy, the support for the purchases-per-cookie; in the distribution, nada.
Here's the file that should be in the v2.3.0 version:
Code:
<?php
// +----------------------------------------------------------------------+
// |Snap Affiliates for Zen Cart |
// +----------------------------------------------------------------------+
// | Copyright (c) 2013, Vinos de Frutas Tropicales (lat9) for ZC 1.5.0+ |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license. |
// +----------------------------------------------------------------------+
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
class snap_order_observer extends base {
function snap_order_observer() {
$this->attach($this, array('NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_HEADER'));
}
function update(&$class, $eventID, $paramsArray) {
global $db;
$commission = 0;
if (isset($_SESSION['referrer_key']) && zen_not_null($_SESSION['referrer_key'])) {
$sql = "SELECT referrer_customers_id, referrer_approved, referrer_banned, referrer_commission
FROM " . TABLE_REFERRERS . "
WHERE referrer_key = '" . $_SESSION['referrer_key'] . "'";
$query = $db->Execute($sql);
if (!$query->EOF) {
$commission = floatval($query->fields['referrer_commission']);
if ($commission < 0) {
$commission = 0;
}
}
}
/*----
** Allow the commission so long as the referrer has been approved, is not banned and (unless specified by the store's
** Configuration->Affiliate Program options) is not the customer associated with the referral!
*/
if ($commission > 0 &&
$query->fields['referrer_approved'] != 0 &&
$query->fields['referrer_banned'] == 0 &&
(SNAP_AFFILIATE_KEY_USE === 'true' || $query->fields['referrer_customers_id'] != $_SESSION['customer_id'])) { /*v2.1.0c*/
$sql_data_array = array('commission_orders_id' => $paramsArray['orders_id'],
'commission_referrer_key' => $_SESSION['referrer_key'],
'commission_rate' => $commission,
'commission_paid' => 0);
zen_db_perform(TABLE_COMMISSION, $sql_data_array);
//-bof-a-v2.3.0
// -----
// If an affiliate's referral_key cookie is to be deleted on a customer's first purchase ... delete the cookie.
//
if (SNAP_AFFILIATE_COOKIE_PURCHASES == 'One') {
setcookie('referrer_key', '', time() - 3600, '/');
}
//-eof-a-v2.3.0
}
}
}

Originally Posted by
picandnix
Yes it's me again...
which file or files are responsible for allowing the affiliate to edit their website details on their affiliate account page please, I can't seem to find it mentioned in the upgrade (2.2>2.3) changed/new files list.
I don't have that feature implemented ... yet.
Bookmarks