{"id":21044586,"url":"https://github.com/tripflex/whmcs-affcoupons","last_synced_at":"2025-09-04T02:35:03.046Z","repository":{"id":12630056,"uuid":"15301352","full_name":"tripflex/whmcs-affcoupons","owner":"tripflex","description":"WHMCS Addon to allow clients/customers to give out promo codes (or coupon codes) instead of affiliate link.","archived":false,"fork":false,"pushed_at":"2020-12-26T18:31:16.000Z","size":1127,"stargazers_count":53,"open_issues_count":22,"forks_count":16,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-04-14T18:06:28.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://smyl.es/allow-customersclients-to-use-promo-codes-instead-of-affiliate-links-in-whmcs/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tripflex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-19T03:27:53.000Z","updated_at":"2024-04-14T08:00:59.000Z","dependencies_parsed_at":"2022-09-02T13:12:01.730Z","dependency_job_id":null,"html_url":"https://github.com/tripflex/whmcs-affcoupons","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripflex%2Fwhmcs-affcoupons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripflex%2Fwhmcs-affcoupons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripflex%2Fwhmcs-affcoupons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripflex%2Fwhmcs-affcoupons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tripflex","download_url":"https://codeload.github.com/tripflex/whmcs-affcoupons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225365879,"owners_count":17462975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T14:17:39.453Z","updated_at":"2024-11-19T14:17:40.167Z","avatar_url":"https://github.com/tripflex.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WHMCS Affiliate Coupons v2.1.2\n* Current Stable Version: 2.1.2\n* Author: Myles McNamara (get@smyl.es)\n\nForked from Affiliate Coupons 1.2\n-----\nAffiliate Coupons 1.2 - WHMCS Module\nWritten by: Frank Laszlo \u003cfrank@asmallorange.com\u003e\nLicense: SEE LICENSE FILE\n\nStarting with version \u003e= 2.1.0 is a complete rewrite of the code base.\n\n**MAKE SURE TO FOLLOW INSTRUCTIONS IF YOU ALREADY HAVE INSTALLED AN OLDER VERSION**\n\nTHIS PROJECT IS NO LONGER MAINTAINED OR UPDATED, PLEASE FEEL FREE TO FORK AS LONG AS YOU MAINTAIN LICENSE\n\n## Description\nThis module will allow coupon codes to be used instead of affiliate URLs\nfor granting referrals to your affiliates. This is handy for affiliates who\nadvertise \"offline,\" where it is much easier to give someone a coupon code\nrather than a long URL string for your referral. The coupons will also grant\nthe user a discount that can be defined by the administrator.\n\n### Screenshots\n\u003ctable\u003e\n\t\u003ctd width=\"50%\"\u003e\n\t\t\u003cimg src=\"https://smyl.es/img/Selection-1130x736-12.png\" alt=\"Admin Area View\"\u003e\n\t\u003c/td\u003e\n\t\u003ctd width=\"50%\"\u003e\n\t\t\u003cimg src=\"https://smyl.es/img/Selection-1002x631-11.png\" alt=\"Client Area Affiliates View\"\u003e\n\t\u003c/td\u003e\n\u003c/table\u003e\n\n## Prerequisites (required if upgrade from \u003c= v2.0.0)\nBefore installing this version you need to remove all the original files from WHMCS Affiliate Coupons \u003c= v2.0, this will not remove any database entries, and the new 2.1 version will work with all existing database entries.\n\nThe files you need to modify or completely remove include:\n\n* `affcoupons.php` this file has multiple vulnerabilities I **strongly** recommend removing it ASAP!\n* `aff.php` this file will not be needed in next release but for now remove it and we will replace with version included in this release\n* `templates/default/images/delete.png`\n* `includes/hooks/affcoupons.php`\n* `modules/admin/affiliate_coupons/` (remove entire directory)\n\n**YOU ALSO NEED TO REMOVE** this code from `templates/default/affiliates.tpl`\n\n```\n\u003c!-- BEGIN AFFILIATE COUPONS CODE --\u003e\n{php}\ninclude('affcoupons.php');\n{/php}\u003c\n\u003c!-- END AFFILIATE COUPONS CODE --\u003e\n```\n\nIf you do not remove the code above from that template you will get an error because that file is no longer used or needed.\n\n## Installation\nNow that you've removed all the files above we can start the installation of the new version.\n\nDownload the ZIP file from this link:\nhttps://github.com/tripflex/whmcs-affcoupons/archive/master.zip\n\nOpen the archive, and inside the `whmcs-affcoupons-master` folder should be the `modules` directory and `aff.php` file.\n\nCopy/Move the `modules` directory and the `aff.php` file to the root of your WHMCS installation.\n\nLogin to your WHMCS installation, go to the Addon Modules page, and activate the new module.\n\n## A Few Things To Know\nMake sure to check the admin page for Affiliate Coupons to see if updates are available, there will be a notification at top of page when a new version is available.\n\nWith this release almost everything has been redone code wise, including sanitizing and validating user data which was not done previously.\n\nThe affiliates page is now loaded using jQuery on the affiliates page, with the next release everything will be done through ajax on affiliates page.\n\nIf you want to provide direct link to just the affiliate promo code page, it is all contained on this page:\n\n`http://yourdomain.com/index.php?m=affcoupons`\n\nThis release loads that page using jQuery, selects the DIV for content, and then inserts it at the bottom of the Affiliates page.  When adding coupon, updating landing page, etc, from affiliates page it will POST to the `index.php?m=affcoupons` page.\n\n### PLEASE REPORT ANY BUGS OR ISSUES HERE ON GITHUB!\n\n## Compatibility\nSome themes have been reported to have issues with this addon.  This is **NOT** and I want to repeat, **NOT** an issue with Affiliate Coupons, it is the theme itself.  As long as your theme supports the standard default WHMCS module pages you should not have any problems.  Below you will find fixes for themes that have been found to have issues with supporting standard WHMCS module pages.\n\n### WHMCSThemes.com\n\nAdd this code to the top of your `header.tpl` file:\n\n```smarty\n{php}\n    if($_GET['m']) $this-\u003eassign('filename', 'modulepage');\n{/php}\n```\n\n\n## Changelog\n**v2.1.2**\n- Fix JS issue not detecting affiliates page\n\n**v2.1.1**\n- Updated WHMCSe Framework\n- Added update notice on dashboard\n- Fixed problems with HTTPS\n- Fixed problems with affiliate coupon output on affiliates.php\n\n**v2.1.0**\n- Codebase completely rewritten, not compatible with v2.0.0\n\n**v2.0.0**\n- Updated version 1 to support new versions of WHMCS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftripflex%2Fwhmcs-affcoupons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftripflex%2Fwhmcs-affcoupons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftripflex%2Fwhmcs-affcoupons/lists"}