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 361 to 380 of 464
30 Jul 2017, 11:32 AM
#361
lat9 avatar

lat9

Administrator

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

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.

1 Aug 2017, 2:24 PM
#362
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 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.

4 Aug 2017, 7:38 PM
#363
tapper avatar

tapper

Zen Follower

Join Date:
Nov 2007
Location:
Upstate NY
Posts:
233
Plugin Contributions:
0

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!

4 Aug 2017, 8:07 PM
#364
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

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

INSERT INTO commission (commission_orders_id, commission_referrer_key, commission_rate, commission_paid) VALUES ([B]zzz[/B], '[B]xxx[/B]', [B]yyy[/B], 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.

31 Dec 2017, 2:55 AM
#365
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

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.

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

31 Dec 2017, 1:10 PM
#366
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

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.

5 Jan 2018, 4:18 PM
#367
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

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.

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

5 Jan 2018, 4:52 PM
#368
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

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!

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

6 Jan 2018, 5:05 PM
#369
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

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.

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.

7 Jan 2018, 3:55 AM
#370
mvstudio avatar

mvstudio

Zen Follower

Join Date:
Apr 2008
Posts:
447
Plugin Contributions:
1

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

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

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

        $current_amount = floatval($orders->fields['order_total']) - $current_exclusion;

for this

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

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

       $commissionable_total = $order['order_total'] - $order['value'];

with this

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

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

M.Valenti
Contemporary Artist - Entrepreneur
http://www.manuelavalenti.com - http://www.byvalenti.com

7 Jan 2018, 12:57 PM
#371
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

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?

26 Jan 2018, 1:19 AM
#372
one_pac avatar

one_pac

New Zenner

Join Date:
Dec 2017
Location:
Adelaide
Posts:
16
Plugin Contributions:
0

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:

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

26 Jan 2018, 12:45 PM
#373
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

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.

27 Jan 2018, 2:59 AM
#374
one_pac avatar

one_pac

New Zenner

Join Date:
Dec 2017
Location:
Adelaide
Posts:
16
Plugin Contributions:
0

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

Thanks Lat9,

That was easier than I thought it would be.

21 Feb 2018, 9:43 PM
#375
nousch avatar

nousch

New Zenner

Join Date:
Sep 2012
Posts:
4
Plugin Contributions:
0

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

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.

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

$current_exclusion += $finalAmount;

to admin/referrers.php around line 186, after

  $totalResults->MoveNext();
}

I think that should do what you want do accomplish.

9 Mar 2018, 7:41 PM
#376
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

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
9 Mar 2018, 8:36 PM
#377
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

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!

28 Apr 2018, 5:28 PM
#378
exsy avatar

exsy

New Zenner

Join Date:
Apr 2018
Location:
USA
Posts:
11
Plugin Contributions:
0

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.

28 Apr 2018, 5:48 PM
#379
exsy avatar

exsy

New Zenner

Join Date:
Apr 2018
Location:
USA
Posts:
11
Plugin Contributions:
0

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!

29 Apr 2018, 11:07 AM
#380
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

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

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.