menu
menu
Menu
Thanks again on this. It has turned into a good number of changes sprinkled around to really get this where I want (lots of tweaks on the views to show credits instead of dollars). The biggest change needed (so the "ajax_sell" modal would display instead of being redirected to the subscription page) was this: ``` --- a/app/Plugin/Subscription/Lib/SubListener.php +++ b/app/Plugin/Subscription/Lib/SubListener.php @@ -94,7 +94,8 @@ class SubListener implements CakeEventListener $helper->checkEnableSubscription()) { $subscribe = $helper->getSubscribeActive($cuser,false); - if ($e->params['plugin'] != 'subscription') + if ($e->params['plugin'] != 'subscription' && !($e->params['plugin'] == 'Credit' && $e->params['action'] == 'ajax_sell')) { if (!$subscribe) { ``` I threw in the check for "ajax_sell" so that even the normal "credits" page won't load for users -- no need for them to go there and/or deal with all the content there while their subscription needs to be renewed.
Thanks again on this. It has turned into a good number of changes sprinkled around to really get this where I want (lots of tweaks on the views to show credits instead of dollars).
The biggest change needed (so the "ajax_sell" modal would display instead of being redirected to the subscription page) was this:
--- a/app/Plugin/Subscription/Lib/SubListener.php
+++ b/app/Plugin/Subscription/Lib/SubListener.php
@@ -94,7 +94,8 @@ class SubListener implements CakeEventListener
$helper->checkEnableSubscription())
{
$subscribe = $helper->getSubscribeActive($cuser,false);
- if ($e->params['plugin'] != 'subscription')
+ //var_dump($e->params);
+ if ($e->params['plugin'] != 'subscription' && !($e->params['plugin'] == 'Credit' && $e->params['action'] == 'ajax_sell'))
{
if (!$subscribe)
{
Thanks again on this. It has turned into a good number of changes sprinkled around to really get this where I want (lots of tweaks on the views to show credits instead of dollars).
The biggest change needed (so the "ajax_sell" modal would display instead of being redirected to the subscription page) was this:
--- a/app/Plugin/Subscription/Lib/SubListener.php
+++ b/app/Plugin/Subscription/Lib/SubListener.php
@@ -94,7 +94,8 @@ class SubListener implements CakeEventListener
$helper->checkEnableSubscription())
{
$subscribe = $helper->getSubscribeActive($cuser,false);
- if ($e->params['plugin'] != 'subscription')
+ if ($e->params['plugin'] != 'subscription' && !($e->params['plugin'] == 'Credit' && $e->params['action'] == 'ajax_sell'))
{
if (!$subscribe)
{
Thanks again on this. It has turned into a good number of changes sprinkled around to really get this where I want (lots of tweaks on the views to show credits instead of dollars).<br>
<br>
The biggest change needed (so the "ajax_sell" modal would display instead of being redirected to the subscription page) was this:
--- a/app/Plugin/Subscription/Lib/SubListener.php
+++ b/app/Plugin/Subscription/Lib/SubListener.php
@@ -94,7 +94,8 @@ class SubListener implements CakeEventListener
$helper->checkEnableSubscription())
{
$subscribe = $helper->getSubscribeActive($cuser,false);
- if ($e->params['plugin'] != 'subscription')
+ if ($e->params['plugin'] != 'subscription' && !($e->params['plugin'] == 'Credit' && $e->params['action'] == 'ajax_sell'))
{
if (!$subscribe)
{
I threw in the check for "ajax_sell" so that even the normal "credits" page won't load for users -- no need for them to go there and/or deal with all the content there while their subscription needs to be renewed.