Page 13 of 46 FirstFirst ... 3111213141523 ... LastLast
Results 121 to 130 of 460
  1. #121
    Join Date
    Aug 2013
    Location
    Georgia
    Posts
    25
    Plugin Contributions
    0

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

    Hey lat9, I tried to implement the code change and I'm getting "Parse error: syntax error, unexpected T_STRING in /[site_folders]/public_html/YOUR_admin/invoice.php on line 27" when I try to open the Invoice. This is what I have on line 27: "return ($sa_info->EOF) ? false : $sa_info->fields['referrer_key'];" (minus the quotes of course.) In case it makes a difference, but I don't think it will, I did make a change to the various referrer_ files changing the verbiage of "Website" to "Organization." I did not change the actual code portions that referenced "website", just the HTML verbiage displayed on the page.

  2. #122
    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

    Sorry (I should have tested before I posted), try this for the function:
    Code:
    function get_referrer_key($oID) {
      global $db;
        // -----
        // Check to see if the specified order has an associated referrer commission ...
        //
        $sa_sql = 'SELECT r.referrer_key 
                     FROM ' . TABLE_REFERRERS . ' r, ' . TABLE_COMMISSION . ' rc 
                     WHERE rc.commission_orders_id = ' . (int)$oID . '
                     AND rc.commission_referrer_key = r.referrer_key;
    
        $sa_info = $db->Execute($sa_sql);
    
        return ($sa_info->EOF) ? false : $sa_info->fields['referrer_key'];
    }

  3. #123
    Join Date
    Aug 2013
    Location
    Georgia
    Posts
    25
    Plugin Contributions
    0

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

    Quote Originally Posted by lat9 View Post
    Sorry (I should have tested before I posted), try this for the function:
    Code:
    function get_referrer_key($oID) {
      global $db;
        // -----
        // Check to see if the specified order has an associated referrer commission ...
        //
        $sa_sql = 'SELECT r.referrer_key 
                     FROM ' . TABLE_REFERRERS . ' r, ' . TABLE_COMMISSION . ' rc 
                     WHERE rc.commission_orders_id = ' . (int)$oID . '
                     AND rc.commission_referrer_key = r.referrer_key;
    
        $sa_info = $db->Execute($sa_sql);
    
        return ($sa_info->EOF) ? false : $sa_info->fields['referrer_key'];
    }

    That did succeed in moving the error from line 27 to 28!! As for testing your code, that's why you have me since I'm the one requesting custom mods! :)

  4. #124
    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

    Thanks for your kind words, try this adding the stupid little quote at the end of the $sa_sql assignment (the global $db missing would have bit you later on!):
    Code:
    function get_referrer_key($oID) {
      global $db;
        // -----
        // Check to see if the specified order has an associated referrer commission ...
        //
        $sa_sql = 'SELECT r.referrer_key 
                     FROM ' . TABLE_REFERRERS . ' r, ' . TABLE_COMMISSION . ' rc 
                     WHERE rc.commission_orders_id = ' . (int)$oID . '
                     AND rc.commission_referrer_key = r.referrer_key';
    
        $sa_info = $db->Execute($sa_sql);
    
        return ($sa_info->EOF) ? false : $sa_info->fields['referrer_key'];
    }

  5. #125
    Join Date
    Aug 2013
    Location
    Georgia
    Posts
    25
    Plugin Contributions
    0

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

    Quote Originally Posted by lat9 View Post
    Thanks for your kind words, try this adding the stupid little quote at the end of the $sa_sql assignment (the global $db missing would have bit you later on!):
    Code:
    function get_referrer_key($oID) {
      global $db;
        // -----
        // Check to see if the specified order has an associated referrer commission ...
        //
        $sa_sql = 'SELECT r.referrer_key 
                     FROM ' . TABLE_REFERRERS . ' r, ' . TABLE_COMMISSION . ' rc 
                     WHERE rc.commission_orders_id = ' . (int)$oID . '
                     AND rc.commission_referrer_key = r.referrer_key';
    
        $sa_info = $db->Execute($sa_sql);
    
        return ($sa_info->EOF) ? false : $sa_info->fields['referrer_key'];
    }
    That did the trick!

  6. #126
    Join Date
    Aug 2013
    Location
    Georgia
    Posts
    25
    Plugin Contributions
    0

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

    For anyone reading this and contemplating something similar I realized that referrer_key listed on the invoice wasn't nearly as useful as referrer_homepage. I modified the function as follows to make that happen:
    Code:
    function get_referrer_homepage($oID) {
       global $db; 
        // -----
        // Check to see if the specified order has an associated referrer commission ...
        //
        $sa_sql = 'SELECT r.referrer_key, r.referrer_homepage 
                     FROM ' . TABLE_REFERRERS . ' r, ' . TABLE_COMMISSION . ' rc 
                     WHERE rc.commission_orders_id = ' . (int)$oID . '
                     AND rc.commission_referrer_key = r.referrer_key';
    
        $sa_info = $db->Execute($sa_sql);
    
        return ($sa_info->EOF) ? false : $sa_info->fields['referrer_homepage'];
    Then later on when calling the function:
    Code:
    <?php
    if (get_referrer_homepage($oID) !== false) {
    ?>
          <tr>
            <td class="main"><b>Affiliate Key:</b></td>
            <td class="main"><?php echo get_referrer_homepage($oID); ?></td>
          </tr>
    <?php
    }
    ?>

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

    Nice one! Thanks for sharing.

  8. #128
    Join Date
    Aug 2013
    Location
    Georgia
    Posts
    25
    Plugin Contributions
    0

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

    Quote Originally Posted by lat9 View Post
    Nice one! Thanks for sharing.
    After I asked you about adding the key I realized that a string of numbers doesn't easily help me determine which label to put on the bag like homepage would. Especially in my case where I've modified the homepage verbiage to be organization name instead of website. Thank you for all your work on this module. It's giving us exactly what we wanted so the groups we're working with can see the progress of their fundraising efforts throughout the year. Any chance you would like to work on a recurring billing module? I'd happily be your guinea pig for testing it out! That's the last piece we need to make this our ideal site for $$$$$ less than we anticipated.

  9. #129
    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 jcbazemore View Post
    ... Any chance you would like to work on a recurring billing module? I'd happily be your guinea pig for testing it out! That's the last piece we need to make this our ideal site for $$$$$ less than we anticipated.
    It's on my list of things-to-do, based on a client's previous request.

  10. #130
    Join Date
    Oct 2005
    Posts
    151
    Plugin Contributions
    0

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

    I have installed Snap Affiliates v 251 to a 1.5.1 Zen Cart. However, the sign up option is not appearing on the create account page. I assume that is where I should see it, based on what I saw in the files uploaded... Did I miss a step in the install process? I uploaded all the files, and I configured things under Configuration > Affiliate Program. I can also see / edit the two new pages in the Define Pages Editor. Help? ~anne

 

 
Page 13 of 46 FirstFirst ... 3111213141523 ... 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