The WooCommerce Products Wizard - Composite product builder plugin adds an
augmented value to your
e-shop by offering your customers a flexible and easy-to-use method to navigate
in your store and buy a
variety of products separately or in a composite kit.
If you sell products:
which consist of many parts, such as computers, bicycles, drones,
skateboards, pizzas..., and you do
not want your customers to be confused on what to buy
or you do not want them to forget parts they need for a complete working
product...
which can be combined with others, such as clothes, gift-boxes..., and you
wish to inspire your
customers on what to choose...
which have a unique appearance, such as T-Shirts, cups, pillows..., and you
want your customers
select their color, size, stamp, stamp position, and size...
which you do not have in stock, such as handmade jewels, shoes...,
and you want your
customers to build their own custom-made, unique, personalized products...
then the WooCommerce Products Wizard - Composite product builder plugin is for
you!
Actually the WooCommerce Products Wizard - Composite product builder plugin
creates a wizard that guides
your customers step by step in your store offering:
Many combined sources to fetch products on each step;
A great number of layouts and views, each of them totally configurable, to
present your
products;
Many options on pricing the products, such as mass discounts;
The ability to configure conditionally which steps of the wizard will
be visible to your
customers, depending on the selections they already made in previous steps;
Moreover, the WooCommerce Products Wizard - Composite product builder plugin
creates a PDF
file of your customers' selections and send it to them via
email instead of the usual
checkout workflow.
You can create as many wizards as you wish in your store - each of them with its
own settings.
Download the plugin's zip file. From the dashboard of your site click the Plugins
- Add New
option.
Click the «Upload Plugin» button on the top.
Select the downloaded zip file, upload it and click the
«Activate» button.
If you haven't already installed or activated the WooCommerce plugin, you
will see a notice.
The WooCommerce plugin is required for the WooCommerce Products Wizard plugin to
work.
Creating a Wizard
To create a new wizard go to the «WooCommerce - Products
Wizard» page and click the
«Add New»
button.
Type a name - better relevant to the scope of your wizard.
The content part can be used as a welcome step for your wizard. You can
add here, for example, a
description of what your customers get from this wizard.
Click the «Add step» button to create some steps. Save the
wizard.
Use the Wizard
Copy the shortcode of the wizard and paste it on any page or post
you want.
By previewing the post/page, you will see the steps you just created, as in the
image below.
Now you are ready to fill the steps' options.
Wizard Settings
In each wizard, there are the following sections: Steps, Behavior, Cart, Kit,
Thumbnail, Layout - General
settings, Steps - General settings, Strings - General settings, Control buttons'
settings, Result, and
Filter.
Changes in the settings of a wizard affect only the current one. There are
predefined values in the
settings of each section.
The functionality of each section in short:
In the Steps section you create the steps of the wizard that guide the
end-user. In each of these
steps you define the rules that fetch the products you want, along with the
rules that hide/show the
current step, depending on the product selections the end-user made on previous
steps.
In the Behavior section you define the format the steps of the wizard are
presented, e.g. in a
single line, in tabs, in chronological line, etc.
In the Cart section you configure the general interaction of the products
of each step with the
cart. The settings of this block are inherited in each step of the wizard. In
each step though you can
define its own settings for the Cart setting and overlap these general ones.
In the Kits section you define some global settings for the products that
are sold as kits
- combined products.
In the Thumbnail section you configure the settings of the canvas used to
show the different
phases (images) of the composite product as the customer selects the parts it is
combined.
In the Layout - General settings section you define the global settings
of the layout of each
step. For example, the products can be presented in tabular mode, grid mode,
etc. In each step, though,
you can define its own Layout settings.
In the Steps - General setting section you define some global settings
for the steps of the
wizard, such as if the first (Welcome) / last (final product) step is shown. You
also define the labels
of the fields in the wizard. In this section also you can define a contact-form
that cooperates with the
wizard.
In the Strings - General settings section the labels of the fields the
end-user sees, are
defined.
In the PDF Settings section you define many formatting options for the
exported PDF file with
your customers' selection.
In the Control buttons' settings section you configure the appearance and
the labels of the
control buttons, namely: Start/Back/To the cart/Reset, etc.
In the Filter - General settings section you define the global settings
of the filters of each
step and the labels of their fields. In each step though you can define its own
settings for the Filter
setting.
In the following paragraphs each of these settings is presented in detail.
Basic Settings
In this section you create the steps of the wizard, along with the rules of each
individual step. You can
also change the order of the steps by drag and drop.
To create a new step just click the «Add step» button.
By using the «Set the default cart content from your session»
option you can create a
wizard which
contains a predefined set of products as soon as the wizard starts. This option
can be used after you
finished your wizard and added to it its final functionality.
Run your wizard and walk through it. In each step add the products you want from
this step. When
you finish, click the «Set default cart» button.
Then, each time you lunch the wizard, these products will be shown in each step
by using the default
navigation (i.e. by just clicking the Next Button). This setting might be
helpful in case you want to
promote several products from your store.
To reset this selection click the «Reset default cart» button.
Step Settings
By clicking the «Setting» button of each step, you can
define the settings for
this specific step. If
you do not specify any settings in a step, then the predefined settings of
the wizard are applied.
The options you can set in the Settings section of each step come in several
groups.
Basic Group
The «Title» option defines the title of the step.
The «Thumbnail» option defines a thumbnail which is
shown in the navigation
tab of the step. This
works only with the Step-by-Step behavior.
In the «Top and bottom description» areas you can add
a text for your
customers before and after
the
products' area of this step.
In the description area you can also add custom fields to collect extra
data from your customers using the special shortcode, as [wcpw-step-input name="My custom filed"].
It allows to create such inputs as text, checkbox, radio, text area, select, file, and so on.
The "name" attribute is required for correct work of the shortcode. You can also pass any other attributes you need the same way. All of them will be passed into the input tag.
For the "select" tag type use the "values" attribute to list the
options, delimited by a "|" symbol.
Using of the array input name
Some of the input types allows to pass a few values per one name.
For example, checkbox input type, file input type and select tag allows to pass a few values using [] brackets in the name attribute.
To not broke the shortcode structure use the {} brackets instead of the square ones.
Not all field types are supported
Specifically, field types: "button", "image", "reset", "submit"
are not supported.
Keep in mind you can get these custom fields' data only in the
PDF file created by the wizard or a combined kit.
The «Handle description with auto tags» option
preserves the HTML-tags in the
text and shows the
text HTML-formatted.
Query Group
This is the part of the step that fetches products for this step. There
are many sources to use:
Product
Categories/Product attributes/(Included/Excluded) Individual
products.
In the «Categories» settings, select the categories
of the products you want
to present in this
step.
In the «Attributes» setting, use product attribute
values to fetch products.
By using a combination
of these 2 options you can better filter the products you present in
this step.
The «Included products» setting allows you to fetch
the specific products you
define here.
Mind that this setting overwrites the «Categories»
setting, because the
products of this
step must fulfill both conditions: they have to be in the selected
category AND in the included
products.
If you leave both the above settings empty, then a blank step,
containing only the
description
and the custom fields you possibly added, will be shown to the
customer.
The «Excluded products» setting allows you to remove
from this step the
products you type here.
They are excluded from the products fetched either by the Category /
Attributes / Included
product
setting.
Availability Rules
The «Availability rules» are a complex setting that
controls the
appearance of this step within the wizard, depending on the
product your customers
selected in
previous steps.
To define an Availability rule, click the relevant button.
In the modal window that appears select the «Source»
of the products, by
choosing between a
specific Product, a Product variation, a Product attribute, a Product
category, or a Custom
field
value.
The next option of the Availability rule depends on the Source selection.
So, the next setting changes accordingly to:
Products/Categories/Attribute values/Custom field,
where you type there the
names of the products (either names or IDs)/product variables (either
names or IDs), categories,
attributes, separated by a comma.
Both the two next options control the visibility of this step
within the wizard.
The «Condition» option of each rule controls the
visibility of this step
according to the products
already in the cart. If you select the "In cart" value then this step
will be visible only if
the products
you
defined in this rule are in the cart, that is your customer has already
selected them in any of
the
previous
steps. If you set "Not in cart" then this step will only be visible if
none of the products is
selected
in
any of the previous steps.
In the «Relation within the items» option if you
select the "AND" value then
this step will be
visible
only if the products you defined in this rule are all in the cart. If
you select the OR option,
then
this
step will be visible if even one of the products you define here is
selected in previous steps.
The next setting controls when this step will be active.
You can set the relationship of the rule with the next rule
option to control when this
step will
be active to navigate to it. If you set the "OR" value then this step
will be active from
the
beginning of the wizard, no matter the end-user navigated to its
previous ones, while the "AND"
value
forces this step to be active only after the end-user visited its
previous one.
The number of Availability rules in each step is unlimited.
The «Order» and
«Order by» options define the sorting order of the
products. A number of
options are available in the Order by setting: ID, Name, Author, Date,
Modified, Rand, Comment
count,
Menu order, Included products, Price.
The «Enable 'Order by' dropdown» option shows the
typical WooCommerce dropdown
menu for the
products' order.
The «Products per page» option sets the quantity of
the products per page.
The «Products per page» option defines the number of
products shown on a
page. This setting
creates a dropdown box in which your customer can select the number of
products he wants to see
in on
single page. To create the values of the dropdown box use the + button
to add different lines,
each one
for a single value of the dropdown box, and type a numeric value in each
line.
Cart Group
The «Hide the product selection icon» option hides the
radio/checkbox icon on
each product.
If you enable this option, then the only way to select a product is the
use of the
individual controls of each product.
The «Add to cart by quantity» option is also
available. When this option is
set, then all products
having a quantity more than zero are added to the cart. When
this option is selected the product selection icon is hidden. The
products' quantity is still visible. The «Sold individually»
setting
shouldn't be enabled if this
option is checked.
The «Don't add to main cart» option does not allow any
product of this step to
be to the cart.
The «Don't add specific products to cart» option
excludes the products you
specify from the cart.
The products will be visible in the wizard but they could not be added
to the cart.
The «Select more than one products» option allows your
customers to select
more than one product
in this step. If this option is checked, the radio buttons of the
products are replaced by
checkboxes.
The «Select more than one variation per product»
option changes the variable
product's behavior. In conjunction with the "Can select several
products"
option it doesn't replace
another variation of the same product while adding it to the cart.
The «Sold individually» option shows/hides the
quantity setting input of a
product.
The «Selected products by default» option define the
products that are
selected by default when
entering this step.
Also by this option you can define specific product variations as
checked.
Also, you can set the «All products selected by
default» option for a step.
The «No selected products by default» option
overwrites the two previous ones.
The «Default product quantity» option sets the initial
products' quantity for
this step. This
option works with the «Sold individually» option.
When the customer enters this step, and the «Sold individually»
option is
enabled, the product
quantity defined here will be set to each product of the step.
The «Minimum products selected» option indicates the
number of products that
must be selected in
this step so that the customer will be able to move to the next one.
The «Maximum products selected» option indicates the
number of the products
that have to be
selected so that the customer will be able to move to the next step.
The «Minimum product quantity» option sets the minimum
product quantity input
value for this step. This
option works without the «Sold individually» option.
The «Maximum product quantity» option sets the maximum
product quantity input
value for this step. This
option works without the «Sold individually» option.
Hide the quantity
If these two settings have equal values then the quantity will be
hidden.
The «Minimum total products' quantity» option defines
the minimum sum of the
quantities of the
products
that have to be selected in order your customer to be able to go to the
next step.
The «Maximum total products' quantity» option defines
the maximum sum of the
quantities of the
products
that have to be selected in order your customer to be able to go to the
next step.
These six min/max options can be in one of the following
types:
«Simple count» - type a static value.
Counts the number of
products selected in this step;
«Count the selected products of the
steps» - count of selected
products from the other specific steps;
«Least product quantity of the steps» -
the smallest quantity
value from the other specific steps' products;
«Greatest product quantity of the steps»
- the greatest quantity
value from the other specific steps' products;
«Sum of products' quantities of the
steps» - the sum of the
quantity values from the other specific steps' products.
To use other steps' products, in the option's value, type the
IDs of the desired steps
separated
by a comma.
These IDs can be found in the "Steps" settings group, before the
titles of the steps
list.
Control Buttons Group
The lower settings allow to add individual cart controls to each
product. By default each such action makes a server request and blocks
the wizard activity. In case you want the customer have a possibility to
products to cart without waiting these requests are done use the «Make
nonblocking requests» setting.
The «Enable "Add to cart" button» option
enables/disables the "Add to cart"
button on each product of this step.
The «Add to cart button behavior» option defines the
action that is fired
after a product is
added to the cart.
The «Add to cart button text» option defines the text
on the "Add to cart"
button of this step.
The «Add to cart button class» option is also
available. Predefined classes
from Bootstrap
framework such as:
btn-primary
btn-sm, can be used.
Also, there is a set of predefined classes that control the buttons and
the icons appearance:
hide-text - hides text of the button but keeps it for the
screen readers;
hide-text-on-mobile - hides text of the button on small
screens but keeps it for the
screen
readers;
icon-left - define on which side of the button the icon
should appear;
icon-right - define on which side of the button the icon
should appear;
show-icon - always shows a pre-defined button icon. Requires
the
icon-left/right class
to work;
show-icon-on-mobile - shows a pre-defined button icon on
small screens. Requires icon-left/right
class for work;
The «Enable "Update" button» option shows the Edit
button in the wizard.
The «Update button text» option defines the label of
the Update button.
The «Update button class» option works similarly to
the "Add to cart" button
class.
The «Enable "Remove" button» option shows the Remove
button.
The «Remove button text» option defines the label for
the Remove button.
The «Remove button class» option works similarly to
the "Add to cart" button
class.
The «Hide Remove button» option hides the Remove
button if it is set as
enabled from the "Control General settings".
The «Hide Edit button» option hides the Edit button if
it is set from the
"Control General settings".
View Group
This group sets the options for the presentation of the products of this
step.
The «Template» setting defines the layout of the
products of the current
step. There are several
options there: list, table, masonry, grid.
The templates of these steps are based on the php-files found in the
plugin_directory/views/form/layouts and
theme_directory/woocommerce-products-wizard/form/layouts
folders.
The «Grid column size» option works with the Grid
template formats the "grid"
template and is
ignored by the others. It is a responsive template that fits in
different screen sizes.
It is based on a 12-columns system, accordingly the value of each cell
is a ratio of 12.
For example, if you want your products in three columns the value should
be 4 (is 12/3).
The «Set the Grid column size after the sidebar is
shown» option is the
same as the «Grid column size» but then the sidebar
is visible.
The «Product template» setting changes the view of
the products in the current step.
The available options (type-1 to type-8) are formed in the php-files
found in the
plugin_directory/views/form/item and
theme_directory/woocommerce-products-wizard/form/item
folders.
The «Merge thumbnail with gallery» option removes the
galleries from the
products and
shows only the gallery images in thumbnails, formatted as a carousel.
The «Gallery column size» option is similar to
the «Grid column size» of the product's
gallery grid.
The «Variation template» option changes the layout of
the variable products options list.
The «Enable title link» option wraps the product
titles by their links and opens the product page in a new tab.
Moreover, there are some more options that let you have full control over
the visibility of the elements of a product.
Specifically, you can check to show the options:
Show product galleries
Show product description
Show product attributes
Show product availability
Show product SKU
Show product tags
Show product price
The «Product description source» option defines the
source for the description of the products
presented in the specific step. Available options are: product
description, product short description, or nothing.
For the thumbnails you can set the «Product thumbnail size»
option. It might be one of the already registered sizes you can find by clicking the "More" setting, or
a pair of integers separated by a comma, e.g. "50,50".
Filters Group
The «Filters» group adds filters for the products of
the step. You can add
any number of filters.
This is possible to use the the same filters for a few different steps.
This way the applied
filters will be the same for all of these steps.
Do to this define a step number for the «use filters from
another step»
setting.
To create a filter, first select one of the predefined sources and then
one of the suggested views.
You can select the "range" view for a product attribute, but keep in
mind it works well with
numeric
attribute values only.
Each filter is entitled automatically. You are free to change its name.
This is the label of the
filter
the end-user sees.
It is possible to include/exclude specific values for the
filters, such as
categories, tags and attributes To do so, type the IDs of the terms you
wish separated by a
comma.
Similarly, you can define «Default selected filter values».
If you use this
option, the products of
the selected option of the filter will appear by entering this step.
Also, you can set some «Default values» of products
in advance, before your
customer uses the
filter.
The «Filter position» option defines the position of
the filter. The filter
can be either: on the
right / before the products / or in the sidebar. Keep in mind that the
sidebar filter works only
with
the tabs mode.
The «Expand filter by default» option is used when
you want to have the
filter opened when the
step is shown.
For the image-based filters you can set the «Thumbnail size»
option. It might
be one of the
already registered sizes you can find by clicking the "More" setting, or
a pair of integers
separated by
a comma, e.g. "50,50".
Filter group settings
Settings of the Filter option
Behavior Settings
The «Work mode» is the setting that defines the main wizard's
view and behavior.
The available options are:
«Step by step» - this mode shows the steps of the wizard
as tabs. This mode does
not let you
jump from the first step to the last one. The only way to skip a step is to
use the "Skip" or "Go to
results" buttons.
«Free walk» - this mode shows the steps as tabs. It also
lets you open any step
you want;
«Single step» - this mode opens vertically all the steps
of the wizard at once;
«Sequence» - this mode opens all the steps vertically,
one after the other.
«Save state to URL» setting makes possible to get a current
wizard cart and active step via URL
to share the selection via link. Works the same as the share button control.
The «Nav action» option defines what happens after the click
on a navigation button.
Available options here are: submit and move to the next step, just move to the
next step, do nothing, or
use
the auto smart mode.
The «Final redirect URL» option defines the URL of the page
which will be opened
after the
wizard selection confirmation.
The «Check Availability rules» option enables/disables
ALL Availability rules
everywhere in the wizard.
The «Strict cart workflow» option removes all products from
the steps after the
active one.
This option might be helpful if you have complicated Availability rules for
products.
Removing products from the previous steps
The default behavior of the wizard is to remove the products from the
steps after the active one.
To avoid this, disable the «Strict cart workflow»
setting of the «Behavior» section.
The «Scrolling on top of the page on navigation» option
scrolls on the top of the
page on every
click of the navigation buttons.
The «The top-margin on scrolling in (px)» option defines the
top-margin after
scrolling the page
to the top.
The «Hide prices» option hides the prices of the product
within the steps of this
plugin. This
option does not affect the actual prices of the products or the Woocommerce
cart.
For the products which are bought by this wizard the «Price discount»
option makes a
discount, in percentage. This option can be overwritten by setting a product
category discount
or a product discount for a specific product.
The «Price discount type» option controls how the discounted
price will be shown.
The price can be replaced by a reduced price (strikethrough) or a highlighted
price (on-sales).
Cart Settings
The «Clear main cart on the wizard confirmation» option
always truncates the cart of
WooCommerce
any time you complete the wizard workflow.
The «Show step names» setting shows the names of the steps in
the results view, in
the PDF table,
and the widget. You can select between the available options to show "all the
steps" or "only the
selected ones".
Widget navigation possibility
If you decide to show the names of the steps you can «Use them
in the widget during its
navigation».
The «Reflect products in the main cart immediately» option
adds the products of the
wizard in the
WooCommerce cart.
The «Minimum/Maximum products selected» option defines the
limits of the selected
products to
complete a purchase via the wizard.
The «Minimum/Maximum total products' quantity» option limits
the total quantity of
the selected
products
of the final order created by the wizard.
The «Minimum/Maximum products' price» option limits the
selected products
total price for the final order created by the wizard.
The «Step inputs price» setting allows to define price for custom steps
inputs made using the
[wcpw-step-input] shortcode.
Their price will be added to the final price of the kit. It will not work without
combining products into kits.
This is necessary to
define the setting name and its price at least. This way any value of this
setting will add the defined price to the totals.
But this also possible to define an exact combination of the step input name,
value, and price. It will be applied instead of the common input name price.
Kit Settings
The «Group products into kits after adding to the main cart»
option makes products
bonded to each
other in the WooCommerce cart.
The «Kit's type» setting changes the view of a kit.
By using the value «Separated lines»
the products will be presented in
separated products, although still bonded. Alternatively, the «Combined
products»
selection
shows only the first product in the cart and the other products of the order as
sub-lines of this
product.
You can also use the wizard's thumbnail as a product thumbnail instead of the
first product's one.
You can select a «Kit base product» to use as the root
product of your kit. This
option does
not affect the final price.
If the base product is a variable one, then you need to set every value on the
attribute variations,
otherwise, the first product of the wizard's cart will be the root one.
You can define a «Base kit price» which will be included in
the kit's price by
default.
Doing so, you have no way to exclude it from the cart.
You can define a static «Kit price» value for the combined
kit type. This setting
overwrites the base kit price and the prices of every product in the wizard.
It is possible «Not to calculate» the kit child products in
the cart and count the
kit and its children as one cart item.
Enable the «Edit button for the kit in the main cart» to
allow the customer to go
back and
change the kit's products. The wizard will be opened on the last step of the
kit's products.
With the «Attach PDF to the root product» setting the generated PDF file will be attached to a
root product of the wizard
kit.
Thumbnail Settings
It is possible to show your customers how the product combinations they made
might look like.
That requires a preliminary configuring of the image canvas. The generated
thumbnail will be
used as a thumbnail for the combined parts of a kit and the kits with a
pre-defined base product.
It also can be output while the wizard workflow in the description of the steps
of PDF.
Prefer transparent PNG images for better overlapping.
To use the canvas:
Click the «Generate thumbnail» setting and define its Width
and Height.
On the thumbnail's canvas create the areas to show the (parts of the) products.
Click the «Add item» button to add a new area inside the
canvas. The total number of
areas you add
is shown on the right side of the row near the «Clear canvas»
button.
You can change the areas' position by drag and drop. You can also change their
sizes and z-index
order. You can do so by the area
settings. The position of the layers affects the images overlapping on the
canvas.
Each area can have a name. This name helps you to put your image in the
right position on the
canvas.
Using uploaded images for thumbnail
generation
You can upload images in the areas of the canvas e.g, a custom logo or
photo.
Use the area name as the "name" attribute of the [wcpw-step-input
type="file"] shortcode in order
to place
the uploaded image in the correct place.
You can define a default image for the areas. You can replace it later if
you wish.
When you have designed your canvas you can configure the products
or the categories.
The Generated thumbnail will be show in the widget then any of products is in
the cart. If you want to
show
the thumbnail in another place, for example on the Results step or in the PDF
file, use the [wcpw-generated-thumbnail-url]
shortcode to get
its link.
The available thumbnail settings shown in the next image are straightforward.
Thumbnail settings
Thumbnail area settings
Layout - General settings
By the «Nav template» option you can choose the style of the
navigation tabs. Available values here: tabs, pills, buttons, line, line-horizontal, or none.
The «Sticky nav» option controls if the navigation bar will
be sticky.
The «Sticky nav top-offset» sets the gap between the sticky
navigation bar and the previous element on the screen.
The «Show sidebar» option controls the appearance of the sidebar of the wizard.
The «Sidebar position» option allows you to place the sidebar left / right or on top.
The «Expand widget by default» option lets you present the widget opened.
The «Sticky widget» option controls if the cart widget will be sticky.
The «Sticky widget top-offset» sets the gap between the sticky widget and the screen.
You can «Show/hide the header and footer» of the wizard.
It is also possible to turn on/off a «Sticky header/footer» of the wizard.
The «Sticky header offset top» tunes the gap between the top
of the screen and the sticky header.
The «Show steps names» options show the step names on one-screen modes.
The «Show step names» options show the step names on one-screen modes. For the
"single" and "sequence" modes you can also show the steps' names.
The «Table layout strings» option defines the captions of the "layout" view.
Steps General settings
The «Enable Description step» option enables/disables the
first step of the wizard.
This step
contains
the description text of the wizard.
The «Description step title» option sets the description in
the navigation tab for
the first
step. E.g.
you can name it: "Welcome".
The «Enable Results step» option enables/disables the last
step containing the total
selected
products.
The «Results' step title» option sets the Results' step text
in the navigation tab.
The «Results' step description» option sets the Results' step
description text that
is shown
before the
table.
The «Show Results' step table» option sets on/off the cart
table on the result step.
For example, it can be disabled and use the widget instead.
The «Results step contact form» option defines the
ContactForm7 form in which the
results of the wizard will be presented below the products-selection table.
Using this form you can send
emails
with the content of the cart
in PDF format.
PDF attachment
If there is no attached PDF file in the email, add the [wcpw-result-pdf]
shortcode in the «File attachments» field.
Use the «Results strings» option to change the captions of
the Result page on the Result step and in the PDF file.
It is possible to have the «Checkout step» enabled. This
option forces the Checkout
step as the
last step
of the wizard. By using this option your customer can checkout from the wizard
without extra navigation.
If you want your customer to navigate to the WooCommerce checkout page from the
wizard, be sure that in
the «Checkout step description» the [woocommerce_checkout]
shortcode is
found.
Strings - General settings
Strings - General settings allow setting the labels of the strings through
the wizard. Their usage
is straightforward.
Control buttons - General settings
The Control buttons General setting defines several options on the Navigation
Control buttons.
The main feature of these Control buttons is they may have different classes for
their styling and
behavior.
As the main stylesheet of this plugin is based on the Bootstrap 5 framework you
can use any of the
available styling classes for Buttons
and
display utility classes.
Also, there are a few classes that control the buttons' text and icons'
appearance:
hide-text - hides text of the button but keeps it for screen readers;
hide-text-on-mobile - hides text of the button on small screens but
keeps it for screen
readers;
icon-left - define on which side of the button the icon should
appear;
icon-right - define on which side of the button the icon should
appear;
show-icon - always shows a pre-defined button icon. Requires icon-left/right
class for
work;
show-icon-on-mobile - shows a pre-defined button icon on small
screens. Requires
icon-left/right class for work;
PDF Settings
PDF customization
If you wish to modify the default PDF template make a copy of views/result-pdf.php
file to your active theme (or child theme) directory to
woocommerce-products-wizard/result-pdf.php
The «PDF header height» (in cm) option allows to define the
top header size for each
page.
The «PDF header content» will be used as the header for each
page.
There are a few native shortcodes available:
[wcpw-result-pdf-page-number] - The current page number;
[wcpw-result-pdf-page-total] - Total pages count.
If you use a ContactForm7 form in the wizard you may set its email shortcodes
via the
«Result's step contact form» setting.
The «PDF top description»: content will be placed before the
Results table.
The «PDF footer height»: in cm. This option defines the top
header size of each page.
The «PDF footer content»: will be used as the footer for each
page.
It is also possible to use dedicated shortcodes to output the current page
number and total pages
number.
The «PDF bottom description»: content will be placed after the
results table.
The «PDF additional CSS» setting provides a possibility to
pass extra CSS rules into
the PDF file.
Filters - General Settings
The Filter General settings define the filters' string labels throughout the
wizard.
Product Settings
«Availability rules» is a unified and complex setting to
control the product
appearance in the wizard. The source of a rule might be a product,
product variation,
product attribute, product category, or custom input value.
There are two possible conditions for a rule: «in
cart» and «not in
the cart».
So this is possible to check if a product, category, or custom field is added or
not
added to the cart to show the product.
This is possible to choose a few products, attributes, or categories per one
rule. There is a setting
to control the relation within the items. The rule can be met when
all or
any of these items are in or not in the cart.
For using the product attribute select it at first in the dropdown field and
define
attribute values terms IDs (not slugs) separated by a comma in the next text
input.
Here is how you can find them.
Alternatively, you can use a tiny plugin to see these IDs.
Moreover, there is a setting to control the relationship of the rule with the
next rule, namely any of the rules should be met or few at once.
You can also set Availability rules for each variation of a variable
product.
«Variation template» setting change layout of the variable
product options list above
category
settings.
You can add a «Discount» to the product bought using a
wizard. Possible values are:
Percentage - define a value from 1 to 100 in percents to make
appropriate discount;
Fixed - define a value on which product price will be reduced;
Precise price - overwrites product's price by the defined one.
This is possible to «Attach a wizard to the product» to make
it works as a usual
composite product.
«Attached wizard place» allows to output the wizard:
Before add-to-cart form;
After add-to-cart form;
In a special separate tab.
Set the «Separate tab title» if you need it.
You can use a special feature to intercept the added-to-cart product and
continue the workflow in
a wizard on another page immediately.
First of all, select a value of the «Redirect to the wizard on add to
cart event»
setting.
Secondly, define a «Redirect link» which will be opened after
adding to cart event
for this product.
Set a «Wizard's step ID» in which the product should be
added. If you want the
product will be out
of any step then set it to any out of steps IDs value.
This is also possible to define the «active step ID after the redirect»
via the setting.
«Generate thumbnail areas data» is used to replace generated
thumbnail areas with
specific
images then the product is in the cart. It's necessary to define the area
name
to be used and the image for pasting.
It's also possible to set the «Availability rules» to apply
the image to an area.
The number of these rules is unlimited.
You can also set the areas data of each variation of a variable product.
«Availability rules» is a unified and complex setting to
control category products'
appearance in the wizard. The source of a rule might be a product,
product variation,
product attribute, product category, or custom input value.
There are two possible conditions for a rule: «in
cart» and «not in
the cart».
So this is possible to check if a product, attribute, category, or custom field
is added or not
added to the cart to show the category products.
This is possible to choose a few products, attributes, or categories per one
rule. There is a setting
to control the relation within the items. The rule can be met when
all or
any of these items are in or not in the cart.
For using the product attribute select it at first in the dropdown field and
define
attribute values terms IDs (not slugs) separated by a comma in the next text
input.
Here is how you can find them.
Alternatively, you can use a tiny plugin to see these IDs.
Moreover, there is a setting to control the relationship of the rule with the
next rule, namely any of the rules should be met or few at once.
You can add a «Discount» to the category products bought
using a wizard. Possible
values are:
Percentage - define a value from 1 to 100 in percents to make
appropriate discount;
Fixed - define a value on which products prices will be reduced;
Precise price - overwrites products prices by the defined one.
This is possible to «Attach a wizard to the product» to make
it works as a usual
composite product.
«Attached wizard place» allows to output the wizard:
Before add-to-cart form;
After add-to-cart form;
In a special separate tab.
Set the «Separate tab title» if you need it.
You can use a special feature to intercept the added-to-cart product and
continue the workflow in
a wizard on another page immediately.
First of all, select a value of the «Redirect to the wizard on add to
cart event»
setting.
Secondly, define a «Redirect link» which will be opened after
adding to cart event
for this category.
Set a «Wizard's step ID» in which the product should be
added. If you want the
product will be out
of any step then set it to any out of steps IDs value.
This is also possible to define the «active step ID after the redirect»
via the setting.
«Generate thumbnail areas data» is used to replace generated
thumbnail areas with
specific
images then any product of the category is in the cart. It's necessary to define
the area name
to be used and the image for pasting.
It's also possible to set the «Availability rules» to apply
the image to an area.
The number of these rules is unlimited.
You choose the styles that will be included in the plugin.
«Full» is the self-sufficient style file. It applied all
required
styles to the plugin's elements.
«Basic» styles are fine for you if your active theme is
based on the "Bootstrap
3/4/5"
framework. In this case, this wizard's style will be inherited from your
active theme's. Despite
this, you can also add your
own CSS-styling rules.
«None» value. doesn't include any styles at all. In this
case you can create a
full custom
CSS-style from the plugin sources and tools or by your own approach for
styling.
«Custom styles» include the file with your custom styles
such as colors,
font-size, and so on.
To modify it go to the «Custom styles» sub-page.
If for some reason you need to disable some of the plugin's scripts, change
«Scripts including type» setting to «Multiple files»
and de-select
them in the list lower.
Sometimes the server's configuration might face problems with the stored
sessions.
Examples are: the wizard can't go to the next steps, or the cart contents'
disappear on a page
refresh. In this case, tick the «Store session in the DB»
option. This option works
much more reliable,
but, probably, a tiny slower.
If you have a cache plugin on your site it might make the wizard's work
unpredictable.
This way the «Send current state hash via AJAX» setting might
help to fix.
Custom Styles
It is possible to reconfigure the plugin's styles according to your needs.
Don't forget to choose a «Custom full styles file» value of
the «Styles
including type»
setting.
In case your styles are not shown correctly, disable the «Minify custom
styles»
setting. In other
cases keep this setting enabled to keep the CSS-file smaller and save
your customers' traffic.
There are two modes for custom styling. The «Simple
mode» provides only a few
main variables to
change. The «Advanced mode» allows you to change a great
range of variables, but it
requires CSS
knowledge. All the variables of the plugin are available to be changed
by using a text
editor.
Sometimes the wizard's fonts look very small on specific themes. To resolve this
Adjust the «Font
size» option. You can use any CSS units there, like "rem", "px", "pc",
and so on. Apart from
that, you can also
change the product title and price font sizes.
In a case of a styling-command error, you will see a message while saving. The
styling file will not be
saved.
In case you need to reset your styles to their initial state click the «Reset
to
default» button
once.
Templates Customization
WooCommerce Products Wizard plugin has a folder of views that are used to be
shown on the front of the
site.
There is a possibility to customize them as you need and keep the changes while
the plugin updates.
To do this select files that require customization in the views list and apply
the «Copy to the
active theme» action in the form above.
Selected views will be copied into your active theme in the woocommerce-products-wizard
folder saving the sub-folders structure. Files copied to your active theme will
be marked by a tick
icon.
The plugin firstly searches for a specific view in the theme's folders, and if
it doesn't find the view
there, it gets the view from its own directory.
You can edit the copied views using the «Appearance - Them editor»
page.
If you want to delete some views from your active theme choose them in the views
list, select the
appropriate point in the form dropdown above and apply the changes. The view
will be removed from the
theme and the plugin's view will be used instead.
Keep in mind plugin might have some changes in the view files while updating. So
if you have customized
ones some of the new features will not work or might work wrong with them. This
way just copy them from
the plugin and adjust to your needs once again.
Shortcodes
What shortcodes are available for using in the plugin:
[woocommerce-products-wizard] - the main shortcode to output the wizard section. Requires the id attribute;
[wcpw-result-pdf-page-number] - outputs a current page number of the results PDF file;
[wcpw-result-pdf-page-total] - outputs total pages number of the results PDF file;
[wcpw-result-pdf-new-page] - outputs a new page in the results PDF file;
[wcpw-step-input] - special shortcode to output a custom step input field. Get more info from the step settings section;
[wcpw-cart-total-price] - special shortcode to output the current wizard total price within the widget toggle button.
FAQ (frequently asked questions)
The wizard doesn't want
to move further through the steps
Some server configurations might have problems with the current session
storing. Mostly the «Store session in the
DB» setting
fixes this problem.
The wizard looks work
but returns a static or random output.
Much probably you’re using a caching plugin on your site which makes page
content freeze and the wizard output also. In this case, tick the «Send
current state hash via AJAX» global setting to
change the page URL for each wizard’s state. Mostly, that will help to solve
the problem.
I want to collect custom
data from users (text or file)
There are two ways to achieve this. Both of them have their own pros and
cons.
This is possible to do. Select a ContactForm7 for use on the results step of
the wizard. The
email will have an attached PDF file of the user selection.
Sometimes you need to get some custom data by your customers, e.g. custom text,
number, file, and so on.
There are a couple of different ways to achieve this.
Extra Product Options plugin
The use of the Extra Product Options plugin which is compatible with
Woocommerce Products Wizard plugin. This plugin lets you add custom fields to
any product. To make it
work
with Woocommerce Products Wizard plugin it is necessary to set the following
settings:
The General - Various - Enable plugin for WooCommerce shortcodes to
"on";
The Global - Product page - Reset option values after the product is
added to the cart to
"off";
Step Custom Fields
The second way is to add custom fields to the steps of the Woocommerce Products
Wizard plugin. Take a
look at the Description
settings.
You have two options here:
In order to add the data of such date-fields in the cart with the typical
WooCommerce checkout, combine
the products of the wizard into a kit.
If you get your orders in a PDF file in your email, by using a ContactForm7
form, the custom data will
be enclosed in the PDF file.
If you want to use custom fields as filters for your products then you need
to use two
hooks. The first one is used to add filter instances. They are
arrays with keys within, namely:
label - Filter's name, as a label in the front part;
key - Inner key;
view - A filter view name. The view can be supported by a wizard by
default, or can be a custom
one;
value - Current value of the field (like text input). This can be null
as well;
values - Array of the possible values of the filter.
The second hook is to handle the values that passed as WP_Query
arguments.
Here is an example of using YITH brands taxonomy as a product filter within
the #123 wizard
for the 1rst and 2nd step:
<?php
// add custom filters to output on the front part
add_filter('wcpw_filter_fields', function ($output, $wizardId, $stepId, $appliedFilters) {
// add only for specific wizard ID and steps IDs
if ($wizardId == 123 && in_array($stepId, [1, 2])) {
$label = 'Brands'; // filter name
$view = 'checkbox'; // required view
$key = 'yith_product_brand'; // taxonomy to use
$values = [];
// collect terms as values
$terms = get_terms(['taxonomy' => $key]);
foreach ($terms as $term) {
$values[] = [
'id' => $term->term_id,
'name' => $term->name,
'isActive' => isset($appliedFilters[$key]) && in_array($term->term_id, $appliedFilters[$key])
];
}
$output[] = [
'label' => $label,
'key' => $key,
'view' => $view,
'value' => isset($appliedFilters[$key]) ? $appliedFilters[$key] : null,
'values' => $values
];
}
if ($wizardId == 321 && in_array($stepId, [4, 5])) {
// other filters here...
}
return $output;
}, 10, 4);
// handle passed filters to query args
add_filter('wcpw_filter_args_to_query', function ($output, $filters) {
foreach ($filters as $filter) {
foreach ($filter as $key => $value) {
// add query arg by the custom taxonomy
if ($key == 'yith_product_brand' && !empty(array_filter($value)) {
$output['tax_query'][] = [
'taxonomy' => $key,
'field' => 'id',
'terms' => array_filter($value),
'operator' => 'IN'
];
}
// other filters here...
}
}
return $output;
}, 10, 2);
?>
If you need to make some products available only in the Woocommerce Products
Wizard wizards, the
code below can help you. This code adds an extra checkbox on the "Inventory"
product tab. If this
checkbox is ticked then this product will be hidden from the e-shop. Add
this extra code to the
functions.php
file of your theme.
<?php
// add extra field
add_action('woocommerce_product_options_stock_status', function () {
woocommerce_wp_checkbox(array(
'id' => '_is_hidden_product',
'wrapper_class' => 'show_if_simple show_if_variable',
'label' => 'Hide Product From Shop'
));
});
// save post
add_action('woocommerce_admin_process_product_object', function ($product) {
if (isset($_POST['_is_hidden_product'])) {
$product->update_meta_data('_is_hidden_product', 'yes');
} else {
$product->delete_meta_data('_is_hidden_product');
}
});
// modify the query
add_action('woocommerce_product_query', function ($query) {
$meta_query = $query->get('meta_query');
$meta_query[] = array('key' => '_is_hidden_product', 'compare' => 'NOT EXISTS');
$query->set('meta_query', $meta_query);
});
add_action('woocommerce_shortcode_products_query', function ($query) {
$query['meta_query'][] = array('key' => '_is_hidden_product', 'compare' => 'NOT EXISTS');
return $query;
});
// disable cart table permalink
add_action('woocommerce_cart_item_permalink', function ($permalink, $cartItem) {
$permalink = !filter_var(get_post_meta($cartItem['product_id'], '_is_hidden_product', true));
return $permalink;
}, 10, 2);
// disable order details table permalink
add_action('woocommerce_order_item_permalink', function ($permalink, $item) {
if (!$item instanceof \WC_Order_Item_Product) {
return $permalink;
}
$product = $item->get_product();
if (!$product) {
return $permalink;
}
return !filter_var(get_post_meta($product->get_id(), '_is_hidden_product', true));
}, 10, 2);
?>
Link Don't apply coupons to products with a
wizard discount
If the products that are fetched from your wizard already have a discount,
and you don't want
coupons reduce their price further, add this extra code to the functions.php
file of your theme.
Link Apply a dynamic discount according to the
selected products number
The next code makes the «Price discount» setting dynamic
according to the current
selected products numbers in the wizard. Use the $rules
variable to define the
products number and its discount value as 4 => 10, namely 4 or
more products have
10% discount until the next met rule.
<?php
// dynamic discount value by the current cart count
add_filter('wcpw_post_setting', function ($value, $id, $setting) {
if ($setting != 'price_discount' || (is_admin() && !wp_doing_ajax())) {
return $value;
}
$cart = \WCProductsWizard\Cart::get($id);
$cartCount = 0;
$rules = [
1 => 0,
4 => 10,
10 => 20,
50 => 25
];
foreach ($cart as $item) {
if (!isset($item['quantity']) || !$item['quantity']) {
continue;
}
$cartCount += $item['quantity'];
}
if ($cartCount) {
foreach ($rules as $count => $discount) {
if ($cartCount >= $count) {
$value = $discount;
} else {
break;
}
}
}
return $value;
}, 10, 3);
?>
Link Apply a dynamic kit price according to the
selected products number
per step
The next code makes the "Kit price" setting dynamic according to the
currently selected product
numbers per step. Each step with products has a default price which includes
a defined products
number. But then there are more products than this defined value each
additional product adds an
extra amount.
<?php
// dynamic kit price by the selected products number per step
add_filter('wcpw_post_setting', function ($value, $id, $setting) {
if ($setting != 'kit_price') {
return $value;
}
$cart = \WCProductsWizard\Cart::get($id);
$stepsQuantities = [];
foreach ($cart as $product) {
if (!isset($stepsQuantities[$product['step_id']])) {
$stepsQuantities[$product['step_id']] = 0;
}
$stepsQuantities[$product['step_id']] += $product['quantity'];
}
$total = 0;
$DEFAULT_PRICE_PER_STEP = 10; // default step price
$PRODUCTS_LIMIT_PER_STEP = 3; // maximum products number included to the default step price
$EXTRA_PRODUCTS_PRICE_PER_STEP = 2; // additional price per each product upper the limit
foreach ($stepsQuantities as $quantity) {
if (!$quantity) {
continue;
}
$total += $DEFAULT_PRICE_PER_STEP;
if ($quantity > $PRODUCTS_LIMIT_PER_STEP) {
$extraProductsQty = $quantity - $PRODUCTS_LIMIT_PER_STEP;
$total += $extraProductsQty * $EXTRA_PRODUCTS_PRICE_PER_STEP;
}
}
return $total;
}, 10, 3);
?>
Here is the list of some Javascript codes to change the wizard's behavior.
There are many ways to add them to your site. You can use some plugins to add
extra scripts, for example
Simple
Custom CSS and JS.
Also, some themes provides text fields for custom codes for using.
Or you can add extra scripts right in theme's javascript files, but it's better
to do only for the
child themes because you can loose the changes you made while theme update.
// submit wizard on any product variation property change
jQuery(document).on('change', '[data-component~="wcpw-product-variations-item-input"]', function () {
jQuery(this).closest('[data-component~="wcpw"]').data('wcpw').submit();
});
// add product to cart on any variation property change
jQuery(document).on('change', '[data-component~="wcpw-product-variations-item-input"]', function () {
var $product = jQuery(this).closest('[data-component~="wcpw-product"]');
var $wcpw = $product.closest('[data-component~="wcpw"]');
$wcpw.data('wcpw').addCartProduct({productToAddKey: $product.data('step-id') + '-' + $product.data('id')});
});
// add/remove product in cart once it is chosen
jQuery(document).on('change', '[data-component~="wcpw-product-choose"]', function () {
var $input = jQuery(this);
var $wcpw = $input.closest('[data-component~="wcpw"]');
if ($input.attr('type') === 'checkbox') {
if ($input.prop('checked')) {
$wcpw.data('wcpw').addCartProduct({productToAddKey: $input.data('step-id') + '-' + $input.val()});
} else {
$wcpw.data('wcpw').removeCartProduct({
productCartKey: $input.closest('[data-component~="wcpw-product"]').data('cart-key')
});
}
} else {
$wcpw.data('wcpw').addCartProduct({productToAddKey: $input.data('step-id') + '-' + $input.val()});
}
});
// add product to cart and go next once click on it
jQuery(document).on('click', '[data-component~="wcpw-product"]', function () {
var $product = jQuery(this);
var $wcpw = $product.closest('[data-component~="wcpw"]');
$wcpw.data('wcpw').addCartProduct(
{productToAddKey: $product.data('step-id') + '-' + $product.data('id')},
{behavior: 'submit'}
);
});
// submit filter on change immediately
jQuery(document).on('change', '[data-component~="wcpw-filter"]', function () {jQuery(this).submit()});
// don't open the image page on thumbnail click
jQuery(document).on('click', '[data-component~="wcpw-product-thumbnail-link"]', function (event) {event.preventDefault()});
// tick the product checkbox while changing a variation property
jQuery(document).on('change', '[data-component~="wcpw-product-variations-item-input"]', function () {
jQuery(this).closest('[data-component~="wcpw-product"]').find('[data-component~="wcpw-product-choose"][type="checkbox"]').prop('checked', true);
});
// keep the chosen product checkboxes while the AJAX requests
jQuery(document)
.on('change', '[data-component~="wcpw-product-choose"]', function () {
var $element = jQuery(this);
var wcpw = $element.closest('[data-component~="wcpw"]').data('wcpw');
var id = $element.attr('id');
if (!wcpw.chosenProducts) {
wcpw.chosenProducts = {};
}
if ($element.prop('checked')) {
wcpw.chosenProducts[id] = id;
} else if (wcpw.chosenProducts.hasOwnProperty(id)) {
delete wcpw.chosenProducts[id];
}
})
.on('ajaxCompleted.wcpw', function (event, instance) {
for (var key in instance.chosenProducts) {
if (window[instance.chosenProducts[key]]) {
window[instance.chosenProducts[key]].checked = true;
}
}
});
// XStore theme product quantity buttons fix
jQuery(document).on('ajaxCompleted.wcpw', function (event, instance) {
instance.$element.find('[data-component~="wcpw-product-quantity-input"]')
.before('<span value="-" class="minus"><i class="et-icon et-minus"></i></span>')
.after('<span value="+" class="plus"><i class="et-icon et-plus"></i></span>');
});