Shortcode

Add the following shortcode to a page or post to give it an order form:

[order_form_woocommerce]

Without any attributes, it will create an order form based on the settings you saved in the WooCommerce admin. You can refine your order form by adding any of the following attributes (see the example pages).

cat

Show only products from the selected product category. You can use either the product category ID (numeric) or its category name or slug. e.g. for a product category “Books on Toys”, the category slug might be “books-on-toys”.

Separate multiple categories with commas, e.g. “wine,beer,cider”

catmode

Changes how category titles are collated and displayed on the order-form-by-category template, when a product has multiple categories including parents and children; default = “leaves”, accepted values are:

  • leaves — only show the children, not their parents
  • roots — only show the parents, not their children
  • all — show all listed categories

classes

Add CSS classes to order form table, e.g. classes=”my-custom-class another-class”

cleartitle

Change the button title for the Clear Order button.

exclude

Exclude products from the order form by product ID.

Separate multiple product IDs with commas, e.g. exclude=”51,52,53″

include

Include only selected products on the order form by product ID.

Separate multiple product IDs with commas, e.g. include=”51,52,53″

individual

Show a checkbox for Sold Indidually products by setting individual=”checkbox”.

itemtitle

Change the column title for the item name, e.g. itemtitle=”Book Title”.

order

Show products ordered either ascending (ASC) or descending (DESC) using the orderby method.

orderby

Show products ordered in a specific way. By default, products are sorted by their WooCommerce custom order and then by name. This attribute accepts the values specified in the WordPress codex for post queries.

To sort by SKU, use orderby="sku" for alphabetic order, orderby="sku_numeric" for numeric order

pricetitle

Change the column title for the price.

qtytitle

Change the column title for the quantity.

resettitle

Change link text for the “Reset selection” link on variation selections.

responsivecss

responsivecss=1 will make the form utilise responsive design on small screens, responsivecss=0 won’t. Omit this attribute to use the general settings.

rowtotaltitle

Change the column title for the row total, if shown.

showimages

Show product images in the order form. showimages=1 will display images, showimages=0 won’t.

showshortdesc

Show product short description under the product title. showshortdesc=1 will display the short description, showshortdesc=0 won’t.

showoutofstock

Show out-of-stock products in the order form. showoutofstock=1 will show out-of-stock products, showoutofstock=0 won’t.

showrowtotal

Show a row total for each product in the order form. showrowtotal=1 will show the row total, showrowtotal=0 won’t.

showstock

Show the stock level on products with inventory management. showstock=1 will show the stock level, showstock=0 won’t.

showsubtotal

Show the subtotal row at the bottom of the form. showsubtotal=1 will show the subtotal row, showsubtotal=0 won’t.

submitredirect

Where to redirect on submit; default = “checkout”, accepted values are:

  • cart — show the shopping cart
  • checkout — go straight to the checkout
  • form — return to the order form

submittitle

Change the button title for the Place Order button.

subtotaltitle

Change the row title for the subtotal row, if shown.

tag

Show only products with the selected product tag. You can use either the product tag ID (numeric) or its slug.

Separate multiple tags with commas, e.g. “birds,reptiles”

template

The default template is “order-form”, but you can create custom templates in your theme and select them with this attribute.

variations

Separating product rows into one row per variation by setting variations=”separate”.

NB: does not currently show separate rows for attributes that don’t affect the price, e.g. colour. That feature is coming soon!