Re: Snap Affiliates v2.0 for v1.5.0 and later
Thanks for a great plugin. My client wants the referrers to land on an other page then the homepage. Is it possible to change the URL of the page for all referrals? I've been through most of the php but can't find it. I know i can change it with the deeplink generator but my clients expects a vast amount of affiliates so preffers it automated.
Re: Snap Affiliates v2.0 for v1.5.0 and later
Quote:
Originally Posted by
dsvb
Thanks for a great plugin. My client wants the referrers to land on an other page then the homepage. Is it possible to change the URL of the page for all referrals? I've been through most of the php but can't find it. I know i can change it with the deeplink generator but my clients expects a vast amount of affiliates so preffers it automated.
Are you saying that you want a different landing page if the page access was made with the referrer parameter set? If so, you could make your modification to /includes/init_includes/init_snap.php to perform your custom redirect.
Code:
<?php
/*-----
** Initialize the session's referrer key.
*/
//-bof-v2.1.2a
if (!defined('SNAP_COOKIE_LIFETIME')) {
define ('SNAP_COOKIE_LIFETIME', 60*60*24*365);
}
//-eof-v2.1.2a
if( isset($_GET['referrer']) ) {
if( strpos($_GET['referrer'], SNAP_KEY_PREFIX) === 0 ) {
if( strlen($_GET['referrer']) < 24 ) {
$_SESSION['referrer_key'] = $_GET['referrer'];
setcookie("referrer_key", $_GET['referrer'], time() + SNAP_COOKIE_LIFETIME, "/"); /*v2.1.2c*/
//- Insert your custom redirect here
}
}
} else if( $_COOKIE['referrer_key'] ) {
if( strpos($_COOKIE['referrer_key'], SNAP_KEY_PREFIX) === 0 ) {
if( strlen($_COOKIE['referrer_key']) < 24 ) {
$_SESSION['referrer_key'] = $_COOKIE['referrer_key'];
}
}
}
Re: Snap Affiliates v2.0 for v1.5.0 and later
Thanks, but what should I put there? Just to be clear: all I want is a different landing URL for all referrers, thanks in advance
Re: Snap Affiliates v2.0 for v1.5.0 and later
Are you planning on creating a brand-new page for the landing or are you going to use an EZ-Page?
Re: Snap Affiliates v2.0 for v1.5.0 and later
preferably a brand-new page
Re: Snap Affiliates v2.0 for v1.5.0 and later
So, what you'd insert at the spot I indicated is
Code:
zen_redirect (zen_href_link (FILENAME_NEW_PAGE_NAME));
where you've previously set
Code:
define ('FILENAME_NEW_PAGE_NAME', 'new_page_name');
To create a new page is pretty easy, just follow the example provided by the "About Us" plugin.
Re: Snap Affiliates v2.0 for v1.5.0 and later
Re: Snap Affiliates v2.0 for v1.5.0 and later
Excellent! I'm glad you got it working.
Re: Snap Affiliates v2.0 for v1.5.0 and later
I've submitted v2.7.3 to the Plugins for review. This update adds the home-page link to the admin's Customers->Referrers page, making it possible for the admin to copy/paste the information.
Re: Snap Affiliates v2.0 for v1.5.0 and later
Is there anyway to give people a choice of either X dollars in cash or Y dollars in credit for our site?