Self-Publishing

Toolset Contractor

WP-CUSTOMTYPES ͡° ͜ʖ ͡°

We used: Types, Views, Layouts, Forms, Toolset Starter Theme, Toolset Forms Commerce, Toolset WooCommerce Views

Overview

The customer wanted an innovative book shop where authors can publish and sell their own e-books. We therefore built an online shop which included a private area for registered users where they can upload and manage their books. The main challenge of creating this site were the two different selling processes: both selling books to the public and selling special services (for example: ISBN registration, file conversion to e-book) to authors/subscribers.

Design-wise, the customer’s wish was to mimic the style of the iTunes shop, surely one of the best book shops on Internet.

Basic setup

The basic setup of the e-shop was Toolset Starter Theme, WooCommerce, Toolset and Profile Builder.

Data set

We created the Author CPT and set it as Parent of Products CPT. This is because the customer wanted to list books for each author and also add information about the author. We didn’t use the User Custom Type to do this because the customer wanted a single user to be able to create more than one author, and for each author to be able to publish as books as books they want.

We created few custom fields for the CPT product. The site is selling e-books so we added fields for different file formats: ePub, Mobi and PDF. We added some other specific fields like ISBN, Release date, etc.

We used product category to classified books by genres and we also added a special category “Services” to exclude special products for subscribers from the public front-end and display them only on the private front-end area.

Public Front-end

We set up the site design using Layouts, and we created a basic parent layout to display header menu, main content and footer. We then created layouts for each section of the website.

We created archive pages with views, pages and widgets to display products by category or other criteria. We also created the single product page with the cart button and we customized the checkout page.

Private Front-end

We set up a private area on the front-end where subscribers can create new authors, and add and upload books associated with each author. We built this with some nested views, checking the logged user and by some Toolset form to create/edit authors and products.

The new book creation is a free special product, we used WooCommerce Views to place the free order and send the user to the checkout process after submitting a new book.

We also customized the create product form with a widget that offers the option to select some of the special services. So if a user selects a service, it willl be added to the cart and listed on the checkout page.

We had to work with some Forms and WooCOmmerce PHP hooks to get the final result.