-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
I just submitted v3.0.2 to the plugins. This version corrects the handling of CR/LF sequences in the status-update messages; incorporates osh_updated_by v1.2.1.
Just a thought on something that might be fantastic to add to this addon. Not sure if there is an easy way to do it, or a line of code somewhere that could be added or modified to do it.
But a way where the approved affiliates can track/see how many people have clicked through their links and from what pages/sites to conversions???? (did I say that right?)
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
Jshannonb
Just a thought on something that might be fantastic to add to this addon. Not sure if there is an easy way to do it, or a line of code somewhere that could be added or modified to do it.
But a way where the approved affiliates can track/see how many people have clicked through their links and from what pages/sites to conversions???? (did I say that right?)
It would be fairly easy to keep track of pages "landed" with an affiliates' link (i.e. the count of the number of people that have clicked through) since it's just an integer value. Tracking the click-through link that initiated a product purchase would be a bit more complex and the amount of data recorded could get onerous.
Affiliates can already see the number of purchases made, although that's either based on a date range or on the year-to-date. Perhaps including in the affiliate's Sales Summary a total number of orders?
I believe that this type of feature was requested in the past as well. I'll open a change-request on the plugin's github repository (https://github.com/lat9/snap_affiliates/issues) so I keep aware of the request. Any other ideas/requests in this vein are welcome!
P.S. I'm sure that the feature could be added with a line of code ... but it's be a very looooooong line!
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
It would be fairly easy to keep track of pages "landed" with an affiliates' link (i.e. the count of the number of people that have clicked through) since it's just an integer value. Tracking the click-through link that initiated a product purchase would be a bit more complex and the amount of data recorded could get onerous.
Tracking the amount people click through would be fantastic so long as it could be tracked by "unique" visits, not sure if that could be done without recording a ton of data though.... not that recording tons of data bothers me as kind of like with the admin activity logs it could be saved, zipped, and deleted (and I also have a ridiculous amount of storage on my server not that everyone does but maybe if it could be done add it as a feature that could be turned off or on and off by default with a warning "use extreme caution when turning this feature on as it could result in recording and storing large amounts of data in your database which could adversely effect performance if your database is not set up properly".
Quote:
Originally Posted by
lat9
Affiliates can already see the number of purchases made, although that's either based on a date range or on the year-to-date. Perhaps including in the affiliate's Sales Summary a total number of orders?
That would be awesome!
Quote:
Originally Posted by
lat9
I believe that this type of feature was requested in the past as well. I'll open a change-request on the plugin's github repository (
https://github.com/lat9/snap_affiliates/issues) so I keep aware of the request. Any other ideas/requests in this vein are welcome!
That'd be perfect I too will follow the github :)
Quote:
Originally Posted by
lat9
P.S. I'm sure that the feature could be added with a line of code ... but it's be a very looooooong line!
Maybe multiple lines of code for easier reading and understanding then :)
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
Jshannonb
Tracking the amount people click through would be fantastic so long as it could be tracked by "unique" visits, not sure if that could be done without recording a ton of data though.... not that recording tons of data bothers me as kind of like with the admin activity logs it could be saved, zipped, and deleted (and I also have a ridiculous amount of storage on my server not that everyone does but maybe if it could be done add it as a feature that could be turned off or on and off by default with a warning "use extreme caution when turning this feature on as it could result in recording and storing large amounts of data in your database which could adversely effect performance if your database is not set up properly".
The count wouldn't necessarily be "unique" visits, but what I could capture easily is a count of customers navigating to a page on your site with an affiliate's "token" as a $_GET variable (as opposed to an access once the "token" has been recorded into the cookie). The customer, in this case, would have either directly clicked on an affiliate's link to your site (whether directly or via a bookmark).
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hello,
I still have a problem.
I get these two files simply do not mix.
Here the original orders.php which is in the module case. There, the lines 120-191 are simply "left out". But I have in my orders.php precisely in this area entries from other modules are (Cowa and package tracking, for example).
So here's the orders.php which is at the snap_affiliates module here:
PHP Code:
.
.
.
.
.
.
$comments = zen_db_prepare_input($_POST['comments']);
$status = (int)zen_db_prepare_input($_POST['status']);
if ($status < 1) break;
//-bof-c-snap_affiliates-v2.5.0
/* ----- Processing now handled by separate function -----
$order_updated = false;
$check_status = $db->Execute("select customers_name, customers_email_address, orders_status,
date_purchased from " . TABLE_ORDERS . "
where orders_id = '" . (int)$oID . "'");
if ( ($check_status->fields['orders_status'] != $status) || zen_not_null($comments)) {
$db->Execute("update " . TABLE_ORDERS . "
set orders_status = '" . zen_db_input($status) . "', last_modified = now()
where orders_id = '" . (int)$oID . "'");
$customer_notified = '0';
if (isset($_POST['notify']) && ($_POST['notify'] == '1')) {
$notify_comments = '';
if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on') && zen_not_null($comments)) {
$notify_comments = EMAIL_TEXT_COMMENTS_UPDATE . $comments . "\n\n";
}
//send emails
$message =
EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
$notify_comments .
EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
EMAIL_TEXT_STATUS_PLEASE_REPLY;
$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name'];
$html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
$html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') .'">'.str_replace(':','',EMAIL_TEXT_INVOICE_URL).'</a>';
$html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
$html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
$html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
$html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
$html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
$html_msg['EMAIL_PAYPAL_TRANSID'] = '';
zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
$customer_notified = '1';
// PayPal Trans ID, if any
$sql = "select txn_id, parent_txn_id from " . TABLE_PAYPAL . " where order_id = :orderID order by last_modified DESC, date_added DESC, parent_txn_id DESC, paypal_ipn_id DESC ";
$sql = $db->bindVars($sql, ':orderID', $oID, 'integer');
$result = $db->Execute($sql);
if ($result->RecordCount() > 0) {
$message .= "\n\n" . ' PayPal Trans ID: ' . $result->fields['txn_id'];
$html_msg['EMAIL_PAYPAL_TRANSID'] = $result->fields['txn_id'];
}
//send extra emails
if (SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_STATUS == '1' and SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO != '') {
zen_mail('', SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO, SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status_extra');
}
} elseif (isset($_POST['notify']) && ($_POST['notify'] == '-1')) {
// hide comment
$customer_notified = '-1';
}
$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
values ('" . (int)$oID . "',
'" . zen_db_input($status) . "',
now(),
'" . zen_db_input($customer_notified) . "',
'" . zen_db_input($comments) . "')");
$order_updated = true;
}
*/
$check_status = $db->Execute("SELECT orders_status, date_purchased FROM " . TABLE_ORDERS . " WHERE orders_id = '" . (int)$oID . "'");
$customer_notified = (isset($_POST['notify']) && ($_POST['notify'] == 1 || $_POST['notify'] == -1)) ? $_POST['notify'] : 0;
$osh_record_added = zen_update_orders_history($oID, $comments, null, $status, $customer_notified, (isset($_POST['notify_comments']) && $_POST['notify_comments'] == 'on'));
$order_updated = ($osh_record_added == -1) ? false : true;
//-eof-c-snap_affiliates-v2.5.0
// trigger any appropriate updates which should be sent back to the payment gateway:
$order = new order((int)$oID);
if ($order->info['payment_module_code']) {
if (file_exists(DIR_FS_CATALOG_MODULES . 'payment/' . $order->info['payment_module_code'] . '.php')) {
require_once(DIR_FS_CATALOG_MODULES . 'payment/' . $order->info['payment_module_code'] . '.php');
require_once(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_module_code'] . '.php');
$module = new $order->info['payment_module_code'];
if (method_exists($module, '_doStatusUpdate')) {
$response = $module->_doStatusUpdate($oID, $status, $comments, $customer_notified, $check_status->fields['orders_status']);
}
}
}
.
.
.
.
.
And here is my orders.php:
PHP Code:
.
.
.
..
$comments = zen_db_prepare_input($_POST['comments']);
$status = (int)zen_db_prepare_input($_POST['status']);
if ($status < 1) break;
$order_updated = false;
$check_status = $db->Execute("select customers_name, customers_email_address, orders_status,
date_purchased, COWOA_order from " . TABLE_ORDERS . "
where orders_id = '" . (int)$oID . "'");
// BOF rl_incoice3
$rlStat = explode('|', RL_INVOICE3_SEND_ORDERSTATUS_CHANGE);
$rl_invoice3_send = in_array($status, $rlStat);
if ( ($check_status->fields['orders_status'] != $status && $status==RL_INVOICE3_ORDERSTATUS) || ($rl_invoice3_send == true)){
require_once (DIR_FS_CATALOG . DIR_WS_INCLUDES . 'classes/class.rl_invoice3.php');
require_once ('../' . DIR_WS_LANGUAGES . $_SESSION['language'] . '/extra_definitions/rl_invoice3.php');
$paper = rl_invoice3::getDefault(RL_INVOICE3_PAPER, array('format' => 'A4', 'unit' => 'mm', 'orientation' => 'P'));
$pdfT = new rl_invoice3($oID, $paper['orientation'], $paper['unit'], $paper['format']);
$pdfT->createPdfFile(true);
$attach = $pdfT->getPDFAttachments('ALL');
} else {
$attach = null;
}
// EOF rl_incoice3
if ( ($check_status->fields['orders_status'] != $status) || zen_not_null($comments)) {
$db->Execute("update " . TABLE_ORDERS . "
set orders_status = '" . zen_db_input($status) . "', last_modified = now()
where orders_id = '" . (int)$oID . "'");
$customer_notified = '0';
if (isset($_POST['notify']) && ($_POST['notify'] == '1')) {
$notify_comments = '';
// Begin Paket Tracking 2.1
if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) {
if (zen_not_null($comments)) {
$notify_comments = EMAIL_TEXT_COMMENTS_UPDATE . $comments . "\n\n";
}
if (zen_not_null($track_id1)) { $notify_comments .= "\n" .PT_EMAIL_YOURID ." " . CARRIER_NAME_1 . " Tracking ID " .PT_EMAIL_YOURIDIS ." " . $track_id1 . " \n\n<br />" .PT_EMAIL_LINKINFO ." \n<br />" . CARRIER_LINK_1 . $track_id1 . "\n\n<br />" .PT_EMAIL_24HOURS ."" . "\n\n<br />"; }
if (zen_not_null($track_id2)) { $notify_comments .= "\n" .PT_EMAIL_YOURID ." " . CARRIER_NAME_2 . " Tracking ID " .PT_EMAIL_YOURIDIS ." " . $track_id2 . " \n\n<br />" .PT_EMAIL_LINKINFO ." \n<br />" . CARRIER_LINK_2 . $track_id2 . "\n\n<br />" .PT_EMAIL_24HOURS ."" . "\n\n<br />"; }
if (zen_not_null($track_id3)) { $notify_comments .= "\n" .PT_EMAIL_YOURID ." " . CARRIER_NAME_3 . " Tracking ID " .PT_EMAIL_YOURIDIS ." " . $track_id3 . " \n\n<br />" .PT_EMAIL_LINKINFO ." \n<br />" . CARRIER_LINK_3 . $track_id3 . "\n\n<br />" .PT_EMAIL_24HOURS ."" . "\n\n<br />"; }
if (zen_not_null($track_id4)) { $notify_comments .= "\n" .PT_EMAIL_YOURID ." " . CARRIER_NAME_4 . " Tracking ID " .PT_EMAIL_YOURIDIS ." " . $track_id4 . " \n\n<br />" .PT_EMAIL_LINKINFO ." \n<br />" . CARRIER_LINK_4 . $track_id4 . "\n\n<br />" .PT_EMAIL_24HOURS ."" . "\n\n<br />"; }
if (zen_not_null($track_id5)) { $notify_comments .= "\n" .PT_EMAIL_YOURID ." " . CARRIER_NAME_5 . " Tracking ID " .PT_EMAIL_YOURIDIS ." " . $track_id5 . " \n\n<br />" .PT_EMAIL_LINKINFO ." \n<br />" . CARRIER_LINK_5 . $track_id5 . "\n\n<br />" .PT_EMAIL_24HOURS ."" . "\n\n<br />"; }
// End Paket Tracking 2.1
}
//send emails
// BOF COWOA SEND ORDER_STATUS EMAIL
if (COWOA_ORDER_STATUS == 'true') {
if ($check_status->fields['COWOA_order'] == 1) {
$message =
EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
EMAIL_TEXT_COWOA_URL . ' ' . zen_catalog_href_link(FILENAME_ORDER_STATUS, 'order_id=' . $oID, 'SSL') . "\n\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
strip_tags($notify_comments) .
EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
EMAIL_TEXT_STATUS_PLEASE_REPLY;
$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name'];
$html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
$html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_ORDER_STATUS, 'order_id=' . $oID, 'SSL') .'">'.str_replace(':','',EMAIL_TEXT_COWOA_URL).'</a>';
$html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
$html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
$html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
$html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
$html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
$customer_notified = '1';
}
}
if (COWOA_ORDER_STATUS == 'false') {
if ($check_status->fields['COWOA_order'] == 1) {
$htmlInvoiceURL='';
$htmlInvoiceValue='';
$message =
EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
strip_tags($notify_comments) .
EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
EMAIL_TEXT_STATUS_PLEASE_REPLY;
$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name'];
$html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
$html_msg['INTRO_URL_TEXT'] = '';
$html_msg['INTRO_URL_VALUE'] = '';
$html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
$html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
$html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
$html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
$html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
$customer_notified = '1';
}
}
// EOF COWOA SEND ORDER_STATUS EMAIL
if ($check_status->fields['COWOA_order'] != 1) {
$message =
EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
strip_tags($notify_comments) .
EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
EMAIL_TEXT_STATUS_PLEASE_REPLY;
$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name'];
$html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
$html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') .'">'.str_replace(':','',EMAIL_TEXT_INVOICE_URL).'</a>';
$html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
$html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
$html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
$html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
$html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
$html_msg['EMAIL_PAYPAL_TRANSID'] = '';
zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
$customer_notified = '1';
// PayPal Trans ID, if any
$sql = "select txn_id, parent_txn_id from " . TABLE_PAYPAL . " where order_id = :orderID order by last_modified DESC, date_added DESC, parent_txn_id DESC, paypal_ipn_id DESC ";
$sql = $db->bindVars($sql, ':orderID', $oID, 'integer');
$result = $db->Execute($sql);
if ($result->RecordCount() > 0) {
$message .= "\n\n" . ' PayPal Trans ID: ' . $result->fields['txn_id'];
$html_msg['EMAIL_PAYPAL_TRANSID'] = $result->fields['txn_id'];
}
//send extra emails
if (SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_STATUS == '1' and SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO != '') {
zen_mail('', SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO, SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status_extra');
}
} elseif (isset($_POST['notify']) && ($_POST['notify'] == '-1')) {
// hide comment
$customer_notified = '-1';
}
// Begin Paket Tracking 2.1
$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, track_id1, track_id2, track_id3, track_id4, track_id5, comments)
values ('" . (int)$oID . "',
'" . zen_db_input($status) . "',
now(),
'" . zen_db_input($customer_notified) . "',
'" . zen_db_input($track_id1) . "',
'" . zen_db_input($track_id2) . "',
'" . zen_db_input($track_id3) . "',
'" . zen_db_input($track_id4) . "',
'" . zen_db_input($track_id5) . "',
'" . zen_db_input($comments) . "')");
$order_updated = true;
}
// End Paket Tracking 2.1
// trigger any appropriate updates which should be sent back to the payment gateway:
$order = new order((int)$oID);
if ($order->info['payment_module_code']) {
if (file_exists(DIR_FS_CATALOG_MODULES . 'payment/' . $order->info['payment_module_code'] . '.php')) {
require_once(DIR_FS_CATALOG_MODULES . 'payment/' . $order->info['payment_module_code'] . '.php');
require_once(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_module_code'] . '.php');
$module = new $order->info['payment_module_code'];
if (method_exists($module, '_doStatusUpdate')) {
$response = $module->_doStatusUpdate($oID, $status, $comments, $customer_notified, $check_status->fields['orders_status']);
}
}
}
.
..
I would be grateful for any help.
greetings
Manfred
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hi,
I have just come across exactly the same issue as Manfred with admin/orders.php: I'm in the process of updating a site that used an older version of ZC, with Snap Affiliates and COWOA working happily together.
It seems that this newer version of Snap Affiliates needs to comment out code that COWOA uses / has changes merged into.
Is there a fix for this or a way around it? Both Addons have worked very well on the site up to now, and I'd love to be able to continue using them.
Thanks.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
@Manfred and @snorkletwin, I've reviewed the SNAP changes and now can't remember why I incorporated the orders-status-history function update for this plugin (adds the updated_by field to the orders_status_history table and displays which admin issued a status change). There is nothing on the admin-side of the plugin that needs the status-change notification that the OSH functionality brings with it.
The "easiest" path to integration of SNAP and your modified orders.php file is to disregard the change block in the SNAP version of the file (lines 120-197).
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
An even "easier" path than I thought it would be! :smile:
Thanks very much, lat9 - much appreciated.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
No problem ... now if I could only remember ...
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Having a problem with this module. Added it everything seems to work fine but the only pay out option is Check/Money-Order I want it to be Paypal and Store Credit. How can I correct this?
Thanks
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
The plugin currently supports only Check/Money Order and PayPal payments. Did you set Enable PayPal® Commission Payment Method? to true (it defaults to false) within the plugin's configuration screen?
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
I've just submitted v3.0.3 of this plugin for review.
The class-based constructor function's name was changed to __construct to be compatible with PHP 7.0 requirements.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
I've just submitted v3.0.3 of this plugin for review.
The class-based constructor function's name was changed to __construct to be compatible with PHP 7.0 requirements.
v3.0.3 is now available for download.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Ive just installed the snap v3.0 plugin. Everything works except when you click on the link in my account that says;
Orders and Payments
It gives the following error along with a blank page
"WARNING: An Error occurred, please refresh the page and try again."
I've checked to make sure I uploaded all files.
the url shows in the browser window
http://www.mywebsite.com/myfolder/in...=referrer_main
NOTE: mywebsite.com/myfolder are example info it's not to my actual site. Just thought the index.php?... info would be beneficial to show what page it is looking for.
There are a couple of files I had to cut-n-paste the snap info into because it would affect another plugin. This occurred in the order.php file(s). Not sure that would affect anything.
I searched for a DEBUG log in the logs directly but there was nothing there. So I am stumped where to look for the issue.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
I fixed the problem. I ran the uninstall for version 1.2 and 2.0 which deleted stuff in the database. Now I can get to the orders and payments page.
Not sure how it fixed it but it is working.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
@printchic, I'm sorry you're having issues with your SNAP installation. What version of Zen Cart are you currently using? What template? What "other plugin"?
Unless your site has other configuration issues, it's pretty difficult to get the "Warning, an error occurred" message without a myDEBUG*.log file being generated .. did you check in your /logs folder?
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hey guys - I am updated my files to the latest version (from 3.0.0 to 3.0.3). I copied everything over, but when I go to Configuration->Affiliate Program ->Module Version ->Update, nothing happens. It still says that my module is version 3.0.0.
Is there something I'm missing here?
I am not entirely confident that my module is even working, since we don't see any recorded commissions in our database for many months. Now, that could have something to do with inactive affiliates, but I need to rule out the module being the cause. This is what caused me to upgrade versions so that we have the latest and greatest available.
But I have no idea if our server is "seeing" the latest version if the configuration setting still show 3.0.0. And I don't want to run the uninstall SQL file because I don't want to lose past commission logs, etc.
Help!
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
That's my-bad. The install script with the SNAP version hasn't been updated since 3.0.0.
I'll make sure that the SNAP version is updated when I get around to the Zen Cart v1.5.5 changes required.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
WOW - Must be something wrong! Down loaded snap_affiliates-3.0.3, extracted, and installed. Are there changes I need to make??????? No Affiliate information as far as terms and conditions and signup form...... Must have missed something! Tried more then once and the same outcome....:blink::blush::shocking::wacko:
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
BuddyS
WOW - Must be something wrong! Down loaded snap_affiliates-3.0.3, extracted, and installed. Are there changes I need to make??????? No Affiliate information as far as terms and conditions and signup form...... Must have missed something! Tried more then once and the same outcome....:blink::blush::shocking::wacko:
Do you mean the pages weren't 'created' or the pages are there but no textual content?
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
@BuddyS, what is your base Zen Cart version for the install? Did you follow the installation instructions? Have you changed any of the SNAP-related configuration settings (as indicate in the readme)?
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
@BuddyS, what is your base Zen Cart version for the install? Did you follow the installation instructions? Have you changed any of the SNAP-related configuration settings (as indicate in the readme)?
Or what she said :wink:
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
1.5.4 and no changes - didnt see any reqyured
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
yes followed instructions
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
So, you installed SNAP using the default (not suggested, per the readme) configuration values and you don't see the referrer_signup link when you log into a test-customer account on your site?
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
I've just submitted v3.0.4 of SNAP Affiliates to the Plugins for review. While this version does not directly support Zen Cart 1.5.5, I've reduced the number of core-/template-override files modified and ensured that all changes are properly marked (and numbered) so that it's possible to merge those files with their Zen Cart 1.5.5 counterparts more easily.
The following changes are included:
- CHANGE: Documentation/uninstall restructuring; check the /docs/snap_affiliates folder for these files.
- CHANGE: Remove full incorporation of the "OSH - Updated By" plugin from the admin's Customers->Orders handling, in preparation for a Zen Cart 1.5.5 plugin update.
- CHANGE: Properly mark all template-override file changes to identify the SNAP updates.
- CHANGE: Move all SNAP-specific template files into the template_default folder; allows easier reuse on multiple templates.
- BUGFIX: Correct misspelling on referrer_main page.
Given the changes introduced in Zen Cart 1.5.5, the next release of SNAP Affiliates will be specific to that Zen Cart release -- otherwise, the SNAP installation will get quite muddied.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
v3.0.4 is now available for download.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hi,
great work, module sounds very nice to me
However, is this version possible for use with Zen Cart 1.5.5a?
Cheers
D.C.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
dachilla
Hi,
great work, module sounds very nice to me
However, is this version possible for use with Zen Cart 1.5.5a?
Cheers
D.C.
It's quite possible, you'll just need to merge the plugin's marked core- and template-file changes into your store's Zen Cart 1.5.5a file-set.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
It's quite possible, you'll just need to merge the plugin's marked core- and template-file changes into your store's Zen Cart 1.5.5a file-set.
Not sure what that means but it sounds too complicated to me :)
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
It's quite possible, you'll just need to merge the plugin's marked core- and template-file changes into your store's Zen Cart 1.5.5a file-set.
DUDE, awesome! Your addon is GOLD! I got it working in 1.5.5a like a charm. I have attached modified the merged orders.php for you, in case you are thinking about making an official version for 1.5.5a of this module.
Cheers
D.C.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
dachilla
DUDE, awesome! Your addon is GOLD! I got it working in 1.5.5a like a charm. I have attached modified the merged orders.php for you, in case you are thinking about making an official version for 1.5.5a of this module.
Cheers
D.C.
Thanks, D.C, for the report that you got Snap Affiliates working on 1.5.5a!
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
I am running 1.5.5a
How can I change where it says Referrer Program to Affiliate Program? There are a few places.....like when you go to "my account" it says Referrer_Main_Title - REFERRER_ORDER_PAYMENT etc. can I change that to Affiliate instead of Referrer?
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
Hollywood691
I am running 1.5.5a
How can I change where it says Referrer Program to Affiliate Program? There are a few places.....like when you go to "my account" it says Referrer_Main_Title - REFERRER_ORDER_PAYMENT etc. can I change that to Affiliate instead of Referrer?
sorry, I can't edit or remove my question......I got it though. I do have something I can't figure out.
Under the payment type drop down there is only Check/money order there......how can I change that to just paypal? it doesnt even show that as an option.
Thanks for a great plugin
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
Hollywood691
sorry, I can't edit or remove my question......I got it though. I do have something I can't figure out.
Under the payment type drop down there is only Check/money order there......how can I change that to just paypal? it doesnt even show that as an option.
Thanks for a great plugin
To add PayPal as a payment method, you'll need to change Configuration->Affiliate Program->Enable PayPal Commission Payment Method to Yes (the default's No). There's currently no built-in way to disable the check/moneyorder payment method.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
To add PayPal as a payment method, you'll need to change Configuration->Affiliate Program->Enable PayPal Commission Payment Method to Yes (the default's No). There's currently no built-in way to disable the check/moneyorder payment method.
Ahhh,.....thanks for pointing that out! I should have found that.
THANK You -
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
I installed this with no problems, and the Configuration section is set up the way I want it. But I replied 'True' to having a link appear in the Information sidebox, and no link appeared. This could possibly be because I've added the extra pages add-on (and then added another one manually)? I can add the affiliate link manually too, if that's necessary, but would appreciate help with the files I'll need to change.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
You just missed a merge for /includes/modules/sideboxes/YOUR_TEMPLATE/information.php. Add the following code fragment in the position that you want the affiliates' link:
Code:
//-bof-snap_affiliates-lat9 *** 1 of 1 ***
if (SNAP_INFORMATION_SIDEBOX === 'true') {
$information[] = '<a href="' . zen_href_link(FILENAME_REFERRER_SIGNUP, '', 'SSL'). '">' . BOX_INFORMATION_REFERRER_TERMS . '</a>';
}
//-eof-snap_affiliates-lat9 *** 1 of 1 ***
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Thanks, that did it. I'm still trying to figure out exactly what to put in 'define_referral_terms' and 'define_referral_tools' but I'll get there.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Ok, one other minor thing. Everything appears to be working fine, except that I would really like the link text to show up along with (above) the image. I can do it manually, but I don't see where it's being generated.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
The banner images (and associated text) are generated by the get_referral_image function, at the top of /includes/templates/template_default/tpl_referrer_main_default.php. Remember to make your edits in a template-override version; it'll save you some time if/when the file changes in the future.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Thanks, that's exactly what I needed.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Well--here's an odd one. I don't see any changes to packinslip.php or invoice.php, either in the installation instructions, or in the dates on the files. But all of a sudden, every packing slip and invoice is getting the lines
0
Looking
in the top left hand corner. An echo statement from somewhere, obviously, but not in packingslip.php or invoice.php. It started as soon as I moved the snap affiliates over to the live installation. So I have to print them to an image file, edit the image, and then send them to the printer. Do you know where this could be coming from?
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Grr, never mind, it's coming from stupid Ghostery. I haven't touched it in weeks, so I don't know how the settings got changed, but I went to print something else and recognized the text as notifications from Ghostery.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hello - I am trying to envisage how this plugin works in a practical sense. Does this plugin allow an affiliate to download and place on their website an exact duplication of my products, given that they have the same version of Zen Cart, and allow them to sell them on their site, for a commission ....... or is it simply links back to my site from say just a a banner or a product list the affiliate has had to 'build' on their site from scratch, with tracking from that affiliate site for commission tracking purposes?
I am hoping it is the former.
cheers, Mike
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
shags38
Hello - I am trying to envisage how this plugin works in a practical sense. Does this plugin allow an affiliate to download and place on their website an exact duplication of my products, given that they have the same version of Zen Cart, and allow them to sell them on their site, for a commission ....... or is it simply links back to my site from say just a a banner or a product list the affiliate has had to 'build' on their site from scratch, with tracking from that affiliate site for commission tracking purposes?
I am hoping it is the former.
cheers, Mike
It is the latter. :(
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
It is the latter. :(
many thanks for the quick response :smile:
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hi, not sure if this is a Snap Affiliates problem but it did show up after I installed the plug in v 3.0.4 on Zen Cart v 1.5.5d php v 5.6.30.
Template WestMinster New. The Snap Affiliates works just fine but my slider on the home page stopped working.
If you don't think it was due to the install just let me know. If not sure or if anyone has an idea where to look for trouble shooting please point me in that direction. Check error logs but no luck ??? And did a search of this thread no results either.
Thanks,
Henry
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
K_C_Enterprises
Hi, not sure if this is a Snap Affiliates problem but it did show up after I installed the plug in v 3.0.4 on Zen Cart v 1.5.5d php v 5.6.30.
Template WestMinster New. The Snap Affiliates works just fine but my slider on the home page stopped working.
If you don't think it was due to the install just let me know. If not sure or if anyone has an idea where to look for trouble shooting please point me in that direction. Check error logs but no luck ??? And did a search of this thread no results either.
Thanks,
Henry
SNAP's install provides no additional jQuery, neither does its installation "touch" the home-page processing. If you post (or PM me) a link to the store in question, perhaps I could point you in the right direction.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
iv searched this forum for a place to post this.. either im stupid or blind so iv ended up here.
Iv installed Snap Affiliate but can see where a member can select to sign up to the affiliate program
This site is an 18+ site so if checking out the link to view this issue please turn children away
www.CherishedDesires.co.uk
i want to be able to have a member sign up.. Sell a product and get 10% commission per order they put through..
Thats all i want haha
your help is very much appreciated.
zencart ver 155e
affiliate ver 3.0.4
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
You haven't merged the template-override changes required by Snap into your template's files:
/includes/languages/english/YOUR_TEMPLATE/account.php
/includes/modules/sideboxes/YOUR_TEMPLATE/information.php
/includes/templates/YOUR_TEMPLATE/templates/tpl_account_default.php
When I change the URL to go to the main_page=referrer_main, it's there, so it's just those merges that need to be done.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
yayy.. just re-uploaded.. your a star
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
so please correct me if im wrong..
Do members just sign up on the program.. place the order and i work out there commission each moth and pay it manually
I can see it says enter homepage you would like to promote.. do i just type my main url in there and will all orders made through that account show on orders
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
SpeedBird3654
so please correct me if im wrong..
Do members just sign up on the program.. place the order and i work out there commission each moth and pay it manually
The plugin has a relatively extensive readme on the process; all payments are made manually via admin-level tools.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
fantastic.. il have a play around.. thank you for your help and time
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
No problems; just report back here if you have additional questions or issues!
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Is the merge order.php file already merge to the plugin download? I have zen cart 1.5.5.e and want to know if there is anything I need to do to make it work.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
dachilla
DUDE, awesome! Your addon is GOLD! I got it working in 1.5.5a like a charm. I have attached modified the merged orders.php for you, in case you are thinking about making an official version for 1.5.5a of this module.
Cheers
D.C.
Oops... I forgot to include the question...
Is the merge order.php file already part of the Snap Affiliate plug in? I have Zen 1.5.5e and I am still trying to understanding/make it work.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
HappyMom
Oops... I forgot to include the question...
Is the merge order.php file already part of the Snap Affiliate plug in? I have Zen 1.5.5e and I am still trying to understanding/make it work.
I've got a merge for the Zen Cart 1.5.5 series waiting for release on the plugin's GitHub repository. Let me review and get some versions updates and I'll get that posted to the Zen Cart plugins for download.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
I've just submitted v4.0.0 of SNAP Affiliates to the Zen Cart plugins for review; once approved, it can be downloaded here.
This version drops support for Zen Cart versions prior to 1.5.5a and corrects an issue where the affiliate commission payment was disallowed on orders totaling < $1.00.
If you are still running a version of Zen Cart prior to 1.5.5a, please use v3.0.4 of the plugin.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
I've just submitted v4.0.0 of SNAP Affiliates to the Zen Cart plugins for review; once approved, it can be downloaded
here.
This version
drops support for Zen Cart versions prior to 1.5.5a and corrects an issue where the affiliate commission payment was disallowed on orders totaling < $1.00.
If you are still running a version of Zen Cart prior to 1.5.5a, please use v3.0.4 of the plugin.
v4.0.0 is now available for download.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hi
If a customer places an order without using the affiliate link, is there a way for me to "assign" that order to one of the affiliates? I am comfortable with SQL if it's a database thing.
Thanks!
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
Tapper
Hi
If a customer places an order without using the affiliate link, is there a way for me to "assign" that order to one of the affiliates? I am comfortable with SQL if it's a database thing.
Thanks!
It is a database thing:
First, you'll need to gather (as present in the referrers table):
- xxx: The affiliate's "referrer_key" (a string value)
- yyy: The affiliate's commission (a floating point value, so a 5% commission shows as 0.05)
Then, you'll need to know the orders_id (zzz) for the order that you want to "assign" to the affiliate.
Use your admin's Tools->Install SQL Patches (after you've made a database backup):
Code:
INSERT INTO commission (commission_orders_id, commission_referrer_key, commission_rate, commission_paid) VALUES (zzz, 'xxx', yyy, 0);
Don't forget the single-quotes around the referrer_key's value! You can use the same query in phpMyAdmin, but you'll need to remember to add your store's DB_PREFIX, if not blank, to the commission table's name.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hello.
I've installed the latest version 4.0 on a 1.5.5e zencart and for the life of me cannot make the customer end work as it should. The tpl_referrer_main.php won't populate the Commission-Payment Activity portion of the page, no matter what I try. I checked the header, swapped the header and referrer_main pages with older versions of the pluggin and I cannot make it work.
Any ideas where the issue could be coming from or what could possibly be happening?
Thank you for the help.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
mvstudio
Hello.
I've installed the latest version 4.0 on a 1.5.5e zencart and for the life of me cannot make the customer end work as it should. The tpl_referrer_main.php won't populate the Commission-Payment Activity portion of the page, no matter what I try. I checked the header, swapped the header and referrer_main pages with older versions of the pluggin and I cannot make it work.
Any ideas where the issue could be coming from or what could possibly be happening?
Thank you for the help.
Does the customer have any paid commissions? A screenshot of what you're describing would help a bunch.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hi Lat, Happy New Year and thank you for getting back to me. It was not the mod, it was a change made by one of my team members I was not aware of that screwed everything up. I reinstalled and everything works as it should. Sorry for the false alarm.
A couple of questions, is it possible to display all orders instead of only the paid ones in the customer's end? Also we pay commissions based on net orders, meaning after all the fees are deducted such as shipping, etc. One of the fees we have to manually discount is the CC and PayPal fees. Would it be possible to deduct this fee automatically so the calculated commission is the actual net of the order?
Where would I look to make these changes?
Thank you.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
One more thing. Is it possible to display on the customer's end the orders that did not qualify for commissions and a field with an explanation for the why?
Say for example we received a $20 order, the commission would be $2, but we had to refund the customer so in reality we cannot pay the commission. If I mark that commission as paid $0 it would display as unpaid on my end, but it won't display on the customer's end at all. Can it be displayed as commission $0?
Now say for example we received a $20 order, the commission would be $2, but we were never able to get paid for the order, so the order actually never generated any commission for the affiliate, yet in the summary it is displayed as current sales and unpaid commissions.
This is presenting lots of issues for us. We have a lot of clients generating paid and unpaid commissions. In the sales summary they see this huge number of sales, and it turns out many of those sales aren't valid so we have to manually provide them with a record of what got paid and what didn't get paid and for what reason, as on their end this information isn't provided.
I would like our affiliates to be able to see which orders they received commissions for and which they didn't and if possible why, perhaps include an option pull down menu with the most common reasons or a text box where we can give a brief explanation for the why that particular order wasn't paid a commission. That way the amounts on the sales summary and the totals actual commissions paid sort of match. Last year we had an affiliate telling us she was going to sue us because she feels we're scamming her on commissions paid. She has this huge number in current sales and this huge number on unpaid commissions and very little on paid commissions, and the reason that is happening is because most of the orders received with her affiliate link are orders we cannot get payment for, so in reality they never generated a valid commission for her, but the system still records them. I would like to provide our affiliates with a more transparent report they can see and analyze on their end.
Thank you!
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
mvstudio
Hi Lat, Happy New Year and thank you for getting back to me. It was not the mod, it was a change made by one of my team members I was not aware of that screwed everything up. I reinstalled and everything works as it should. Sorry for the false alarm.
A couple of questions, is it possible to display all orders instead of only the paid ones in the customer's end? Also we pay commissions based on net orders, meaning after all the fees are deducted such as shipping, etc. One of the fees we have to manually discount is the CC and PayPal fees. Would it be possible to deduct this fee automatically so the calculated commission is the actual net of the order?
Where would I look to make these changes?
Thank you.
The selection of commissioned orders is determined by /includes/modules/pages/referrer_main/header_php.php; it currently displays (as you noted) only those commissions that have been paid. The actual commission payment is determined via /YOUR_ADMIN/referrers.php's processing.
Quote:
Originally Posted by
mvstudio
One more thing. Is it possible to display on the customer's end the orders that did not qualify for commissions and a field with an explanation for the why?
Say for example we received a $20 order, the commission would be $2, but we had to refund the customer so in reality we cannot pay the commission. If I mark that commission as paid $0 it would display as unpaid on my end, but it won't display on the customer's end at all. Can it be displayed as commission $0?
Now say for example we received a $20 order, the commission would be $2, but we were never able to get paid for the order, so the order actually never generated any commission for the affiliate, yet in the summary it is displayed as current sales and unpaid commissions.
This is presenting lots of issues for us. We have a lot of clients generating paid and unpaid commissions. In the sales summary they see this huge number of sales, and it turns out many of those sales aren't valid so we have to manually provide them with a record of what got paid and what didn't get paid and for what reason, as on their end this information isn't provided.
I would like our affiliates to be able to see which orders they received commissions for and which they didn't and if possible why, perhaps include an option pull down menu with the most common reasons or a text box where we can give a brief explanation for the why that particular order wasn't paid a commission. That way the amounts on the sales summary and the totals actual commissions paid sort of match. Last year we had an affiliate telling us she was going to sue us because she feels we're scamming her on commissions paid. She has this huge number in current sales and this huge number on unpaid commissions and very little on paid commissions, and the reason that is happening is because most of the orders received with her affiliate link are orders we cannot get payment for, so in reality they never generated a valid commission for her, but the system still records them. I would like to provide our affiliates with a more transparent report they can see and analyze on their end.
Thank you!
This processing, too, will require change (at a minimum) to the referrer_main page's header_php.php, possibly its template (tpl_referrer_main_default.php) and the admin-level page. You might also need to add some type of flag to the 'commissions' table to identify a commission's status.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
This processing, too, will require change (at a minimum) to the referrer_main page's header_php.php, possibly its template (tpl_referrer_main_default.php) and the admin-level page. You might also need to add some type of flag to the 'commissions' table to identify a commission's status.
Thank you.
I've been playing with the mod a bit, and figured out a way to display the unpaid commissions by adding a 0.0000001 as the commission paid therefore releasing these amounts in the summary from current sales and unpaid commissions. I'm sure this isn't ideal and will eventually backfire on me at some point but at least for now it does what I need.
I made some (I'm sure horrendous) changes to the header_php.php and the admin level page to calculate and discount the payment fees. Paypal and Square which are the only two payment modules we use, have the same charges so that was sort of easy. But as horrendous as they might be, they work.
On includes/modules/pages/referrer_main/header_php.php at around line 124 in added
PHP Code:
//bof discount payment fee 1 of 2
$fee = ((($orders->fields['order_total']) - $current_exclusion) * 2.9)/100 + .3;
$finalAmount = round($fee , 2);
//eof discount payment fee 1 of 2
and changed this
PHP Code:
$current_amount = floatval($orders->fields['order_total']) - $current_exclusion;
for this
PHP Code:
//bof discount payment fee 2 of 2
//$current_amount = floatval($orders->fields['order_total']) - $current_exclusion;
$current_amount = floatval($orders->fields['order_total']) - $current_exclusion - $finalAmount;
//eof discount payment fee 2 of 2
I don't know if it's the correct way, but it works. It displays the correct final amount for the order with the payment fees deducted providing the right amount for the commission we need to pay.
On admin/referrers.php I added at around line 910 a similar piece of code
PHP Code:
//bof discount payment fee 1 of 2
$fee = (($order['order_total'] - $order['value']) * 2.9)/100 + .3;
$finalAmount = round($fee , 2);
//eof discount payment fee 1 of 2
and replaced this line
PHP Code:
$commissionable_total = $order['order_total'] - $order['value'];
with this
PHP Code:
//bof discount payment fee 2 of 2
//$commissionable_total = $order['order_total'] - $order['value'];
$commissionable_total = $order['order_total'] - $order['value'] - $finalAmount;
//eof discount payment fee 2 of 2
This one works in terms of calculating the correct amount for the order and the commission that needs to be paid. However I haven't been able to figure out how to display the same one this line
PHP Code:
<td class="center history<?php echo $toggle; ?>"><?php echo $currencies->format( ($current_orders_status === $orders_status) ? $total : 0 ); /*v2.5.0c*/ ?></td>
I'm not a programmer so if you could give me some pointers I would appreciate it. =)
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Looks like you've got those fees excluded. Just so I don't have to hunt it up, where are you trying to display that information?
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hi All,
I have installed the Snap Affiliates Mod on my zen cart new site 1.5.5e with PHP7 and it seems to have installed fine.
I don't know how to code at all just yet but trying to learn and can't find an answer to my question in the thread so it probably seems basic to most.
My problem is that my site does not use side boxes at all as I'm going for the clean look and I want to add PHP code to an ezi-page to create the "Referrer Signup" link.
I don't understand the instructions:
Quote:
you'll need to change the $information[] variable to match your menu's structure:
if (SNAP_INFORMATION_SIDEBOX === 'true') {
$information[] = '<a href="' . zen_href_link(FILENAME_REFERRER_SIGNUP, '', 'SSL'). '">' . BOX_INFORMATION_REFERRER_TERMS . '</a>';
}
I've tried pasting the code in an easy page with php tags before and after and "include in information sidebox?" set to true.
Iv'e tried this in the text area of the ez-page:
PHP Code:
<?php
if (SNAP_INFORMATION_SIDEBOX === 'true') {
$information[] = '<a href="'/includes/modules/sideboxes/responsive_classic/information.php . zen_href_link(FILENAME_REFERRER_SIGNUP, '', 'SSL'). '">' . BOX_INFORMATION_REFERRER_TERMS . '</a>';
}
?>
Can someone please give me some further guidance to create this link.
Cheers
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Cheers back at you ... and welcome to the Zen Cart community!
EZ-pages are great, but they don't support imbedded PHP directives. You can create a link to the referrer_signup page by defining a new EZ-Page (modeled after the My Account EZ-Page) that contains an Internal Link URL of index.php?main_page=referrer_signup.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Thanks Lat9,
That was easier than I thought it would be.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
mvstudio
I've been playing with the mod a bit, and figured out a way to display the unpaid commissions by adding a 0.0000001 as the commission paid therefore releasing these amounts in the summary from current sales and unpaid commissions. I'm sure this isn't ideal and will eventually backfire on me at some point but at least for now it does what I need.
I'm not a programmer either, but I played around a little with this mod, thinking about adding something similar. I think it's a very ingenious solution, and am thinking of stealing it from you. :smile: However, perhaps there is something you might want to consider: when you click on 'paid' in the admin section, an email will be send to the referrer that a commission has been paid. It may be a bit confusing if the amount paid is $0. So perhaps you would want to change something there as well.
Quote:
Originally Posted by
mvstudio
This one works in terms of calculating the correct amount for the order and the commission that needs to be paid. However I haven't been able to figure out how to display the same one this line
As already mentioned, I'm no expert either. But this is what I would do. Leave the $commissionable_total as it is, and add your $finalAmount to the $current_exclusion. Or to be more specific. Add
PHP Code:
$current_exclusion += $finalAmount;
to admin/referrers.php around line 186, after
$totalResults->MoveNext();
}
I think that should do what you want do accomplish.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Hi Lat9 - As a feature request, do you think you'd ever consider making an option to "Email All Affiliates"? The reason being is that sometimes, a store owner may have a new product launch that he wants his team of affiliates to get behind. So being able to quickly email all affiliates to tell them about the new product may help drive sales.
As it stands right now, if we want to do this, we literally have to go to the database, run a query to grab all the emails, and send an email through our own email client.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
Jeff_Mash
Hi Lat9 - As a feature request, do you think you'd ever consider making an option to "Email All Affiliates"? The reason being is that sometimes, a store owner may have a new product launch that he wants his team of affiliates to get behind. So being able to quickly email all affiliates to tell them about the new product may help drive sales.
As it stands right now, if we want to do this, we literally have to go to the database, run a query to grab all the emails, and send an email through our own email client.
Jeff, I've noted the request (https://github.com/lat9/snap_affiliates/issues/25) in the SNAP Affiliates GitHub repository. That way, when I next do an update, I'll remember!
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Thank you for this excellent mod. I do have one question that would put the icing on the cake for this. When setting 'Order Status Exclusions', I am finding that all orders are still recorded, be they processing, pending, delivered, etc. Do you have any idea why this may be and how I may be able to remedy it?
Everything else is working fine. I do wish there was a way to tie a referred customer to the account that referred them. It seems that if a customer changes browsers or computers, and makes a new purchase, the referrer will not get credit. Perhaps something that could make a nice addition in a future edition.
Thank you for any and all help.
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Solution: Looks like I was able to figure this out, changing the order status to numbers (1,2,4) worked, while (processing,pending,update) did not. Thanks!
-
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
exsy
Thank you for this excellent mod. I do have one question that would put the icing on the cake for this. When setting 'Order Status Exclusions', I am finding that all orders are still recorded, be they processing, pending, delivered, etc. Do you have any idea why this may be and how I may be able to remedy it?
Everything else is working fine. I do wish there was a way to tie a referred customer to the account that referred them. It seems that if a customer changes browsers or computers, and makes a new purchase, the referrer will not get credit. Perhaps something that could make a nice addition in a future edition.
Thank you for any and all help.
The issue there (remembering cross-browser) is because SNAP is using a cookie to remember the customer, instead of a database setting. I'll note the request as a future enhancement, but will note that keeping that status in the database will require that the customer create an account (non-guest checkout).
Quote:
Originally Posted by
exsy
Solution: Looks like I was able to figure this out, changing the order status to numbers (1,2,4) worked, while (processing,pending,update) did not. Thanks!
Figure it out, you did! I'll also note an update-request to change the verbiage that describes this configuration setting to be specific that the setting is a list of orders-status id values.
-
DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Goodmorning all,
Is there a demo available of this mod?
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
LadyoftheCave
Goodmorning all,
Is there a demo available of this mod?
Not that I am aware of.
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
ahh that is a pity, but thank you for your fast reply :)
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Hello Lat9.
Does snap affiliates works with ZC 1.5.6a (php 7.1 and maria DB)??
I tried installing it on a brand new configuration and both the admin and the front end went blank :(
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
I (obviously) haven't had the chance to integrate SNAP Affiliates with versions of Zen Cart 1.5.6 or later! Could you post the contents of the storefront/admin logs that you're receiving (after obfuscating the admin-directory name in the myDEBUG-adm log)?
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Dear lat9
Thanks for your all greate plugins provided.
I just tried your Snap Affiliates v4.0 on ZC 1.5.6a, but got an error msg as below
--> PHP Fatal error: 1292:Incorrect datetime value: '0' for column 'commission_paid' at row 1 :: INSERT INTO commission (commission_orders_id, commission_referrer_key, commission_rate, commission_paid) VALUES ('12702', 'CNWR_24642152', '0.025', '0') ==> (as called by)
I checked the backend db, commission_paid is a datatime filed, which casued this error.
Is this a bug?
Thanks
Davis
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
y051313
Dear lat9
Thanks for your all greate plugins provided.
I just tried your Snap Affiliates v4.0 on ZC 1.5.6a, but got an error msg as below
--> PHP Fatal error: 1292:Incorrect datetime value: '0' for column 'commission_paid' at row 1 :: INSERT INTO commission (commission_orders_id, commission_referrer_key, commission_rate, commission_paid) VALUES ('12702', 'CNWR_24642152', '0.025', '0') ==> (as called by)
I checked the backend db, commission_paid is a datatime filed, which casued this error.
Is this a bug?
Thanks
Davis
Yes it is! I'm almost finished with a totally revamped version of SNAP Affiliates, but will most likely start with a v4.0.1 that corrects that zero-date processing.
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Here's the associated GitHub issue for tracking: https://github.com/lat9/snap_affiliates/issues/29
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
I've submitted v4.0.1 of SNAP Affiliates to the Zen Cart plugin moderator for review; I'll post back here when it's available for download (https://www.zen-cart.com/downloads.php?do=file&id=1635).
This update contains the changes required for more recent/strict MySql versions, as the unpaid commissions' values' will cause MySql-generated errors.
PLEASE NOTE: This version has not been validated for Zen Cart 1.5.6 and later; there will be an updated version coming real-soon-now to provide an overall integration with those versions of Zen Cart.
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Well, v4.0.1 is now available for download ... and I've submitted v4.1.0 to the plugin moderators for review.
This release contains changes associated with the following GitHub issues:
#25: Enable notifications and newsletters to be sent to active affiliates.
#27: Clarification on the values required for the "Order Status Exclusions" setting.
#28: Zen Cart 1.5.6+ compatibility and MAJOR refactoring for more recent versions of PHP and MySQL.
#30: Remove referrers-table record when a customer is deleted.
NOTE: This release contains MAJOR changes to the plugin's organization and its template_default templates have changed. If you are upgrading from a previous version, be sure to merge any of your store's template changes!
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Thank you lat9!
Sorry for my late reply. After posting I realized my website was down due to the upgrade, customers complaints started pouring in and I've been putting down fires right and left ever since. The website works (sort of!) but any customer shopping with an affiliate code can't checkout, so there is lots of work around happening.
I went to download the updated 4.0.1 version, but is not there. Just thought to let you know.
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
mvstudio
Thank you lat9!
Sorry for my late reply. After posting I realized my website was down due to the upgrade, customers complaints started pouring in and I've been putting down fires right and left ever since. The website works (sort of!) but any customer shopping with an affiliate code can't checkout, so there is lots of work around happening.
I went to download the updated 4.0.1 version, but is not there. Just thought to let you know.
I guess that the plugin moderators decided to forego the posting of v4.0.1, given that I'd just submitted 4.1.0.
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
It seems that way.
I do have a question though. I'm running a completely new install 1.5.6a and the corresponding version of snap affiliate. I've uploaded all the data from the old database running version 1.5.5e (customers, commission, orders, referrers, etc). However I'm running into a minor issue and I can't figure out how to solve it. I seem to be unable to pull previous years of data on the referrers page in admin. The pulldown menu for the year won't display years prior to 2019. I'm assuming it's because it's a brand new install (April 2019) with old (2019-2016) data in the database. Is there a way to force the display of this old data on both admin and customer fronts?
Thank you much for you help!
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
@mvstudio, if that upgraded install is on a publically-available server, I'd be willing to give it a look if you would PM me some access credentials. The dropdown "should" reflect years in which commissions were paid.
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Just PMed you. Thank you for taking the time to look into this! =)
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
mvstudio
It seems that way.
I do have a question though. I'm running a completely new install 1.5.6a and the corresponding version of snap affiliate. I've uploaded all the data from the old database running version 1.5.5e (customers, commission, orders, referrers, etc). However I'm running into a minor issue and I can't figure out how to solve it. I seem to be unable to pull previous years of data on the referrers page in admin. The pulldown menu for the year won't display years prior to 2019. I'm assuming it's because it's a brand new install (April 2019) with old (2019-2016) data in the database. Is there a way to force the display of this old data on both admin and customer fronts?
Thank you much for you help!
I've noted the issue (https://github.com/lat9/snap_affiliates/issues/32) on the plugin's GitHub repository and have corrected the issue on your site (thanks for the trust and credentials!).
That update will be included in a forthcoming v4.1.1 release of SNAP Affiliates.
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
I've encountered a problem after upgrading to 1.5.6c.
It seems for some bizarre reason I can no longer populate the unpaid commissions I'm going to pay. I can see them when I click on the affiliate but when I click the PAY button, nothing shows up.
I've reverted all the changes we made and uploaded all the files as they come out of the box and the same behavior. I cannot pay the affiliates nor see the list of commissions to be paid. I've re-uploaded all the files and triple checked all the files were in the correct place as well, but still nothing.
Has anyone else encountered the same problem?? Any idea what could be happening?
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
mvstudio
I've encountered a problem after upgrading to 1.5.6c.
It seems for some bizarre reason I can no longer populate the unpaid commissions I'm going to pay. I can see them when I click on the affiliate but when I click the PAY button, nothing shows up.
I've reverted all the changes we made and uploaded all the files as they come out of the box and the same behavior. I cannot pay the affiliates nor see the list of commissions to be paid. I've re-uploaded all the files and triple checked all the files were in the correct place as well, but still nothing.
Has anyone else encountered the same problem?? Any idea what could be happening?
Hmm, I haven't had the chance to verify operation under 156c (156b works fine) and I'm in the middle of a couple of other things.
My standard question: Are there any debug-logs being generated?
If you don't have Report All Errors installed, please do. Once installed, make sure that the admin logging is set to IgnoreDups and that the debug-backtrace on notices is set to true. Once configured, retry the operation to see if some notice is being issued.
-
Re: DEMO available?: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
lat9
Hmm, I haven't had the chance to verify operation under 156c (156b works fine) and I'm in the middle of a couple of other things.
My standard question: Are there any debug-logs being generated?
If you don't have Report All Errors installed, please do. Once installed, make sure that the admin logging is set to IgnoreDups and that the debug-backtrace on notices is set to true. Once configured, retry the operation to see if some notice is being issued.
There was one with the changes you emailed me last for the pulldown menu to include all the dates which weren't available.
[05-Sep-2019 15:42:11 America/Detroit] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function snap_admin_get_date_dropdown(), 3 passed in /admin/includes/functions/extra_functions/referrers_functions.php on line 122 and exactly 4 expected in /admin/includes/functions/extra_functions/referrers_functions.php:119
Stack trace:
#0 /admin/includes/functions/extra_functions/referrers_functions.php(122): snap_admin_get_date_dropdown('start', 1, 2019)
#1 /admin/referrers.php(623): snap_admin_get_date_dropdown('start', 1, 2019, '6')
#2 {main}
thrown in /admin/includes/functions/extra_functions/referrers_functions.php on line 119
[05-Sep-2019 15:42:11 America/Detroit] Request URI: /admin/referrers.php?referrer=6&mode=details&page=1&start_mon=1&start_year=2019&end_mon =9&end_year=2019&choose=Choose, IP address: 76.112.20.152
--> PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function snap_admin_get_date_dropdown(), 3 passed in /admin/includes/functions/extra_functions/referrers_functions.php on line 122 and exactly 4 expected in /admin/includes/functions/extra_functions/referrers_functions.php:119
Stack trace:
#0 /admin/includes/functions/extra_functions/referrers_functions.php(122): snap_admin_get_date_dropdown('start', 1, 2019)
#1 /admin/referrers.php(623): snap_admin_get_date_dropdown('start', 1, 2019, '6')
#2 {main}
thrown in /admin/includes/functions/extra_functions/referrers_functions.php on line 119.
Removing those changes and uploading the files as they were, aside from not generating any more error logs made no difference. The same behavior was observed. No commissions generated to pay.
It did occur to me this morning to do a test and I uploaded the older version of referrers the one for 1.5.0 and to my surprise it works. I can see and pay commissions. No errors or error logs generated.
For now it works, so no hurry. I can work with this for the time being.
Meanwhile I'll do as you say and get you the info later or during the weekend. Just wanted to stop by and report what I found in case it helps you.
Thanks Lat9 :)