Snap Affiliates for Zen Cart 1.5.0 through 1.5.4
Version 3.0.0 by lat9
Copyright © 2013-2015 Vinos de Frutas Tropicales
Current support thread at Zen Cart Forums: www.zen-cart.com/showthread.php?206579-Snap-Affiliates-v2-0-for-Zen-Cart-v1-5-0-and-later. This software is provided for your use under the GNU General Public License v2.0.
Usage Notes
- In the United States (and probably other countries), there are tax implications associated with creating an affiliate program for your website. I am neither a lawyer nor an accountant, but you should perform your own due diligence by performing a web-search for affiliate marketing 1099.
- There have been issues reported using this plugin with some (or all) of the SEO plugins. If you are using one of those plugins, please be prepared for the affiliate-related links generated by this plugin to generate page-not-found (i.e. 404) errors. Some of these issues might be mitigated starting with the 2.1.1 version of this plugin.
- This plugin includes v1.1.0 of Orders Status History — updated_by, available here: http://www.zen-cart.com/downloads.php?do=file&id=1839. Please make sure that you've subscribed to the current support forum for Snap Affiliates; I'll post there if there's an interface update required.
What it does
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 link to the referrer_signup page at either My Account->Sign Me Up Today or the link provided by the Information Sidebox) 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.
Once authorized, the affiliate can access your site's referrer_tools and referrer_main pages via links from their account page — My Account->Affiliate Marketing Tools and My Account->Orders and Payments, respectively — to view a snapshot of their current commission history and access the information necessary to include their affiliate key in links from their store to yours. The affiliate links include a variable named referrer that identifies the affiliate's affiliate key which is created once you approve the affiliate's sign-up.
When one of your store's affiliates' customers clicks on an affiliate link, your store's customization detects the referrer variable and creates a cookie named referrer_key that contains the affiliate's key value. The cookie's lifetime is 1 year (31536000 seconds); you can change this value via an admin configuration. Each time a customer comes to your store with the referrer variable in the link, the referrer_key cookie is overwritten. So long as the cookie's lifetime has not expired, the customer has not cleared their browser cache and/or cookies and the affiliate is still in "good standing" (i.e. has not been banned), any purchase that the customer makes on your website results in an earned commission for that affiliate. Starting with v2.3.0, you can limit the number of customer purchases for which an affiliate receives a commission; see Purchases Per Cookie for more information.
Starting with v3.0.0, your affiliates can choose their method of commission-payment, either Check/Money Order or (optionally) via PayPal® to their PayPal account email address. Refer to Commission Payment Types for more information.
Customer Interfaces
Information Sidebox
An Affiliate Program link is added to the Information sidebox to point people to the referrer_signup page, if enabled by the plugin's configuration settings.
Note: If your store doesn't use the information sidebox, you can add PHP code to your alternate menu structure to create the "Referrer Signup" link. Here's the code used in the sidebox to add the link; 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>';
}
My Account Information Page: account
A new group (Referral Program) is added with the following links:
- Sign Me Up Today. This link is displayed only if the customer has not yet enrolled in your affiliate program and provides a link to the referrer_signup page.
- Orders and Payments. This link is displayed only if the customer has enrolled in, been approved for and is not currently banned from your affiliate program, providing a link to the referrer_main page.
- Affiliate Marketing Tools. This link is displayed only if the customer has enrolled in, been approved for and is not currently banned from your affiliate program, providing a link to the referrer_tools page.
Affiliate Signup Page: referrer_signup
This page operates differently based on whether or not the customer has previously signed up for your program. If the customer has not signed up, a form is presented allowing the customer to enter the website address from which they intend to link to your site with their affiliate key followed by your affiliate program's terms and conditions. Otherwise, if the page is invoked with the terms variable (e.g. www.mysite.com/index.php?main_page=referrer_signup&terms) your affiliate program's terms and conditions will be displayed; otherwise, the page redirects to referrer_main page.
Affiliate Main Page: referrer_main
This page operates differently based on whether the customer has previously signed up for your program and, if so, their current approval/banned status. If the customer has not signed up, this page redirects to the referrer_signup page. Otherwise, if either the customer is not yet approved or has been banned from the program, this page displays a message indicating that their submission is in the approval process. Finally, if the customer has signed up, is approved and is not banned, this page displays three sections:
- My Referrer Information. Displays the customer's affiliate key, last payment date and current commission rate.
- Sales Summary. Displays the current sales and unpaid commission and their year-to-date sales and commission.
- Commission-Payment Activity. Displays a form that the customer can use to search a specific time period for commission payments; details are displayed for commission payments that occurred within the selected timeframe.
Note: Affiliate sales and associated commissions are not shown for orders with an "Orders Status" value that falls in the list of Orders Status Exclusions specified by your admin.
This page only displays if a customer is signed in (redirecting to the login page otherwise), has applied (redirects to referrer_signup if not) and been approved for an affiliate account and is not currently banned, redirecting to referrer_main for either of these conditions. If the page displays, it shows either two or three sections:
- Site Link. Displays a text-area box that includes an HTML anchor link to your home page that includes the affiliate's key value. The affiliate can copy this HTML to include on their page that links back to you.
- Deep Link Generator. Displays an input field where the affiliate can enter (or paste) a link to a specific page on your site (e.g. a specific product) and then click the Transform button to add their affiliate key value to the link.
- Banners. If you have created and configured some Affiliate Program Images, this section displays each of those images along with a textarea box that includes a home-page link to your store using that image and the affiliate's key.
Zen Cart Admin Interfaces
The first time you start your Zen Cart admin after copying this plugins files to your installation, the plugin's initialization file runs. That file creates the database tables named commission and referrers, including your DB_PREFIX value, creates the settings for the plugin's configuration and creates the database settings to allow the display of Configuration->Affiliate Program and Customers->Referrers.
Configuration->Affiliate Program
As installed, the configuration screen for your affiliate program looks like the following.
The following configuration values allow you to customize your affiliate program:
- Module Version
- Displays the currently-installed configuration version of the plugin, one of:
- 1.1. The initial release of this plugin (v2.0.0).
- 2.1.0. Added Affiliate Display Count, Allow Self-Commissions and Orders Status Exclusions settings.
- 2.1.2a. Corrected the admin auto-config processing, no additional customization values were introduced.
- 2.2.0. Added Cookie Lifetime.
- 2.3.0. Added Purchases Per Cookie. Updated Customers->Referrers to include links to commissioned orders and Customers->Orders to include a link to the commissioned referrer if the order resulted in a commission payment.
- 2.5.0. Added Combine Exclusions on Referrers Page? and added the updated_by column to the orders_status_history table.
- 2.6.1. Changed the default for Include in Information Sidebox from "true" to "false".
- 2.7.0. Added fields to the
commission
table.
- 3.0.0. Added Enable PayPal® Commission Payment Method? and fields to the
commission
and referrers
tables.
- Default Commission
- Contains the default commission rate for your affiliates. The value is specified as a floating-point value in the range 0.0 to 1.0 and represents the percentage that an affiliate will receive if a customer makes a purchase from your store using their referral code. (Default: 0.1 — 10%)
- Order Total Exclusions
- Contains a comma-separated, packed list (i.e. no intervening blanks) of "Order Total" classes to which the default commission does not apply. The default value ot_shipping,ot_tax results in no commission being given for shipping- and tax-related items.
- Affiliate Key Prefix
- Identifies the character prefix used to create affiliate key values, identifying a specific affiliate. Once you've started your affiliate program, don't change this value or existing affiliates will no longer be recognized! (Default: CNWR_).
- Send Affiliate Emails To
- Identify the admin-level email address to which all affiliate-related emails are sent. Emails are generated during affiliate signup (the referrer_signup page) and within your admin when an affiliate is either authorized, banned or paid.
- Affiliate Program Images
- Images that you use for your affiliate program reside in your store's /images/referrers directory (created as part of the install). Each file's name matches the template ref*.ww.hh.ext where ww is the pixel-width, hh is the pixel-height and ext is the file extension (usually gif or jpg) of the image.
You identify your images to the plugin by entering this information into a fixed template: /ww,hh,ext/[ww,hh,ext/…]. If, for example, you have two banner image files (ref.60.80.gif and ref.120.60.jpg), you will enter /60,80,gif/120,60,jpg/ into this field. If you have multiple images of the same size and filetype, their filenames must start with ref, with any suffix you like appended — e.g. ref_1.60.80.gif and ref_2.60.80.gif.
- Include in Information Sidebox?
- This true/false switch identifies whether or not an Our Affiliate Program link appears in your store's "Information" sidebox. (Default: false)
- Affiliate Display Count
- Specifies the maximum number of affiliates to display on each page of your admin's Customers->Referrers. (Default: 50)
- Allow Self-Commissions
- Identifies whether ('true') or not ('false') an affiliate receives a commission on purchases made from their store account using their affiliate key. (Default: 'false')
- Orders Status Exclusions
- Contains a comma-separated, packed list (i.e. no intervening blanks) of "Orders Status" ID values that should not receive a commission. For example, the order status value of "Pending" is associated with an Orders Status ID of 1; if you want to exclude Pending orders from receiving a commission, you would enter 1 in this field. (Default: blank)
- Cookie Lifetime
- Specifies the lifetime, in seconds, of the cookie that is set when a customer enters your store via an affiliate's link. As long as this cookie is set in the customer's browser cache, the affiliate (if approved and not banned) will receive a commission for all purchases made by the customer. (Default: 31536000 — 60*60*24*365 seconds)
- Purchases Per Cookie
- Allows you to choose the number of purchases that a customer can make on a single affiliate cookie, either All or One. If you choose All, then all purchases by the customer within the "Cookie Lifetime" will result in a commission to the associated affiliate. If you choose One, the customer's affiliate cookie is deleted upon completion of their first purchase within the affiliate cookie's lifetime. (Default: All)
- Combine Exclusions on Referrers Page?
- If your store has a number of Order Status Exclusions, the display on a Customers->Referrers details page can get overwhelming. To combine the "Order Total" and "Commission Total" values associated with all the Order Status Exclusions into a single column, choose Yes. Choose No to display every "Order Status" value in a separate column. (Default: No)
- Enable PayPal® Commission Payment Method?
- Starting with v3.0.0, you can allow your affiliate customers to choose their method of payment. Since not all Zen Cart shops use PayPal (and might not have a PayPal account), this commission payment-method must be enabled to show to your customers. Refer to Commission Payment Methods for more details. (Default: No)
Customers->Referrers
This tool allows you to administer your affiliate program participants.
The first screen (see above) shows a summary of participants (the number per page is controlled by a configuration switch) and, clicking on the "Details" button, will show (within the "Order History" group) a list of orders in your store that are associated with the selected affiliate.
Within the "Status" group, you can:
- Approve the participant's entry into your affiliate program. Once you have approved an affiliate, this button be disabled. Until you approve an affiliate, they will not have access to their referrer_main and referrer_tools pages. When you click the "Approve" button, an email is sent to the affiliate to let them know of the approval.
- Ban or Unban the affiliate. When an affiliate is banned, they neither have access to their affiliate-account pages nor do they collect commissions during the 'banned' period. When you click the "Ban" button, an email is sent to the affiliate to let them know the status change.
- Pay the affiliate any accrued commission. This button is active only if there is a non-0 commission to be paid. Note that clicking this button doesn't actually result in the affiliate being paid, only that the commissionable orders that have not yet been paid are marked as paid. An email is sent to the affiliate to let them know of the payment and an orders_status_history record is generated for each payment.
- Update the commission percentage for the affiliate. The commission value is entered as a whole number between 0 and 100 and the new commission value applies to any commissionable orders placed after the update.
- Update Payment Type. Use this button to update the commission payment-type for the referrer. This value defaults to "Check/Money-order" and can be changed if you've set Enable PayPal® Commission Payment Method? to Yes.
Starting with v2.3.0, each item in the "Order History" group includes the ID value associated with a commissioned order, with a link to the associated order's details. Similarly, each commissioned order within the admin's Customers->Orders is identified by an icon with a link-back to the referrer's details page.
Beginning with v2.7.0, the following screen is shown when you click the Pay button from the affiliate's details screen. You can select, from the currently unpaid but commissionable orders, which commissions to pay and, if needed by your business practices, modify the commission amount paid from the calculated default.
Commission Payment Types
Starting with v3.0.0 of the plugin, your referrers can choose their method of payment type. The Check/Money-order type is enabled automatically and, if your store has a PayPal® account, you can enable your customers to choose to be paid via PayPal, too!
You can change a customer's commission payment-type within their "details" page from the Customers->Referrers tool and the customer can also change their payment-type via link from their referrer_main
page. Each commission payment made now includes an indication of the commission payment-type.
Note: The PayPal payment type is not an automatic method of payment! You'll need to sign into your PayPal account and "Send Money" to each of your referrers who have chosen to be paid via PayPal.
Installation
Starting with v2.3.0, there are core-file overwrites in this plugin; you should always backup your cart’s database and files prior to making any changes. The files identified using this color are part of the "Common Orders-Status Update" interface and are subject to separate change!
- Backup both your Zen Cart installation and database — this plugin will will modify both.
- Double-check the backup you just created. Better safe than sorry!
- Unzip the plugin's distribution zip-file into a temporary directory. Rename the "YOUR_TEMPLATE" directories (5 of them) to match your custom template’s name:
- /includes/languages/english/extra_definitions/YOUR_TEMPLATE
- /includes/languages/english/html_includes/YOUR_TEMPLATE
- /includes/languages/english/YOUR_TEMPLATE
- /includes/modules/sideboxes/YOUR_TEMPLATE
- /includes/templates/YOUR_TEMPLATE
and the "YOUR_ADMIN" directory to match your renamed admin folder.
- Your best approach for installing any new software is to use a local copy for your testing before deploying the changes to your live store. If you must install this directly on your live store, put your store into Maintenance Mode using your admin's Configuration->Maintenance Mode->Down for Maintenance setting, first. You'll then either copy the files to your local installation or use your FTP/SFTP program to copy the files to your hosted store.
- Check to see if your installation has made previous changes to each of these core-files. If not, copy the file; otherwise, use file-merging software (like WinMerge or Beyond Compare) to merge this plugin's changes into the file prior to copying:
- /YOUR_ADMIN/orders.php — changed/added lines are marked with comments that include the phrase snap_affiliates.
- /YOUR_ADMIN/includes/languages/english/orders.php — added lines are marked with comments that include the phrase snap_affiliates.
- Check to see if your installation already has the following template-override files. If a file is not present, copy the file; otherwise, use file-merging software to merge this plugin's changes into the file prior to copying:
- /includes/languages/english/YOUR_TEMPLATE/account.php
- /includes/modules/sideboxes/YOUR_TEMPLATE/information.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_account_default.php
- All the remaining files are specific to this plugin and can simply be copied:
- /images/referrers
- /includes/auto_loaders/config.snap.php
- /includes/classes/observers/class.snap_order_observer.php
- /includes/extra_datafiles/snap_file_database_names.php
- /includes/functions/extra_functions/osh_updated_by_functions.php
- /includes/init_includes/init_snap.php
- /includes/languages/english/extra_definitions/YOUR_TEMPLATE/snap_affiliates.php
- /includes/languages/english/html_includes/define_referral_terms.php
- /includes/languages/english/html_includes/define_referral_tools.php
- /includes/languages/english/html_includes/YOUR_TEMPLATE/define_referral_terms.php
- /includes/languages/english/html_includes/YOUR_TEMPLATE/define_referral_tools.php
- /includes/languages/english/YOUR_TEMPLATE/referral_edit.php
- /includes/languages/english/YOUR_TEMPLATE/referral_main.php
- /includes/languages/english/YOUR_TEMPLATE/referral_signup.php
- /includes/languages/english/YOUR_TEMPLATE/referral_tools.php
- /includes/modules/pages/account/header_php_referrals.php
- /includes/modules/pages/referrer_edit/header_php.php
- /includes/modules/pages/referrer_edit/jscript_show_hide.php
- /includes/modules/pages/referrer_edit/on_load_main.js
- /includes/modules/pages/referral_main/header_php.php
- /includes/modules/pages/referral_signup/header_php.php
- /includes/modules/pages/referral_tools/header_php.php
- /includes/modules/pages/referral_tools/jscript_tools.php
- /includes/templates/YOUR_TEMPLATE/css/referral_main.css
- /includes/templates/YOUR_TEMPLATE/css/referral_tools.css
- /includes/templates/YOUR_TEMPLATE/css/stylesheet_referrers.css
- /includes/templates/YOUR_TEMPLATE/templates/tp;_referrer_edit_default.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_main_default.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_signup_default.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_tools_default.php
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/images/icons/cash.jpg
- /YOUR_ADMIN/includes/auto_loaders/config.zc154_compatibility.php
- /YOUR_ADMIN/includes/extra_datafiles/referrers_filenames.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /YOUR_ADMIN/includes/functions/extra_functions/osh_updated_by_admin_functions.php
- /YOUR_ADMIN/includes/functions/extra_functions/referrers_functions.php
- /YOUR_ADMIN/includes/init_includes/init_zc154_compatibility.php
- /YOUR_ADMIN/includes/languages/english/referrers.php
- /YOUR_ADMIN/includes/languages/english/osh_updated_by.php
- /YOUR_ADMIN/includes/languages/english/extra_definitions/referrers_info.php
- /YOUR_ADMIN/includes/languages/english/extra_definitions/referrers_name.php
- Sign onto your Zen Cart admin to cause the automatic database updates to be performed for the plugin. Use your admin's Configuration->Affiliate Program to set the values for your store.
- Take your store out of "Maintenance Mode".
Version History:
This plugin is based on v1.0.2.1 of the Snap Affiliates add-on developed for the 1.3.x versions of Zen Cart®, but this version (v2.0.0 and later) has been modified for v1.5.0 and later only.
- v2.0.0, 2013-03-05, Initial release.
- No core-file overwrites … until v2.3.0!
- Moved all language-specific text to the language file, both catalog and admin.
- Moved $_SESSION['referrer'] initialization to /includes/init_includes/init_snap.php and /includes/auto_loaders/config.snap.php; /includes/application_top.php is no longer changed by this plugin.
- Moved changes to /includes/database_tables.php and /includes/filenames.php to /includes/extra_datafiles/snap_file_database_names.php; those core files are no longer changed by this plugin.
- Moved hard-coded referral terms to a separate language define file (/includes/languages/english/html_includes/define_referrer_terms.php and /includes/languages/english/html_includes/YOUR_TEMPLATE/define_referrer_terms.php).
- Moved /snapconfigure.php file initializations to your admin's Configuration->Affiliate Program.
- Database initialization is now performed automatically via your Zen Cart admin.
- Added "Information" sidebox link, controlled via admin configuration switch.
- Affiliate banner images are now specified via your admin.
- Commissions are given only to affiliate accounts that are previously authorized and not banned. An affiliate customer can no longer get a discount by using their own affiliate code.
- Using Zen Cart default email template for all emails sent; no longer require additional templates.
- v2.1.0, 2013-03-11:
- BUGFIX: Don't display "Details" button if there are no affiliates (yet).
- BUGFIX: Payment email to affiliate always shows $0.00.
- BUGFIX: Approval and payment emails show FILENAME_REFERRER_MAIN for referrer_main page link.
- BUGFIX: Payment email shows referrer_main as link for "Contact Us".
- BUGFIX: Pagination on Customers->Referrers was broken. Also, moved maximum number of affiliates to display to a configuration setting.
- Added a configuration switch to control whether or not a customer receives a commission on purchases made with their affiliate key in their account.
- Added a configuration setting to identify any Orders Status codes that should not receive a commission.
- BUGFIX: Disable the "Pay" button if the affiliate's current commission value is 0.
- "Prettied-up" the account-activation and commission-payment HTML email text.
- Added validation for the commission-rate entry in Customers->Referrers.
- BUGFIX: Missed a couple of admin-side language values (details buttons values).
- If the affiliate's account is not approved, the "Ban", "Pay" and "Update" buttons are disabled.
- v2.1.0a, 2013-03-12, Added Upgrading from a Previous Version.
- v2.1.1, 2013-04-01:
- Modifications to referrer_tools page to provide more support for sites that use rewritten URLs. Changed files are /includes/modules/pages/referrer_tools/jscript_tools.php and /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_tools_default.php. There are no database changes for this release.
- v2.1.2a, 2013-04-09:
- Note: Admin configuration version updated to 2.1.2a
- BUGFIX: Configuration version was not being written on new installs, resulting in a new configuration_group_id being created each time you ran your admin.
- Moved the affiliate cookie lifetime value into a defined value, in preparation for that value to become an admin customization.
- v2.2.0, 2013-06-02:
- Note: Admin configuration version updated to 2.2.0
- Added Cookie Lifetime configuration variable.
- Beefed up the Installation section of the readme to identify specifically the plethora of YOUR_TEMPLATE directories that need to be renamed.
- v2.3.0, 2013-06-12:
- Notes:
- Starting with this version, there is one core-file overwrite.
- Admin configuration version updated to v2.3.0
- Added an Order ID column to the detailed view in the admin's Customers->Referrers page, to allow the store administrator to have an easy way to see the order for which the commission was paid.
- Added an indicator to the admin's Customers->Orders page, to allow the store administrator to quickly see that the order was based on a commission. A link-back to the referrer's details is also included
- BUGFIX: When using the affiliate banners, the image-link produced was relative instead of absolute so it didn't reference the actual store.
- Added Purchases Per Cookie configuration variable
- v2.4.0, 2013-06-14:
- Note: Admin configuration version is unchanged from v2.3.0!
- BUGFIX: Didn't include the updated version of /includes/classes/observers/class.snap_order_observer.php in the v2.3.0 distribution!
- BUGFIX: Corrected files changed for this version to properly reflect the template file that was changed.
- BUGFIX: Completed partially-completed referrer_edit page processing.
- v2.4.1, 2013-07-19:
- BUGFIX: Referrer website link was relative instead of absolute on admin's Customers->Referrers.
- BUGFIX: Link on Customers->Orders takes you to the customer, not the referrer.
- v2.5.0, 2013-08-03:
- Note: Admin configuration version updated to v2.5.0.
- BUGFIX: Not updating date_modified field when performing a database update on the module's version number.
- BUGFIX: referrers_main page content did not account for excluded order status'.
- Added Combine Exclusions on Referrers Page? configuration variable and associated processing.
- Added an updated_by column to the orders_status_history table; use common functions when performing an orders_status_history table update.
- When a commission is paid to one of your store's affiliate-marketers, an orders_status_history record is created for the associated order(s) to note that event (along with the admin name/id of the person who clicked the "Pay" button).
- BUGFIX: Commission-paid dates on the referrers_main page were formatted incorrectly.
- BUGFIX: Activity date-range on the referrers_main page should find commission-payments in the range, not referred-customer purchases.
- v2.5.1, 2013-09-08:
- BUGFIX: Introduced in v2.5.0, no order details were displayed on referrers_main if the configuration contained no orders-status exclusions.
- Updated language file for referrers_main page to make it more obvious that the activity report is based on commission payments.
- BUGFIX: Banner images displayed using HTTP_SERVER on SSL pages, resulting in mixed-content warnings from the browser.
- v2.6.0, 2013-11-30:
- Updated to v1.1.0 of the "Common Orders Status History" framework, to pull in downwardly-compatible changes for Zen Cart v1.5.2.
- Update information sidebox to use SSL on the contact_us page (as changed in Zen Cart v1.5.2.).
- v2.6.1, 2014-03-20:
- Corrected the code display in the Information Sidebox section of this readme.
- Changed the default value on initial installation of the Include in Information Sidebox setting from true to false.
- Include updates to the Orders Status History — Updated By plugin (v1.1.0).
- v2.7.0, 2014-05-01:
- Allow store-owners to more control the commission paid to their affiliates and to selectively pay payable commissions.
- v2.7.1, 2014-07-13:
- Include previously-missed change to the account-page template (downwardly-compatible) for Zen Cart v1.5.2 and v1.5.3.
- Add email address to admin-level Customers->Referrers display.
- v2.7.2, 2014-10-08:
- BUGFIX: The /images/referrers directory was missing from the plugin's distribution; I've included an "empty" index.html file to ensure that the structure is included!
- BUGFIX: The referrers_main page didn't account for manually-updated commission payments. Thanks to mvstudio for the report and the suggested code to correct! Please note that sideboxes are now disabled when the referrers_main page is displayed. If you want your sideboxes to remain, edit /includes/modules/pages/referrers_main/header_php.php and remove (or comment-out) the last line in that file.
- v2.7.3, 2014-12-07:
- v2.8.0, 2014-12-21:
- CHANGE: Use Zen Cart v1.5.4 as the base for any core-file modifications.
- v2.8.1, 2015-02-04:
- CHANGE: Support multiple affiliate banner images of the same file type and dimensions.
- v2.8.2, 2015-02-26:
- BUGFIX: Navigation "issues" occurred when split-page is active.
- v3.0.0, 2015-03-14:
- CHANGE: Add the capability for a referrer to choose their payment method, either Check/Money-order or (optionally) PayPal®.
Upgrading from a Previous Version
Following are my suggestions if you are upgrading to this version from a previous version of this plugin:
- From any version prior to v2.0.0, you're most likely running a clean install of this plugin because the previous version didn't work on Zen Cart versions 1.5.0 and later and this plugin doesn't support Zen Cart versions prior to v1.5.0!
- Upgrading from v2.0.0, you can simply copy the plugin's file structure (after directory renames) into your store's. The database initialization code has been updated to recognize the version installed and adapt the configuration based on the previously installed version … so you won't lose any of your existing database settings.
File/Database Changes by Version
Legend for the File Changes: Changed — Added — Removed
Version |
Files Changes |
Database Changes |
v2.1.0 |
- /includes/classes/observers/class.snap_order_observer.php
- /includes/modules/pages/referral_main/header_php.php
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/includes/extra_datafiles/referrers_filenames.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /YOUR_ADMIN/includes/languages/english/referrers.php
|
- Added Affiliate Display Count, Allow Self-Commissions and Orders Status Exclusions settings.
|
v2.1.1 |
- /includes/modules/pages/referrer_tools/jscript_tools.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_tools_default.php
|
None |
v2.1.2a |
- /includes/init_includes/init_snap.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
|
- Corrected processing for the admin auto-config. This version provides the "cleanup" required for the coding error in the previous version. No new database values were introduced.
|
v2.2.0 |
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
|
- Added Cookie Lifetime configuration setting.
|
v2.3.0 |
- /includes/classes/observers/class.snap_order_observer.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_tools_default.php
- /YOUR_ADMIN/orders.php (added)
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/images/icons/cash.jpg
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /YOUR_ADMIN/includes/functions/extra_functions/referrers_functions.php
- /YOUR_ADMIN/includes/languages/english/referrers.php
- /YOUR_ADMIN/includes/languages/english/extra_definitions/referrers_info.php
- /YOUR_ADMIN/includes/languages/english/extra_definitions/referrers_name.php
|
- Module Version updated to v2.3.0.
- Added Purchases Per Cookie configuration setting.
|
v2.4.0 |
- /includes/classes/observers/class.snap_order_observer.php
- /includes/languages/english/YOUR_TEMPLATE/referrer_edit.php
- /includes/modules/pages/referrer_edit/header_php.php
- /includes/templates/YOUR_TEMPLATE/tpl_referrer_edit_default.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_main_default.php
|
None |
v2.4.1 |
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/includes/functions/extra_functions/referrers_functions.php
- /YOUR_ADMIN/includes/languages/english/referrers.php
|
None |
v2.5.0 |
- /includes/functions/extra_functions/osh_updated_by_functions.php
- /includes/modules/pages/referrer_main/header_php.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_main_default.php
- /YOUR_ADMIN/orders.php
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /includes/functions/extra_functions/osh_updated_by_admin_functions.php
- /YOUR_ADMIN/includes/functions/extra_functions/referrers_functions.php
- /YOUR_ADMIN/includes/languages/english/orders.php (added)
- /YOUR_ADMIN/includes/languages/english/referrers.php
- /YOUR_ADMIN/includes/languages/english/extra_definitions/osh_updated_by.php
|
- Module Version updated to v2.5.0.
- Added Combine Exclusions on Referrers Page? configuration setting.
- Column updated_by added to the orders_status_history table.
|
v2.5.1 |
- /includes/modules/pages/referrer_main/header_php.php
- /includes/languages/english/YOUR_TEMPLATE/referrer_main.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_tools_default.php
|
None |
v2.6.0 |
- /includes/functions/extra_functions/osh_updated_by_functions.php
- /includes/modules/sideboxes/YOUR_TEMPLATE/information.php
- /YOUR_ADMIN/orders.php
|
None |
v2.6.1 |
- /includes/functions/extra_functions/osh_updated_by_functions.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /YOUR_ADMIN/includes/languages/extra_definitions/osh_updated_by.php
|
- Module Version updated to v2.6.1.
- Default value for Include in Information Sidebox? changed from true to false.
|
v2.7.0 |
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /YOUR_ADMIN/includes/languages/english/referrers.php
|
- Module Version updated to v2.7.0.
- Columns commission_id, commission_payment_amount and commission_manual added to the commissions table.
- The primary key for this table was changed from commission_orders_id to commission_id.
- The commission_manual value is set to 1 if the calculated value of the commission_payment_amount was manually changed during the commission-payment process.
|
v2.7.1 |
- /includes/templates/YOUR_TEMPLATE/templates/tpl_account_default.php
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/includes/languages/english/referrers.php
|
None |
v2.7.2 |
- /images/referrers/index.html
- /includes/languages/english/YOUR_TEMPLATE/referrer_main.php
- /includes/modules/pages/referrer_main/header_php.php
- /includes/templates/YOUR_TEMPLATE/tpl_referrer_main_default.php
|
None |
v2.7.3 |
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /YOUR_ADMIN/includes/languages/english/referrers.php
|
None |
v2.8.0 |
- /YOUR_ADMIN/orders.php
- /YOUR_ADMIN/includes/auto_loaders/config.zc154_compatibility.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /YOUR_ADMIN/includes/init_includes/init_zc154_compatibility.php
|
None |
v2.8.1 |
- /includes/pages/referrer_tools/header_php.php
|
None |
v2.8.2 |
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
|
None |
v3.0.0 |
- /includes/classes/observers/class.snap_order_observer.php
- /includes/languages/english/extra_definitions/YOUR_TEMPLATE/snap_affiliates.php
- /includes/languages/english/YOUR_TEMPLATE/referrer_edit.php
- /includes/languages/english/YOUR_TEMPLATE/referrer_main.php
- /includes/modules/pages/referrer_edit/header_php.php
- /includes/modules/pages/referrer_edit/jscript_show_hide.php
- /includes/modules/pages/referrer_edit/on_load_main.js
- /includes/modules/pages/referrer_main/header_php.php
- /includes/modules/pages/referrer_tools/header_php.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_edit_default.php
- /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_main_default.php
- /YOUR_ADMIN/referrers.php
- /YOUR_ADMIN/includes/functions/extra_functions/init_referrers.php
- /YOUR_ADMIN/includes/languages/english/referrers.php
|
- Module Version updated to v3.0.0.
- Added configuration setting Enable PayPal® Commission Payment Method?.
- Columns commission_payment_type and commission_payment_type_detail added to the commissions table.
- Columns referrer_payment_type and referrer_payment_type_detail added to the referrers table.
|
Un-install
Delete the new catalog and admin files that were previously copied and then run the uninstall_snap.sql file that comes with this plugin.