Statistics: Posted by Raam Dev — November 20th, 2011, 3:45 pm
...
if(!in_category('premium', $id_attempt)) {$purchase_page = "uri_buynow_page_purchase"; }
else $purchase_page = "uri_default_membership_page_purchase";
...
Statistics: Posted by Dave72 — November 20th, 2011, 1:19 pm
<?php
// Check if this is a redirect from a restricted page
if(isset($_GET['s2member_seeking'])) { $url_attempt = $_GET['s2member_seeking']; }
if($url_attempt){
// Extract the Specific Post/Page ID that the user is attempting to access
$url_attempt = str_replace(" ", "", $url_attempt);
$id_attempt = explode("-", $url_attempt);
$id_attempt = $id_attempt[1];
if(is_numeric($id_attempt)){
// Check if the Specific Page/Post ID is one that
// we want to redirect to its own Purchase Page.
// You can add new case statements for every page
// that you want to redirect. Make sure the case
// statement ends with break;
switch($id_attempt) {
case "12214": // Specific Page/Post ID
$purchase_page = "http://example.com/purchase-page-for-12214/"; // Purchase page
break;
case "12315": // Specific Page/Post ID
$purchase_page = "http://example.com/purchase-page-for-12315/"; // Purchase page
break;
default: // Always leave this here
$purchase_page = "";
break;
}
// If we need to redirect
if(trim($purchase_page) != "") {
// Use JavaScript to redirect to the correct purchase page
?>
<script type="text/javascript">
<!--
window.location = "<?php echo $purchase_page; ?>";
//-->
</script>
<?php
}
}
}
?>
Statistics: Posted by Raam Dev — November 19th, 2011, 7:08 pm
Statistics: Posted by Dave72 — November 19th, 2011, 4:29 am
Statistics: Posted by Dave72 — November 18th, 2011, 3:35 pm