Widget Factory

Last updated on Thursday, March 03, 2016

While every new site is unique, a common trend in our customer requests is the need to build and customise specific functionality into a BC site, that is not available out of the box. Here's just a few examples:

  • Complex searches
  • Certain AJAX behaviors
  • Specific filters
  • Order statuses

It thus seems like a great time-saver to skip the development/implementation process and just activate any specific feature in a quick way, like a quick copy-paste. You would then be able to focus only on customizing the look&feel, knowing that otherwise, it just works.
With this in mind, we started a small project called Widget Factory.


What is a Widget?

In a nutshell, a widget is a specific feature or functionality that you can add to a page on your site (front-end) in 2 easy steps:

  1. upload the widget files to your site
  2. paste a line of code where you want the widget to appear (in a page, template or layout)

For example, to add a complex blog post search to your site, just paste this line on any page or template:

{% include "/bc-widgets/complex-blogpost-search/init.liquid" -%}

The folder structure above is just an example, the folder names differ from widget to widget.

You'll then see the feature on your published page - here's a live example.

Widget Structure

A widget is made out of a single file containing liquid code (written to achieve the respective functionality) plus a collection of assets (images, css or javascript files). After uploading all the assets and the liquid file to your site activating the widget comes down to pasting the initialization code (a single line of text) where you need the widget to appear.

Widgets are designed to be easy to customise, and we offer instructions on how to do it for each widget in particular. The code is also available for further customization, you can access and tweak it as you need.

Every widget we build is based on a constant demand for that specific functionality, noticed on our support channel or forum.

Here's a widget file on a site:


Here's the initialization and output of such a widget:


How are Widgets different from BC Apps?

Although at first glance the two concepts might seem similar there are a few key differences:

  • Widgets function in the front-end of a site while BC Apps only work in the admin console
  • Widgets do not require an authentication token to run as BC Apps do
  • all the Widgets are free!