Page 6 of 46 FirstFirst ... 4567816 ... LastLast
Results 51 to 60 of 460
  1. #51
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,361
    Plugin Contributions
    94

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

    When I'm on a roll, I'm on a roll ...

    Let's try this version (2.1.2a) instead, since it actually works.
    Code:
    <?php
    // +----------------------------------------------------------------------+
    // |Snap Affiliates for Zen Cart                                          |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2013, Vinos de Frutas Tropicales (lat9) for ZC 1.5.0+  |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license.       |
    // +----------------------------------------------------------------------+
    
    if (!defined('IS_ADMIN_FLAG')) {
        die('Illegal Access');
    }
    define('SNAP_MODULE_CURRENT_VERSION', '2.1.2a'); /*v2.1.2c*/
    define('SNAP_MODULE_UPDATE_DATE', '2013-04-09'); /*v2.1.2c*/
    
    //----
    // Create each of the database tables for the referrers plugin, if they don't already exist.
    //
    $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_REFERRERS . " (
      referrer_customers_id int(11) not null primary key,
    	referrer_key varchar(32) not null,
    	referrer_homepage text not null,
    	referrer_approved tinyint(4) not null,
    	referrer_banned tinyint(4) not null,
    	referrer_commission float not null
      )";
    $db->Execute($sql);
    
    $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_COMMISSION . " (
    	commission_orders_id int(11) not null primary key,
    	commission_referrer_key varchar(96) not null,
    	commission_rate float not null,
    	commission_paid datetime not null
      )";
    $db->Execute($sql);
    
    //----
    // Create the Configuration->Affiliate Program item, if it's not already there.
    //
    $configurationGroupTitle = 'Affiliate Program';
    $currentVersion = SNAP_MODULE_CURRENT_VERSION;
    $currentDescription = SNAP_MODULE_UPDATE_DATE . ', Vinos de Frutas Tropicales';
    
    //-bof-v2.1.2c-Provide fix-up for problem with previous versions' auto-install
    $configuration = $db->Execute("SELECT configuration_group_id FROM " . TABLE_CONFIGURATION_GROUP . " WHERE configuration_group_title = '$configurationGroupTitle' ORDER BY configuration_group_id ASC;");
    if ($configuration->EOF) {
      $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " 
                     (configuration_group_title, configuration_group_description, sort_order, visible) 
                     VALUES ('$configurationGroupTitle', 'Set Affiliate Program Options', '1', '1');");
      $configuration_group_id = $db->Insert_ID();
      
      $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = $configuration_group_id WHERE configuration_group_id = $configuration_group_id;");
    
      
    } elseif ($configuration->RecordCount() != 1) {
      $configuration_group_id = $configuration->fields['configuration_group_id'];
      $db->Execute("UPDATE " . TABLE_CONFIGURATION . " SET configuration_group_id = $configuration_group_id WHERE configuration_key LIKE 'SNAP%'");
      $db->Execute("DELETE FROM " . TABLE_CONFIGURATION_GROUP . " WHERE (configuration_group_id != $configuration_group_id AND configuration_group_title = '$configurationGroupTitle')");
    
    } else {
      $configuration_group_id = $configuration->fields['configuration_group_id'];
    }
    //-eof-v2.1.2c-Provide fix-up for problem with previous versions' auto-install
    
    //-----
    // If the currently-installed version of the plugin doesn't match the current install's
    // version (or it's the first time) ...
    //
    // Loop through each of the configuration items, inserting them into the database if the
    // previously-installed plugin version is less than this current install's version and
    // the configuration key doesn't already exist (it "shouldn't", but this provides a bit of 
    // an additional safety net).
    //
    // Once that's complete, update the database configuration to the current install's version.
    //
    if (!defined('SNAP_MODULE_VERSION') || SNAP_MODULE_VERSION !== $currentVersion) {  /*v2.1.2c*/
    
      /*----
      ** This array contains the Configuration->Affiliate Program group's options.  Each item will be entered with a
      ** last_modifed and date_added date of 'now()' by the foreach loop that follows.  This structure allows new
      ** configuration items to be added without affecting the store's current setting for the newly-created items.
      */
      $snap_config_items = array (
        array ( 'version' => '1.1', 'title' => 'Module Version', 'key' => 'SNAP_MODULE_VERSION', 'value' => $currentVersion, 'description' => $currentDescription, 'sort_order' => 10, 'use_function' => 'NULL', 'set_function' => 'trim('),
        array ( 'version' => '1.1', 'title' => 'Default Commission', 'key' => 'SNAP_DEFAULT_COMMISSION', 'value' => '0.1', 'description' => 'The default commission rate for your store\'s Affiliate Program.  The value should be specified as a floating-point number in the range 0.0 to 1.0.  The default value (<strong>0.1</strong>) represents a 10% commission rate.<br />', 'sort_order' => 12,  'use_function' => 'NULL', 'set_function' => 'NULL'),
        array ( 'version' => '1.1', 'title' => 'Order Total Exclusions', 'key' => 'SNAP_ORDER_TOTALS_EXCLUSIONS', 'value' => 'ot_shipping,ot_tax', 'description' => 'Exclude these Order Totals classes from an affiliate\'s commission. Enter the values as a comma-separated list with no intervening blanks.<br /><br />Default: <b>ot_shipping,ot_tax</b>.', 'sort_order' => 14, 'use_function' => 'NULL', 'set_function' => 'NULL'),
        array ( 'version' => '1.1', 'title' => 'Affiliate Key Prefix', 'key' => 'SNAP_KEY_PREFIX', 'value' => 'CNWR_', 'description' => 'Enter the prefix value to use for affiliate keys associated with your store\'s Affiliate Program. <strong>Note:</strong> If you change this value after you have started your program, existing affiliates will no longer earn their commissions!<br /><br />Default: <strong>CNWR_</strong>', 'sort_order' => 16, 'use_function' => 'NULL', 'set_function' => 'NULL'),
        array ( 'version' => '1.1', 'title' => 'Send Affiliate Emails To', 'key' => 'SNAP_ADMIN_EMAIL', 'value' => 'Enter email address here', 'description' => 'Enter the email address to which affiliate-related sign-up emails should be sent.<br />', 'sort_order' => 18, 'use_function' => 'NULL', 'set_function' => 'NULL'),
        array ( 'version' => '1.1', 'title' => 'Affiliate Program Images', 'key' => 'SNAP_AFFILIATE_IMAGES', 'value' => '', 'description' => 'Identify the images that your affiliates can use in their back-links.  Each file must be present in your store\'s /images/referrers directory and be named <em>ref.ww.hh.ext</em> where <em>ww</em> is the image width, <em>hh</em> is the image height and <em>ext</em> is the image extension (gif or jpg).<br /><br />Use the format /ww,hh,ext/[ww,hh,ext/...] to identify the files.  For example, if your store uses the files named ref.60.60.gif and ref.120.60.jpg for your program, you will enter this field as <b>/60,60,gif/120,60,jpg/</b><br />', 'sort_order' => 19, 'use_function' => 'NULL', 'set_function' => 'zen_cfg_textarea('),
        array ( 'version' => '1.1', 'title' => 'Include in Information Sidebox?', 'key' => 'SNAP_INFORMATION_SIDEBOX', 'value' => 'true', 'description' => 'Identifies whether (\'true\') or not (\'false\') to include a link to your Affiliate Program in the Information sidebox.<br /><br />Default: <strong>\'true\'</strong>.', 'sort_order' => 20, 'use_function' => 'NULL', 'set_function' => 'zen_cfg_select_option(array(\'true\', \'false\'),'),
        array ( 'version' => '2.1.0', 'title' => 'Affiliate Display Count', 'key' => 'SNAP_MAX_REFERRER_DISPLAY', 'value' => '50', 'description' => 'Specifies the maximum number of affiliates to show on each page of your admin\'s <em>Customers-&gt;Referrers</em>.<br /><br />Default: <strong>50</strong><br /><br />', 'sort_order' => 22, 'use_function' => 'NULL', 'set_function' => 'NULL'), /*v2.1.0a*/
        array ( 'version' => '2.1.0', 'title' => 'Allow Self-Commissions', 'key' => 'SNAP_AFFILIATE_KEY_USE', 'value' => 'false', 'description' => 'Identifies whether (\'true\') or not (\'false\') an affiliate receives commission for purchases made using their own <em>affiliate key</em>.<br /><br />Default: <strong>\'false\'</strong>.', 'sort_order' => 24, 'use_function' => 'NULL', 'set_function' => 'zen_cfg_select_option(array(\'true\', \'false\'),'), /*v2.1.0a*/
        array ( 'version' => '2.1.0', 'title' => 'Order Status Exclusions', 'key' => 'SNAP_ORDER_STATUS_EXCLUSIONS', 'value' => '', 'description' => 'Exclude orders with the following <em>Order Status</em> values from affiliate commissions. Specify the values as a packed (i.e. no spaces) comma-separated list.<br /><br />Default: <br /><br />', 'sort_order' => 26, 'use_function' => 'NULL', 'set_function' => 'NULL'), /*v2.1.0a*/
    
      );
    
      $installedVersion = (defined('SNAP_MODULE_VERSION')) ? SNAP_MODULE_VERSION : '0';  /*v2.1.2c*/
      
      foreach ($snap_config_items as $config_item) {
        if ($installedVersion < $config_item['version'] && !defined($config_item['key'])) {  /*v2.1.2c*/
          $sql = "INSERT INTO " . TABLE_CONFIGURATION . " 
            (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) 
            VALUES
            ('" . $config_item['title'] . "', '" . zen_db_input($config_item['key']) . "', '" . zen_db_input($config_item['value']) . "', '" . zen_db_input($config_item['description']) . "', $configuration_group_id, " . (int)$config_item['sort_order'] . ", NOW(), NOW(), " . (($config_item['use_function'] == 'NULL') ? 'NULL' : ("'" . zen_db_input($config_item['use_function']) . "'")) . ', ' . (($config_item['set_function'] == 'NULL') ? 'NULL' : ("'" . zen_db_input($config_item['set_function']) . "'")) . ');';
          $db->Execute($sql);
        }
      }
    
      $db->Execute("UPDATE " . TABLE_CONFIGURATION . " SET configuration_value = '$currentVersion', configuration_description = '$currentDescription' WHERE configuration_group_id = $configuration_group_id AND configuration_key = 'SNAP_MODULE_VERSION';");
    
      unset($snap_config_items);
    }
    
    //----
    // If the installation supports admin-page registration (i.e. v1.5.0 and later), then
    // register the Affiliate Program configuration and the Referrers tool into the admin menu structure.
    //
    if (function_exists('zen_register_admin_page')) {
      if (!zen_page_key_exists('configurationAffiliates')) {
        zen_register_admin_page('configurationAffiliates', 'BOX_CONFIGURATION_AFFILIATES', 'FILENAME_CONFIGURATION', "gID=$configuration_group_id", 'configuration', 'Y', $configuration_group_id);
      }
      
      if (!zen_page_key_exists('customersReferrers')) {
        zen_register_admin_page('customersReferrers', 'BOX_CUSTOMERS_REFERRERS', 'FILENAME_REFERRERS', '', 'customers', 'Y', 20);
      }    
    }

  2. #52
    Join Date
    Sep 2012
    Posts
    40
    Plugin Contributions
    0

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

    Hello,

    I wish to install the SNAP Affiliates and use it for 1.3.9h but what i wanted to know was:

    a) Can you create a tiered structure so that people earn different stages of commission if they sell more? (sell 10 get 5%, sell 20 get 10%, sell 30 get 12.5% etc...)

    b) Can you limit the programme for use with certain items only?

    c) Will the 1.5 version work for me?

  3. #53
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

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

    Quote Originally Posted by christospur View Post
    Hello,

    I wish to install the SNAP Affiliates and use it for 1.3.9h but what i wanted to know was:

    a) Can you create a tiered structure so that people earn different stages of commission if they sell more? (sell 10 get 5%, sell 20 get 10%, sell 30 get 12.5% etc...)

    b) Can you limit the programme for use with certain items only?

    c) Will the 1.5 version work for me?
    the 1.5 version isn't built to work on 1.3

  4. #54
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,361
    Plugin Contributions
    94

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

    Quote Originally Posted by christospur View Post
    Hello,

    I wish to install the SNAP Affiliates and use it for 1.3.9h but what i wanted to know was:

    a) Can you create a tiered structure so that people earn different stages of commission if they sell more? (sell 10 get 5%, sell 20 get 10%, sell 30 get 12.5% etc...)

    b) Can you limit the programme for use with certain items only?

    c) Will the 1.5 version work for me?
    christospur, the answers to all your questions are (at this time): No.

    Other people have requested your item (b) to limit the program only to certain items or, alternatively, to exclude some items from commission. I don't think I have heard the request to have a tiered structure before -- either based on number of items or using a sales-amount threshold -- but if others would like this I can place it on the things-to-do list.

    As picandnix indicated, this version will not work on the 1.3.x versions of Zen Cart.

  5. #55
    Join Date
    Sep 2012
    Posts
    40
    Plugin Contributions
    0

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

    The original Snap Affiliates by Michael, seems to allow for it to be limited to individual items:

    "Affiliates can link anywhere into your Zen Cart store and still receive credit for sales; from the front page down to individual items."

    It also seemed to allow for variable commission rates:

    "Variable commission rates; a valuable tool for motivating and rewarding affiliates."

    In working practise, is this not the case?

  6. #56
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,361
    Plugin Contributions
    94

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

    Quote Originally Posted by christospur View Post
    The original Snap Affiliates by Michael, seems to allow for it to be limited to individual items:

    "Affiliates can link anywhere into your Zen Cart store and still receive credit for sales; from the front page down to individual items."

    It also seemed to allow for variable commission rates:

    "Variable commission rates; a valuable tool for motivating and rewarding affiliates."

    In working practise, is this not the case?
    christospur, the key phrase is seems to.

    The first phrase you quoted would be better written: "Affiliates can link anywhere into your Zen Cart store, from the front page down to individual items, and still receive credit for sales.". Neither version of the plugin limits the commission earned by an affiliate to individual items.

    I believe that the "variable commission rates" that are quoted in the description for this plugin's parent refer to the fact that you can vary the commission rates from one affiliate to the other. A specific affiliate's commission rate, however, is fixed; it does not vary from one product to the next.

  7. #57
    Join Date
    Apr 2013
    Location
    Clearwater, Florida, United States
    Posts
    1
    Plugin Contributions
    0

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

    i can not see affiliate link even after saying yes in admin settings to include on information box.
    everything else is working but have no link?
    see http://www.pokerlifegear.com/shop

  8. #58
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,361
    Plugin Contributions
    94

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

    Quote Originally Posted by Leif Oskarsson View Post
    i can not see affiliate link even after saying yes in admin settings to include on information box.
    everything else is working but have no link?
    see http://www.pokerlifegear.com/shop
    Did you rename the file folder /includes/modules/sideboxes/YOUR_TEMPLATE/information.php to /includes/modules/robbor_black/information.php?

    There are a bunch of template overrides in this plugin and it's very easy to miss one ...

  9. #59
    Join Date
    Nov 2007
    Location
    UK
    Posts
    102
    Plugin Contributions
    0

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

    I wonder if anyone can help.

    I'm using the latest version of this plugin on zencart 1.5 with ceons ultimate seo and while I get no 404 errors and the cookie seems to be set, I'm not getting any record of affiliate commissions. I've check and the version I have installed is the one with the amended files for seo plugins on this thread.

    I'm using Nochex (payment processor) to test my transactions and the sales are being recorded, just not the affiliate commission. I've cleared the cookies and use a different account to make the purchase from the referral link, tried home page and deep links. Nothing seems to work.

    Any suggestions?

    Many thanks

    Kerrie

  10. #60
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

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

    Quote Originally Posted by kezan98 View Post
    I wonder if anyone can help.

    I'm using the latest version of this plugin on zencart 1.5 with ceons ultimate seo and while I get no 404 errors and the cookie seems to be set, I'm not getting any record of affiliate commissions. I've check and the version I have installed is the one with the amended files for seo plugins on this thread.

    I'm using Nochex (payment processor) to test my transactions and the sales are being recorded, just not the affiliate commission. I've cleared the cookies and use a different account to make the purchase from the referral link, tried home page and deep links. Nothing seems to work.

    Any suggestions?

    Many thanks

    Kerrie
    Hi Kerrie
    have you read all of this thread? I think it's been answered already.

 

 
Page 6 of 46 FirstFirst ... 4567816 ... LastLast

Similar Threads

  1. snap-affiliates?
    By JohnBoyCR in forum All Other Contributions/Addons
    Replies: 222
    Last Post: 16 Oct 2016, 08:10 PM
  2. v139h Seperate login for sales affiliates and distributors ?
    By respawnedelectronics in forum General Questions
    Replies: 4
    Last Post: 5 Jul 2014, 04:40 PM
  3. v151 snap affiliates bitcoins
    By unckle fester in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 6 Jun 2014, 07:44 AM
  4. Snap Affiliates Module?
    By asauterChicago in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 12 Apr 2013, 09:45 AM
  5. snap affiliates not emailing
    By mindcraft in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 9 Apr 2012, 11:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR