B2BKing Shortcodes

The plugin includes several shortcodes that you can easily insert anywhere on your website.

Offers #

[b2bking_offers] - Adds the offers page anywhere

[b2bking_offers id=1234] - Adds an individual offer anywhere on the site. For example you can use this to add an offer to a product's description, advertising a bundle that product is part of.

To get an offer's id, go to B2BKing -> Offers in the backend, and click on the offer. The number in the URL (e.g. ?post=1234) is the id of the offer.

Purchase Lists #

[b2bking_purchaselists] - Adds the purchase lists page anywhere

Wholesale Order Form #

[b2bking_bulkorder] - Adds the bulk order form anywhere

There are additional shortcode parameters for styling (order form theme), features, excluded products, etc. Please see the following article for details: https://woocommerce-b2b-plugin.com/docs/wholesale-bulk-order-form/

Examples:

[b2bking_bulkorder theme=cream sku=yes]

[b2bking_bulkorder theme=cream stock=yes]

[b2bking_bulkorder theme=cream sku=yes stock=yes]

Quick Order via CSV Form #

[b2bking_csvorder] - Adds the CSV order form anywhere

Registration Form #

[b2bking_b2b_registration] - Adds Login + Registration forms

In order to see the registration form, and not just login, the following setting needs to be enabled: In WooCommerce -> Settings -> Accounts you need to enable “Allow customers to create an account on the “My account” page”.

[b2bking_b2b_registration_only] - Adds Registration form only

The 2 registration shortcodes also support parameters. For more details about using these shortcodes and what parameters you can use, see our article on How to Separate B2B and B2C Registration.

[b2bking_login_only] - Adds Login form only

Product Information Table #

To add the product information table to the product page (especially when designing a single product template), you can use:

[b2bking_product_information_table]

Tiered Price Table #

To add the tiered price table to the product page, you can use:

[b2bking_tiered_pricing_table]

This also supports product IDs, for example:

[b2bking_tiered_pricing_table id=123]

This way you can display multiple tiered tables by specifying the product IDs you're requesting the tables for.

[b2bking_tiered_pricing_table allvariations=yes]

This can be added to the description of a variable product to show a table for each of its variations.

Quote Request Form #

You can add a quote request form to any page, by adding the following shortcode:

[b2bking_quote_form]

This shortcode has an optional parameter for "type", to control whether it shows as a clickable button that opens a quote form, or directly as a form:

[b2bking_quote_form type=button]

[b2bking_quote_form type=form]

It is also possible to manage (add, remove or edit) quote form fields.

Content Restriction #

You can control what content is available to what users (e.g. different content for B2B and B2C on the same page), by using the shortcode:

[b2bking_content]

How to use the content restriction shortcode

Powered by BetterDocs