Forums / All Other Contributions/Addons / Snap Affiliates v2.0 for v1.5.0 and later

Snap Affiliates v2.0 for v1.5.0 and later

Views: 68,401

Results 301 to 320 of 464
28 Jun 2015, 7:13 PM
#301
jshannonb avatar

jshannonb

New Zenner

Join Date:
Jun 2015
Posts:
3
Plugin Contributions:
0

Snap Affiliates v2.0 for v1.5.0 and later

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?)

28 Jun 2015, 8:26 PM
#302
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Snap Affiliates v2.0 for v1.5.0 and later

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!

29 Jun 2015, 12:04 AM
#303
jshannonb avatar

jshannonb

New Zenner

Join Date:
Jun 2015
Posts:
3
Plugin Contributions:
0

Re: Snap Affiliates v2.0 for v1.5.0 and later

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

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!

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 :)

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 :)

30 Jun 2015, 12:11 AM
#304
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Snap Affiliates v2.0 for v1.5.0 and later

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

1 Jul 2015, 3:17 PM
#305
jshannonb avatar

jshannonb

New Zenner

Join Date:
Jun 2015
Posts:
3
Plugin Contributions:
0

Re: Snap Affiliates v2.0 for v1.5.0 and later

That would work :)

24 Sep 2015, 3:46 PM
#306
kenaschon avatar

kenaschon

New Zenner

Join Date:
Sep 2015
Location:
Germany
Posts:
1
Plugin Contributions:
0

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:

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

.
.
.
..

        $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

24 Sep 2015, 4:55 PM
#307
snorkeltwin avatar

snorkeltwin

New Zenner

Join Date:
Mar 2008
Posts:
11
Plugin Contributions:
0

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.

24 Sep 2015, 6:18 PM
#308
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

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

24 Sep 2015, 8:47 PM
#309
snorkeltwin avatar

snorkeltwin

New Zenner

Join Date:
Mar 2008
Posts:
11
Plugin Contributions:
0

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.

25 Sep 2015, 7:33 PM
#310
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Snap Affiliates v2.0 for v1.5.0 and later

No problem ... now if I could only remember ...

21 Nov 2015, 3:03 PM
#311
bulkejuice avatar

bulkejuice

New Zenner

Join Date:
Nov 2015
Posts:
4
Plugin Contributions:
0

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

21 Nov 2015, 7:38 PM
#312
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

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?

6 Dec 2015, 5:09 PM
#313
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

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.

10 Dec 2015, 1:34 PM
#314
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Snap Affiliates v2.0 for v1.5.0 and later

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.

19 Dec 2015, 1:29 PM
#315
printchic avatar

printchic

New Zenner

Join Date:
May 2009
Posts:
66
Plugin Contributions:
0

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/index.php?main_page=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.

19 Dec 2015, 2:07 PM
#316
printchic avatar

printchic

New Zenner

Join Date:
May 2009
Posts:
66
Plugin Contributions:
0

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.

19 Dec 2015, 2:10 PM
#317
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

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?

11 Jan 2016, 6:14 PM
#318
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

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!

  • Jeff
11 Jan 2016, 7:53 PM
#319
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

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.

24 Jan 2016, 5:36 PM
#320
buddys avatar

buddys

New Zenner

Join Date:
Oct 2015
Location:
MS Gulf Coast
Posts:
38
Plugin Contributions:
0

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: