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,399

Results 121 to 140 of 464
25 Sep 2013, 7:20 PM
#121
jcbazemore avatar

jcbazemore

New Zenner

Join Date:
Aug 2013
Location:
Georgia
Posts:
25
Plugin Contributions:
0

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.

25 Sep 2013, 7:55 PM
#122
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

Sorry (I should have tested before I posted), try this for the function:

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'];
}
25 Sep 2013, 8:11 PM
#123
jcbazemore avatar

jcbazemore

New Zenner

Join Date:
Aug 2013
Location:
Georgia
Posts:
25
Plugin Contributions:
0

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

lat9:

Sorry (I should have tested before I posted), try this for the function:

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!  :)
25 Sep 2013, 8:19 PM
#124
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

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!): ```
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'];

}

25 Sep 2013, 8:24 PM
#125
jcbazemore avatar

jcbazemore

New Zenner

Join Date:
Aug 2013
Location:
Georgia
Posts:
25
Plugin Contributions:
0

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

lat9:

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!): ```
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!
25 Sep 2013, 9:38 PM
#126
jcbazemore avatar

jcbazemore

New Zenner

Join Date:
Aug 2013
Location:
Georgia
Posts:
25
Plugin Contributions:
0

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: ```
function get_referrer_homepage/COLOR {
global $db;
// -----
// Check to see if the specified order has an associated referrer commission ...
//
$sa_sql = 'SELECT r.referrer_key[COLOR="#FF0000"], 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:```
<?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
}
?>
26 Sep 2013, 11:09 AM
#127
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

Nice one! Thanks for sharing.

26 Sep 2013, 1:28 PM
#128
jcbazemore avatar

jcbazemore

New Zenner

Join Date:
Aug 2013
Location:
Georgia
Posts:
25
Plugin Contributions:
0

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

lat9:

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.

27 Sep 2013, 3:53 PM
#129
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

jcbazemore:

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

1 Oct 2013, 5:47 PM
#130
seattleannie avatar

seattleannie

Zen Follower

Join Date:
Oct 2005
Posts:
151
Plugin Contributions:
0

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

1 Oct 2013, 5:59 PM
#131
jcbazemore avatar

jcbazemore

New Zenner

Join Date:
Aug 2013
Location:
Georgia
Posts:
25
Plugin Contributions:
0

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

seattleannie:

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

It's not part of the Account Creation process. You'll find it under the "My Account" page after you have logged in. Near the bottom of that page is a link to request to be an affiliate.

1 Oct 2013, 6:53 PM
#132
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

As jcbazemore said, and straight from the plugin's readme.html (hint, hint):

This plugin enables your store to have an "Affiliate Program", where an authorized affiliate can receive a commission for any sales that they "drive" to your store. To become an authorized affiliate, the affiliate must create an account with your store and then submit to you (via the referrer_signup page) the website from which they intend to promote your store. You'll receive an email informing you of the signup and you can authorize the affiliate using an admin-level tool.

1 Oct 2013, 8:29 PM
#133
seattleannie avatar

seattleannie

Zen Follower

Join Date:
Oct 2005
Posts:
151
Plugin Contributions:
0

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

[QUOTE=lat9;1220838]As jcbazemore said, and straight from the plugin's readme.html (hint, hint):

Maybe that is clear to you that "the referrer_signup page" is on the customer's account page, but that is not clear in the wording as written in the readme file. Not only I but another developer (friend) looked at the readme to try to figure this out before I asked the question here. Thanks for the clarity in the first reply I got, I can see how it works now.

9 Oct 2013, 1:46 PM
#134
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

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

Hi All,

I'm a little lost on how to add banners... I uploaded an image named /728,337,jpg/ to images/referrers and I added it in the same format to admin/config/affiliate program/affiliate program images. I see no change in the referrers tools page and I have no idea what else I am supposed to be doing!

I am using Zen-Cart 1.5.1

Are there any instructions on how to use this mod anywhere to be found?

Thank you for any help.

9 Oct 2013, 2:10 PM
#135
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

If you entered /728,337,jpg/ in your admin configuration, then you'll create a file named ref.728.337.jpg and place it in /images/referrers. That's documented in the readme.html file that's present in the root directory of the plugin's distribution zip-file as well as the help-text in the admin associated with the field, which reads:

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 ref.ww.hh.ext where *ww *is the image width, *hh *is the image height and *ext *is the image extension (gif or jpg).

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 /60,60,gif/120,60,jpg/.

I'll be happy to update the readme and help-text to provide more guidance if what's there is vague or needs more detail. Just let me know what's confusing.

9 Oct 2013, 2:19 PM
#136
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

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

Hi lat9,

Thanks for the speedy reply. I did read the readme file but my eyes must have been glazed over as I had everything in the right place but, I neglected to add ref. to my image name. My bad :bangin:

Thanks for the help!

9 Oct 2013, 2:33 PM
#137
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

Thanks for the update. In any future release, I'll move the version/update section to the end so that the "real content" of the readme is more obvious.

9 Oct 2013, 6:48 PM
#138
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

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

Is there a way to add text to the code that people will copy for banners? For example... Attachment 13158

Thank you!

9 Oct 2013, 10:11 PM
#139
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

doooomed:

Is there a way to add text to the code that people will copy for banners? For example... Attachment 13158

Thank you!
There isn't, currently. I'll add this feature-request to the wish list.

16 Oct 2013, 5:54 PM
#140
bugwater avatar

bugwater

New Zenner

Join Date:
Sep 2013
Posts:
9
Plugin Contributions:
0

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

Howzit, im trying to add ty package tracker to my site. However I run into the below issue when trying to merge the existing admin/orders.php into a new one for the package tracker.

Issues merging admin/orders.php with one that already has snap affiliates edits, and its only the admin/orders.php that is the problem, all other edits go thru just fine.

I have tried merging both directions but cannot get this to work with snap affiliates edits in it at the same time. So finally, after the 9th try ive given up and im not seeing anything else that ref's issues with these two mods.

Anytime I try to merge in the snap affiliates edits, then I can no longer add tracking numbers from the admin.

No anything else used, no superorder, no edit orders.

Anyone else have any issues with merging ty package tracker and snap affiliates?

zen v 1.5.1
downloaded ty package tracker today
Winmerge used for edits

Thanks
Bill
PS; I tried package tracker thread, and thought I might should try here also in case anyone else has had issues.