Coseva WordPress Plugin
SUMMARY Coseva is a multi-level marketing company focusing on wellness products. They needed an API integrated for WordPress that would allow distributor analytics and commissions to be recorded for marketing and sales purposes. CHALLENGES We broke down this project in 4 specific tasks or challenges.
- Each individual distributor needed their own mini portal and a way to access to access that portal via a URL like kelly.coseva.com.
- Managing the portal template to change data according to what distributor was being accessed.
- Managing session cookies for each distributor so that after visiting the distributor portal once and then leaving, the distributor would get credit for the sale even if the user accessed another portal.
- Changing the API from a PHP API integrated directly to a REST API to be used with secure AJAX calls
- To create reusable code that will allow for quicker development cycles in the future.
- To separate different aspects of the code. We used an MVC(Model-View-Controller) Design. This design pattern allows cleaner code which results in faster development and lower development costs.
- To create less complicated code and loose coupling – when code gets unnecessarily mixed in with design and data structures it creates an unnecessary complexity that perpetuates itself and only grows more complex. When this happens, the smallest bug can cause the whole system to collapse. The goal is to compartmentalize each part of the code so that if one part fails it does not affect the system as a whole.