## Installation Instructions ##


# Copy the min_cancel_notice folder to your WHMCS's modules/addons/ folder. 
# Ensure the proper permissions are set for your environment for the folder and the php files inside of the min_cancel_notice_folder.
# Active the Module in WHMCS by going to Setup->Addon Modules in your WHMCS Admin area, find Min Cancel Notice and click activate.
# Next, click configure next to Min Cancel Notice and grant access to the administrator groups that should have access to the admin area interface.
# If you would like to set a minimum cancellation notice requirement for all of your products, enter this value into the Default Number of Days Notice Required field
  Otherwise leave this option blank.

# You can set minimum cancellation days notice for each product by going to Addons->Min Cancel Notice.
   #Select the Package the minium should apply to and then enter the number of days notice you require for cancellation for that package and then click the add/update button.
   #If you need to change an existing value, simply select the product from the drop down box and enter the new value and click the add/update button.
   #These minimums can be removed by clicking the delete link next to the limit to remove.
   

# Finally, in order for this module to work, you will need to update your clientareacancelrequest.tpl file for the template that you use. 
  # A sample clientareacancelrequest.tpl file which uses the default 5.2 theme has been provided which you can simply copy over to your templates directory replacing the existing file. 
    #If you are using a different theme, follow the instructions below.
    
    Find the cancel form in the clientareacancelrequest.tpl and add the following smarty tag before the form tag:
    {if $allow_cancel}
    
    
    Then find the </form> tag and add the following after it, you can change the style and text to match your theme:
    {else}
    <div class="alert alert-warning">
    <p>Cancellations must be submitted no later than {$number_of_days_notice} days prior to your next due date which is {$next_due_date}.</p>
       <input type="button" value="Back to Product Details" class="btn" onclick="window.location='clientarea.php?action=productdetails&id={$id}'" />
    </div>
   {/if}
    
  # If you run into any problems making these changes to your clientareacancelrequest.tpl, feel free to email us at support@serverping.net and send us your clientareacancelrequest.tpl file and we can 
    do this for you.
    

