Wholesale Bulk Order Form

Introduction #

B2BKing introduces a powerful wholesale bulk order form, which allows your B2B customers to place orders quickly and easily. Customers can search for products by name or SKU, save purchase lists for later usage, or simply browse and discover your catalog.

The form is added by default to B2B customers' WooCommerce "My Account" page, and can also be added to any page using shortcodes.

Wholesale Bulk Order Form in the My Account section of WooCommerce

The bulk order form is powered by a fast AJAX-search allowing customers to easily search for, and discover products.

Order Form Themes #

You can choose from 3 different order form themes: Classic, Indigo and Cream.

Classic theme:

Indigo theme:

Cream theme:

Learn more: Here you can learn about the available themes and display options.

Bulk Order Form Shortcode #

To add the form to any page, you can use the shortcode [b2bking_bulkorder]

Theme Parameter #

To select a specific theme, you can use the theme parameter:

[b2bking_bulkorder theme=indigo]

[b2bking_bulkorder theme=cream]

[b2bking_bulkorder theme=classic]

Exclude Products or Categories #

You can exclude specific items by using the exclude parameter (this is only available for the cream and indigo themes).

[b2bking_bulkorder theme=cream exclude=432,983]

The exclude parameter also supports categories, by entering them as 'category_123', where 123 is the category ID. For example [b2bking_bulkorder theme=cream exclude=12,category_34] will exclude the product with ID 12, and all products that belong to the category with ID 34.

Show Specific Products or Categories #

You can choose a specific category by mentioning its ID

[b2bking_bulkorder theme=cream category=123]

This will make the shortcode only show products from the category with ID 123

You can also select multiple categories by separating them with a comma:

[b2bking_bulkorder theme=cream category=123,332]

If you are looking to show only a specific list of products (only those products and none else), you can use:

[b2bking_bulkorder theme=cream product_list="49, 188"]

Here 49 and 188 are examples of product IDs. The above shortcode will limit the list to these 2 products.

Sort Products By #

Another parameter you can use is the sortby parameter: this helps you control how items are sorted by default. The 3 options available are: atoz, ztoa, bestselling. The first 2 sort it alphabetically from a to z, or from z to a, while the last one puts the most sold items first.

[b2bking_bulkorder theme=cream sortby=bestselling]

Add SKU or Stock Columns #

The Cream theme supports showing SKU and Stock Quantities columns:

To do this, use sku=yes or/and stock=yes in your shortcode, e.g.:

[b2bking_bulkorder theme=cream sku=yes]

[b2bking_bulkorder theme=cream stock=yes]

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

Filter by Attributes #

You can also add a filter by attributes selector, for example to filter by color or size:

You can set the attributes and the text of the button in the shortcode:

[b2bking_bulkorder theme=cream attributes="color,size" attributestext="Color / Size"]


attributes = 
contains a comma-separated list of attribute slugs you want to include in the shortcode

attributestext = contains the actual text of the button. It defaults to "Attributes", but you can set a custom text

Edit Shortcode on the My Account Page #

The my account page uses the default [b2bking_bulkorder] shortcode, without any parameters. You may want to set certain parameters in order to choose specific categories, products, etc.

To do this, you can use the following code snippet:

add_filter('b2bking_my_account_bulkorder_shortcode', function($val){
	$shortcode = '[b2bking_bulkorder]';
	return $shortcode;
}, 10, 1);

You can modify the shortcode within the above snippet.

This code snippet can be added to functions.php or by using any snippets plugin.

Add a Custom Column to the Cream Order Form #

You may want to add a custom column when using the plugin's cream order form. You can do this by adding the following PHP code snippet to your site:

add_action('b2bking_bulkorder_cream_custom_heading', function(){
	?>
	<div class="b2bking_bulkorder_form_container_content_header_cream_sku">
		<?php esc_html_e('Price', 'b2bking'); ?>
	</div>
	<?php
});
add_action('b2bking_bulkorder_cream_custom_column', function($product){
	?>
	<div class="b2bking_bulkorder_cream_sku"><?php 

	$sale_price = $product->get_sale_price();
	$sale_price = round(floatval(b2bking()->b2bking_wc_get_price_to_display( $product, array( 'price' => $sale_price))),2);
	$regular_price = $product->get_regular_price();
	$regular_price = round(floatval(b2bking()->b2bking_wc_get_price_to_display( $product, array( 'price' => $regular_price))),2);

	if ($product->is_on_sale()){
		$price_display = wc_format_sale_price($regular_price, $sale_price);
	} else {
		$price_display = wc_price($regular_price);
	}

	echo $price_display;
	
	?></div>
	<?php
}, 10, 1);

This specifically adds a Price column which can also show discounts:

Out of Stock / Un-purchasable Products #

By default, the plugin only shows products that are purchasable (in stock, have a price, etc).

It is also possible to show out of stock items in the order form. To do that, add the following PHP code snippet to your site:

add_filter('b2bking_allow_outofstock_order_form','__return_true');

To allow showing all products that are not purchasable, you can add the following snippet instead:

add_filter('b2bking_allow_unpurchasable_order_form','__return_true');

Powered by BetterDocs