Woocommerce Book Store Documentation

Introduction

WooCommerce Bookstore extends WooCommerce functionality and let you sell Books into your e-shop. Once activated, the plugin creates a new Product Type called Book. Each book has its own attributes such as Author, Publisher and much more!

This plugin works with the open-source WooCommerce Plugin.

Minimum Requirements

  • PHP 4.3
  • WordPress 4.3
  • WooCommerce 2.x
  • Javascript/ jQuery

 

 

 

Back To Top

Installation

The installation process is exactly the same with any other WordPress plugin.

Install by ZIP File

  • Go to WordPress dashboard > Plugins > Add New
  • At the top of the page select Upload.
  • Browse in computer files and find the file named ‘woocommerce-bookstore.zip’ and click the Install Now button
  • Once installation is complete, activate the plugin.

Install by FTP

  • Find the directory titled ‘woocommerce-bookstore’ and upload it using an FTP client to the destination: (/WORDPRESS-DIRECTORY/wp-content/plugins/)
  • Go to WordPress dashboard > Plugins > Installed Plugins
  • Locate the added plugin and click activate.

Back To Top

Custom Fields

Edit Custom Fields

Go to WordPress Dashboard > WooCommerce > Bookstore. In this screen Shop Manager is able to manage settings for Book’s custom fields.

Columns explained:

  • Name: the desired name for the custom field
  • Type: choose between text, number, date, textarea
  • Unique: define whether the field has unique values e.g. ISBN
  • Meta Key: the meta key name stored in database
  • Length: enter how many characters the field has
  • Class: css classes for the front end
  • WP Style: choose how this field would you like to be displayed in product edit page
  • Visible: check if you would like this field to be visible or not in the front end
  • Sort: sort fields in the desired order

bookstore-custom-fields

Edit Product/Book

Once you’ve finished go to edit product screen. WooCommerce Bookstore Plugin creates a new Product Type called Book.

product-type-book

When Product Type Book is selected a new tab opens in order to enter Book Details.

book-admin-tab

In this screen you will see every Custom Field you’ve created for the book.

Back To Top

Advanced Search

A very useful feature is the Advanced Search Form offered from plugin. You are able to search via every Book’s taxonomy and custom field.

Go to WordPress Dashboard > WooCommerce > Bookstore and press the second tab with title Advanced Search. In this screen you will see a table with all the custom fields you’ve created so far.

Use shortcode [woo_bookstore_advanced_search] to display the Advanced Book Search Form.

advanced-search

Columns explained:

  • Enable: check if you want this field to be displayed in search form
  • Name: this is the name of the custom field.
  • Label: the label of the input in the form
  • Type: there are three (3) types of output: multiselect, select and text.
  • Class: enter additional classes for the frontend
  • Autocomplete:check if you want this field to be autocompleted
  • Sort: drag & drop to define the fields order in the form

If you want to use advanced search in widget area you should pass another parameter like this: [woo_bookstore_advanced_search widget=1]

Back To Top

Settings: Bookstore

Go to WordPress Dashboard > WooCommerce > Settins > Bookstore. In this screen you are able to setup several Bookstore’s options.

bookstore-settings

Book Single Page

Enter settings for the Single Book page

  • Book Details Tab: check if you want to the to display book details as Product tab
  • Tab Priority: priority in product tabs
  • Book Details: if you do not want to use product tabs in order to display Book Information select here where would you like to be displayed

Author Settings

Author settings for the Single Book page

  • Show Author Bio: check if you want to display author’s bio
  • Display Type: select whether you would like to be displayed in a separate product tab or after book details
  • Tab Priority: if displayed in a tab then enter the priority
  • Show Author Thumbnail: Check if you would like to show Author’s Thumbnail

Publisher Settings

Publisher settings for the Single Book page

  • Show Publisher Bio: check if you want to display publisher’s bio
  • Display Type: select whether you would like to be displayed in a separate product tab or after book details
  • Tab Priority: if displayed in a tab then enter the priority
  • Show Author Thumbnail: Check if you would like to show Publisher’s Thumbnail

Permalinks

Here you are able to edit permalinks for book’s taxonomies.

Remember to resave permalinks after changing taxonomy slugs.
If you are using WPML you should insert slugs in English.

Bookstore Pages

In this section you are asked to enter some pages that WooCommerce Bookstore is going to use.

  • Bookstore: archive page. This is the page that will contain [woo_bookstore_catalog] shortcode
  • Advanced search: the main Advanced Search page. This is the page that will contain [woo_bookstore_advanced_search] shortcode
  • Search everywhere: this option is useful when you do not want to use advanced search page provided by our plugin. For example if you would like the user to be redirected to your main eshop page after search. After you’ve checked this option make sure to select the desired page in previous dropdown “Advanced search”.

