Some final touches before the Stripe integration
Over the course of this last update more and more minor errors began popping up. One horrible error that took a while to fix was that new users could not access their profile because they did not have any likes or comments. This was a very strange issue but it has been fixed and more functions have been put into to place to keep things like this from happening. Overall, this is a very minor update, but it is in preparation for integrating Stripe credit card payments to the site.
Premium Landing PageThe premium landing page (canaryjones.com/premium) now displays three editable parts. The top section is a title and introduction to the premium subscription. The middle section displays the available pricing options, and bottom will show more information and disclaimers. The top and bottom sections of the page can be edited in the “Edit Page Parts” section of the admin dashboard. The pricing section can be edited from the “Edit Subscription” section of the admin dashboard. Once a user clicks on one of the pricing options on the premium landing page they will be redirected to a checkout page (if they are logged in to an account). It is worth noting that user’s will have to agree to the terms and services, as well as understand that terms and conditions apply when they subscribe to the site.
More Pricing optionsNow pricing options can be in days or months rather than just months. This opens the door to a one time 14-day subscription or something along those lines. Once Stripe is integrated into the site, there may be an option for recurring billing and the pricing options will be adjusted to make this option available to each price.
Dev ToolsViewing and fixing certain site errors has been a difficult process once the site is online. To help the bug fixing process a development tools section has been added to the admin dashboard. These tools are irrelevant to most, but have their uses and will make it easier to test certain functions. Right now, the dev tools section features 3 tabs: error logs, server info, and expiration checker. The error log tool will display any of the error logs located on the server. This makes it much more accessible to view errors that are popping up across the site. The server info tool displays every parameter of the global server variable, and the expiration checker is just for testing the create expiration function.
Subscription FunctionsTo help test the site-wide subscription functions, admins can grant a free subscription to any user and cancel it. Once a subscription is cancelled, the user’s subscription expiration date is set to the moment that the function runs. As a result, the next time they log in or access the site, they will be demoted from a subscriber back to a user. Subscription demotion functions have been placed on the profile, view, home, and premium page to check if a user’s subscription has expired.
Other Fixes- Pop-up windows are now taller.
- Some inline functions have been converted to shorthand ternary operations.
- Depreciated and unused functions have been removed.
- Loader files now can not be accessed directly.