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).

  • buttonplacement

    Set the location of the subtotal and action buttons. Possible values are:

    • bottom
    • float-right
    • float-left
    • float-right-mob-bottom
    • float-left-mob-bottom
    • sticky-right sticky-left
    • sticky-right-slide sticky-left-slide
  • 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″

  • gridalignment

    Select the alignment of the order form for grid templates. NB: only has an effect when there is a maximum grid row width, or maximum number of cards for cards product layout. Possible values:

    • (default — no value given)
    • center
    • center-align
  • group_by

    Collate the products into groups, allowing them to be separated in the order form. Currently, only categories are supported.

    • cat — group by category
    • category — group by category
  • 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 Individually products by setting individual=”checkbox”.

  • itemcountgrid

    Change the item count title for a form with a grid template.

  • 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.

  • productslayout

    Select the products layout for grid templates. This affects desktop browsers only; mobile browsers always get the cards layout which better suits smaller screens. Possible values:

    • rows
    • cards
  • 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.

  • 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.

  • showshortdesc

    Show product short description under the product title. showshortdesc=1 will display the short description, showshortdesc=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.

  • slidertitle

    Change the slider title when the action buttons are placed sticky left or right, with a slider.

  • 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.

  • subtotalgrid

    Change the subtotal title for a form with a grid template.

  • 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!