What can we do to make it easier to design with Wild Apricot?

turn off renewal button in profile

Hello, I'm responding to an earlier wishlist (#19563). Maybe it's already been addressed by I haven't seen it. The problem is currently a member can keep on renewing and paying, through his profile, for many years in advance. As the earlier ticket said, it would be great if the admin could turn on the Renewal button a certain time ahead of the renewal date. And after the member renewed and paid for THAT year, the button would then go away. Otherwise we'll have to refund those extra years dues.

Please, do you know a way around this problem? We are getting ready to go live soon and this would save a lot of headache. Thanks for your help.

0 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    cstevenscstevens shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    19 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • USDXUSDX commented  ·   ·  Flag as inappropriate

        Should not be that hard

        What is the elementid for the profile form, the Renewal Due date and the value recorded the Membership level as the number of days notice of renewal?

        You take the Membership Level Renewal Due date - the number of days and if Today is greater-than or equal to (<=) you display it else you hide it.

        If you want to over-ride this feature.then you could provide a tick box in the Membership Level properties record

        Should take all of 2 hours. I fact it should have been addressed in development.

        OK I managed to get a rough cut of a script that does the job but not as nice as I would like

        I really want it to pull down the renewal period from the Level properties

        Here is my code

        <!DOCTYPE html>
        <html>
        <body>

        <div id="idExpirationDateContainerHolder">
        <div id='idExpirationDateContainer' class='fieldContainer simpleTextContainer' ><div class='fieldSubContainer labeledTextContainer'><div class='fieldLabel'>
        <span id="FunctionalBlock1_ctl00_ctl00_Membership_titleExpirationDate">Renewal due on</span>
        </div><div class='fieldBody'>
        <span id="FunctionalBlock1_ctl00_ctl00_Membership_viewExpirationDate">01-Jul-2015</span>
        </div></div></div>

        <div class="actionButtonContainer"><input type="submit" name="FunctionalBlock1$ctl00$ctl00$Membership$RenewalButton" value="Renew until 01-Jul-2016" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("FunctionalBlock1$ctl00$ctl00$Membership$RenewalButton", "", true, "", "", false, false))" id="FunctionalBlock1_ctl00_ctl00_Membership_RenewalButton" class="typeButton" /></div>
        </div>

        //SCRIPT CODE STARTS HERE

        <script type="text/javascript">

        if (document.getElementById('idExpirationDateContainerHolder'))
        {

        var RenewalButton = document.getElementById('FunctionalBlock1_ctl00_ctl00_Membership_RenewalButton');
        var RenewalDate = document.getElementById('FunctionalBlock1_ctl00_ctl00_Membership_viewExpirationDate');

        if (RenewalDate && RenewalButton)
        {

        var d = new Date();
        var RenewBeforeDays = new Date(31*60*60*1000*24); // This is hard coded should be derived from the Level properties sheet
        var DueDateString = RenewalDate.innerHTML;
        var DueDateString = DueDateString.replace("-"," "); // This is because of my date format
        var DueDateString = DueDateString.replace("-"," "); // second parse to remove the "-"
        var ms = Date.parse(DueDateString);
        var DueDate = new Date(ms);
        var RenewAfterDate = new Date(DueDate-RenewBeforeDays);
        if (RenewAfterDate >= d) { RenewalButton.style.display = 'none';};

        }
        }
        </script>
        </body>
        </html>

      • USDXUSDX commented  ·   ·  Flag as inappropriate

        Should not be that hard

        What is the elementid for the profile form, the Renewal Due date and the value recorded the Membership level as the number of days notice of renewal?

        You take the Membership Level Renewal Due date - the number of days and if Today is greater-than or equal to (<=) you display it else you hide it.

        If you want to over-ride this feature.then you could provide a tick box in the Membership Level properties record

        Should take all of 2 hours. I fact it should have been addressed in development.

        MEMBERSHIP LEVEL PROPERTY SHEET

      • Fluid ApricotFluid Apricot commented  ·   ·  Flag as inappropriate

        We just started analysis of this feature and we hope to address this in ver 5.3 (towards the end of this year, see this roadmap post http://forums.wildapricot.com/forums/308932-wishlist/suggestions/8827717-roadmap-2015-plans-releases-expected-dates ). The previously supplied workaround was only applicable to previous versions of Wild Apricot, it requires significant changes to work in the new version.

      • USDXUSDX commented  ·   ·  Flag as inappropriate

        I tried the code but it did not work. Why not use the field dates offsets in the Membership level email settings?

      • USDXUSDX commented  ·   ·  Flag as inappropriate

        I was amazed that the renew button is displayed.

        This is a major flaw in the Apricot work flow

        I would like the renew description button to only appear when the current date is after the due date plus the nominated renewal notice period in the Membership Subscription.

        This is a no brainer and the control fields are there.

        Apricot MUST act on this one quickly, Not a big change should take all of one hour.

      • MPAMPA commented  ·   ·  Flag as inappropriate

        Is there a way to customize this code to hide the renewal button ONLY for a specific membership level??? Thanks for any info you can provide!

      • VCOMAVCOMA commented  ·   ·  Flag as inappropriate

        We have a slightly different problem but along the same lines. We need the ability to turn off renewal on only certain members (those that have left their firm or the industry).

        Also, I think much of the above would be solved if my previous wishlist item happened. Renewals should be authorized by the admin just as new applications are before they are active for the new dates.

      • Jarren KinchJarren Kinch commented  ·   ·  Flag as inappropriate

        Awesome. Thank you for this script!

        I had customized the login area to include a link to renew (http://help.wildapricot.com/display/DOC/Log+in+form+gadget ), and so I added a bit to this script to hide both renewal buttons.

        For anyone else who has made the same modification, just edit this bit of code:

        if (theDiff > (DaysBefore + 2)) { RenewalButton.style.display = 'none'; }

        to become:

        if (theDiff > (DaysBefore + 2)) { RenewalButton.style.display = 'none'; RenewLinkInLoginBox.style.display = 'none'; }

        Now both buttons are hidden until a month before the renewal is due and I don't have to worry about early renewals!

      • grggrg commented  ·   ·  Flag as inappropriate

        Just an FYI, watch the code that converts the renewal date to an actual computer date for comparison. The code provided assumes a format other than MM/DD/YYYY and will not work if you switch to this format.

      • Dale KoetkeDale Koetke commented  ·   ·  Flag as inappropriate

        Jim - first off, thank you for sharing this. The inability to disable member renewal is a big headache for our organization. Our scenario is a bit different and I was wondering if you'd be good enough to offer a slightly different version of the script. Could you provide a script where the input arguments are simply date ranges where registration is not allowed?

      • anonymous_96.44.245.50anonymous_96.44.245.50 commented  ·   ·  Flag as inappropriate

        For those using the Granite or Business casual themes, you will need to alter one line to make the code work.

        Replace: if (document.getElementById('idLoggedName'))

        With: if (document.getElementsByClassName('loginBoxUserName'))

      • grggrg commented  ·   ·  Flag as inappropriate

        Any updates to this script? I just tried this on the latest version and function does pass the if (document.getElementToRenew....)

        Greg

      • Fluid ApricotFluid Apricot commented  ·   ·  Flag as inappropriate

        A workaround you can use is to add a script that will only show the renewal button xx days before renewal is due and automatically hide it after renewal. Insert the following script in "Settings -> Global javascript":

        <script type="text/javascript">
        function AllowedToRenew(SubscriptionPeriod, DaysBefore)
        {
        try
        {
        if (document.getElementById('idLoggedName'))
        {
        var RenewalButton = document.getElementById('ctl00_ContentArea_MemberProfile1_Membership_RenewalButton');
        var RenewalDate = document.getElementById('ctl00_ContentArea_MemberProfile1_Membership_viewExpirationDate');

        if (RenewalDate && RenewalButton)
        {
        var myString = document.getElementById('ctl00_ContentArea_MemberProfile1_Membership_RenewalButton').value;
        var SplitString = myString.split(" ");
        var StringDate = SplitString[3] + " " + SplitString[2] + "," + " " + SplitString[4];

        var NextRenewalDate = new Date(StringDate);
        var CutOffDate = new Date();
        CutOffDate.setDate(CutOffDate.getDate() + SubscriptionPeriod);
        var one_day = 1000*60*60*24;
        var theDiff = Math.ceil((NextRenewalDate.getTime() - CutOffDate.getTime())/(one_day));

        if (theDiff > (DaysBefore + 2)) { RenewalButton.style.display = 'none'; }
        }
        }
        }
        catch(err) {}
        }
        AllowedToRenew(365, 30); // replace these 2 values only
        </script>

        - Just replace the last line with your subscription period (in days) and number of days before renewal is allowed. e.g. in above the subscription period is 365 days and renewal is only allowed 30 days before renewal date.

        - This assumes your renewal period is the same for all members

      • Mike WillisMike Willis commented  ·   ·  Flag as inappropriate

        Yes I agree this is the 1 major weakness in the membership platform.

        We would love the ability of being able to lock down renewal dates either by an "On / Off" button or indeed an XX days before renewal.

        We renew all members at the same time once per year, and this would allow us to set the renewal dates as the date that renewals are due and then enter the number of days before that it is allowed.

        I also agree that it is important that within this time members are only able to renew their membership once, to prevent errors happening.

        The limitation of using the CSS code is that everyone will not be bale to see the button - whereas you really wan those that have since renewed not to see the button.

      • camdiloocamdiloo commented  ·   ·  Flag as inappropriate

        My client also needs this functionality. I'd love to only see the renewal button once the renewal notifications go out for a member level.

      • skipatskipat commented  ·   ·  Flag as inappropriate

        I also would like the ability to control when the renewal button is available.

        Thanks for the custom code which I will try, but I would prefer a better solution.

      • cstevenscstevens commented  ·   ·  Flag as inappropriate

        Thanks, Phil. Will use your CSS code. Currently have been setting members' renewal period to never, after they're activated - but this is better. Yes, I'm worried about our members renewing and paying for multiple years! Even though I plan to tell them not to, expect some still will. Refunding their money throught Google Checkout will get very expensive!

        Please, Wild Apricot! Allow the admin to:
        1) Specify the time period the Renewal button is visible in Profile, and
        2) Specify the time period for renewal. And after the member renews, the button goes away, to prevent unwanted renewals!!

      • philswallowphilswallow commented  ·   ·  Flag as inappropriate

        Until the Apricots manage to give us more control over the 'Renew until' button on the Member's Profile page, on my site I have hidden it by adding the following CSS to the Advanced Customisation (CSS) page:#ctl00_ContentArea_MemberProfile1_Membership_RenewalButton

        {
        display:none;
        }

        It's not ideal and I hope the Apricots will give us more control soon. As a minimum I would like to see that renewal can only be done once per period e.g. in a yearly subscription scenario, a member can only renew one year ahead. Next would be to be able to turn it on and off with a tick box e.g. only when the dues for the next period have been agreed and entered.I don't think of this matter as a 'nice-to-have' - a smart member could renew their membership 5 years ahead at current prices, knowing that prices were about to rise, thus losing the organisation money. It probably amounts to a commercial contract if a member follows through the online process at the prices quoted and a court would probably back them up. It would at the very least cause awkwardness between administration and membership IMO.

        Phil Swallow

      Feedback and Knowledge Base

      Wild Apricot Inc. 144 Front Street West Suite 725, Toronto, Ontario, Canada M5J 2L7