Images | Settings

Enter here the desired image sizes for Authors, Book Categories, Publishers. If you are not sure use 400×600 and uncheck Hard Crop.

Styling | Settings

  • Use default css: if you would like to customize Bookstore pages uncheck this.
  • jQuery UI css: plugin user jQuery UI for autocomplete in Advanced Search Form. The theme that is being used is Flick. Uncheck if you want to use your own style

You should have basic knowledge of HTML, CSS and WordPress Theming if you would like to uncheck those options below.

Advanced Settings

In most of the cases Bookstores have thousands of Books and as a result your Website’s performance might be affected. WooCommerce Bookstore offers its own caching system in order to fetch results as fast as possible.

Options explained:

  • Enable Cache: check to enable cache.
  • Cache lifetime: enter how many seconds you would like book data to be cached.
  • Purge Cache: check if you would like to purge cache every time you create or update a Book.
  • Empty Cache: manually empty cache.

Export Books

Use this option if you wish to export your books in a csv file. Once you’ve created file it will be available for download.

Back To Top

Themes

Our plugin works with any theme compatible with WooCommerce. Please refer to Developers section for information about template structure. You may contact us if you need advanced modification.

There are thousands of themes to choose for your website. That’s why we love WordPress! Unfortunately we are not able to test every single of them if there are compatible with WooCommerce Bookstore plugin. If your theme is compatible with WooCommerce going to be compatible with our plugin as well. If you are experiencing conflicts with your theme and Bookstore Plugin you are able to Hire  a WPini developer in order to make your theme compatible 100%.

Back To Top

Translate

You are able to translate plugin using mo files. Plugin is fully compatible with WPML.

If you want to use plugin with WPML you should enter all strings in English, no matter which language you’ve set as default. All book’s custom fields and texts should be translated via WPML String Translation.

Back To Top

Developers

This plugin is built for Developers. In this section we are going to explain plugin’s Template Structure and Action Reference. We are happy to hear your feedback in order to improve plugin’s Customization!

Template Structure

The plugin works with every WP Theme that supports WooCommerce. WooCommerce Bookstore though has its own template structure and lets you easily create your own unique theme by overriding them!

bookstore
--advanced-search.php
--book-taxonomy-thumbnails.php
--taxonomy-book_author.php
--taxonomy-book_category.php
--taxonomy-book_publisher.php
--woo-bookstore-catalog.php
--woo-bookstore-pagination.php
            
single-product
--tabs
----tab-author.php
----tab-book.php
----tab-publisher.php
--add-to-cart
----book.php

Copy the file you would like to override in your theme folder.

If you would like to override advanced-search.php page copy from plugin-folder/template/bookstore/ to your-theme-path/woocommerce/bookstore/

Action Reference

 

Hook Type File(s)
woo_bookstore_query_args filter lib/ajaxfront-end.php,woocommerce/classes/wb-advanced-search.php,woocommerce/classes/wb-book-shortcodes.php
woo_bookstore_default_fields filter settings/custom-fields.php
$taxonomy_thumbnail_size_listing filter template/bookstore/book-taxonomy-thumbnails.php
$taxonomy_archive_count filter templates/bookstore/book-taxonomy-thumbnails.php
book_advanced_search_$key_get_terms filter woocommerce/classes/wb-advanced-search.php
woo_bookstore_html_field filter woocommerce/classes/wb-advanced-search.php
woocommerce_bookstore_available_shortcodes filter woocommerce/classes/wb-book-shortcodes.php
register_taxonomy_$key filter woocommerce/classes/wb-book-taxonomies.php,woocommerce/classes/wb-book-taxonomy-images.php
woo_bookstore_taxonomy_$key_widget_dropdown_args filter woocommerce/classes/widgets/wb-taxonomy-widget.php
woo_bookstore_taxonomy_$key_widget_args filter woocommerce/classes/widgets/wb-taxonomy-widget.php
woo_bookstore_book_dropdown_$key_get_terms_args filter woocommerce/lib/functions.php

Conditional Tags

is_book()
is_book_author()
is_book_category()
is_book_publisher()

API

Display book details

if( function_exists( 'woo_bookstore_display_book_details' ) )
    woo_bookstore_display_book_details( ID );

 

Back To Top

Shortcodes

Go to WordPress Dashboard > WooCommerce > Boostore > Shortcodes. In this screen you will see all available shortcodes.

 

Back To Top