You are currently viewing Migrating LMS Data from SHOPP to WooCommerce Plugin
Migrating-LMS-Data-from-SHOPP-to-WooCommerce-Plugin

Migrating LMS Data from SHOPP to WooCommerce Plugin

  • Post published:August 4, 2016

vteam #335 developed a learning management system (LMS) using WordPress and Shopp plugin as per the client’s requirements. The LMS itself comprised of the following features:

  • A Shopping Cart for virtual courses
  • Real-time Progress Tracking
  • User Management
  • Course Management
  • Order Management
    .

The website had a large number of subscribers as well as order information. Since the shopp plug-in became obsolete, it could not work with the latest versions of PHP and other upcoming technologies like Stripe.

The client required a state of the art checkout solution, like Stripe integration, in the website. But this integration was not possible since the current Shopp plug-in’s version wasn’t compatible with the system. This transition would be very tricky as vteam #335 had to update the complete core code of Shopp plug-in, along with related database schema, and deal with a large number of data (courses and orders).

vteams engineer Abdullah proposed a solution to upgrade the main shopping cart support and the client agreed. It was decided to use the latest version of WordPress and the most popular WooCommerce plug-in for shopping cart instead of the Shopp plug-in’s latest version.

Solution

First step was to integrate WooCommerce and then shift the data like courses, coupon codes, orders, coupon code used history from Shopp to WooCommerce. Abdullah upgraded the system using the steps mentioned below:

  • Several export scripts were created after exploring the structure of WooCommerce and way/method of saving orders and courses in the database. Now, those scripts were run in many chunks from Shopp to WooCommerce.
  • SQL queries were run using WPDB class object to grab all course information from Shopp table. Additionally, custom post type entries were created for WooCommerce courses.
  • Similarly, all coupon codes were imported from Shopp to WooCommerce using WPDB class object.
  • To grab chunks of orders from Shopp, SQL queries were run by using WPDB class object. After that, custom post type entries were created for WooCommerce orders and then calculated. All the order items were then added in each WooCommerce order from Shopp tables.
  • Before calculating the order total, any coupon code (if added) was checked. In this scenario, WooCommerce applies a coupon code method to systematically make the exact same entries.
    .

After this, the remaining web pages like courses catalog, cart and checkout pages were developed to the client’s specifications with all previous functionality. The difference was that all these pages were now WooCommerce compatible. After set-up was completed, Stripe add-on was integrated for the checkout using WooCommerce.