Thank You Template logic

4 replies [Last post]
jaybee
Offline
Joined: 08/14/2009
Status: 
Answered

Hi Leighton,

Not sure if this is a feature-request or a bug. I had a test subscriber who's subscription expired. When re-subscribing, the Thank You page just shows the text 'Thank You' - with no other text. Looking through the template file, there are rules for modified subscriptions, auto login and a global 'please check your mail' type. However, in my test case, the user was already logged in, so was an authenticated user but had no subscriber role. In this case I would like to output a 'Thanks for re-subscribing'  message, but I'm not sure this can be triggered based on the variables available.

 

Can you advise?

 

Thanks

Leighton Whiting
Offline
Joined: 06/02/2009
Jaybee, Re-Subscribers are

Jaybee,
Re-Subscribers are treated simply as new subscribers in both the Paypal and Drupal systems, since the Subscription ID of the old one is not re-used, but rather a new subscription is created. As such, there is not straightforward way to tell if a user is re-subscribing or not. One thing that I can and probably will do is check if the user has previously been subscribed to the subscription plan for which the new subscription is being created, and institute a new variable $isResubscribe to designate when a user is resubscribing. I will try and get this in the next release as a Feature Request.

Sincerely,
Leighton Whiting

jaybee
Offline
Joined: 08/14/2009
 Thanks Leighton, that will

 Thanks Leighton, that will be useful, however in my particular instance, since I am also migrating users from a previous site, some of my 'expired' subscribers will not already have a PayPal subscription, so for these I would like to be able to output a thankyou message too.

I need to understand why the catch-all logic in the template (the else condition below) didn't appear to fire correctly as no additional text other than 'Thank You' appeared (see attached screenshot).

 

<?php } else { ?>

<div class='psThankYouText'>

  Your payment has been received. Please check your email for further instructions.

</div>

 

I also tried putting in a custom page on the 'Advanced Settings' of a subsciption (the full url to the page including http:// etc), but still got this blank Thank You! page.

AttachmentSize
thankyou.JPG 28.97 KB
Leighton Whiting
Offline
Joined: 06/02/2009
Jaybee, I see what is

Jaybee,
I see what is happening, and it was an error in my code. I have fixed it and added an $isUpgrade variable to the Thank-You page template, you should be able to use this to catch your resubscribers. I will get this released tonight since it has bug fixes.

Sincerely,
Leighton

jaybee
Offline
Joined: 08/14/2009
Thanks Leighton - you really

Thanks Leighton - you really do provide excellent support. 

Twitter Feed