Buy B2BKing
$299 $199
Introduced in B2BKing v3.1.0, the Quick Orders via CSV feature is a quick way for customers to add products to their cart by uploading a 2-column CSV file with columns for SKU and Quantity.
This functionality should not be confused with the Bulk / Wholesale Order Form.
The CSV order form can be set up by adding the [b2bking_csvorder] shortcode to any page.
The form accepts a CSV file that has SKU numbers in the first column and quantities in the second column, such as the following file:
The plugin parses the entire CSV but only looks at the first two columns. Everything else will be ignored. The plugin checks whether the first item in a row is a valid SKU and, if not, ignores that row. The example above is valid, as the header row would be ignored (because the first element in the row is not a valid SKU).
You may also want to add this form to the My Account page, as shown in the following image:
To achieve this, you can add the following PHP code snippet to your site:
function b2bking_add_csv_order_endpoint() { add_rewrite_endpoint( 'csv-order', EP_ROOT | EP_PAGES ); } add_action( 'init', 'b2bking_add_csv_order_endpoint' ); function b2bking_csv_order_query_vars( $vars ) { $vars[] = 'csv-order'; return $vars; } add_filter( 'query_vars', 'b2bking_csv_order_query_vars', 0 ); function b2bking_add_csv_order_link_my_account( $items ) { $last_item = $items['customer-logout']; unset($items['customer-logout']); $items['csv-order'] = 'CSV Orders'; $items['customer-logout'] = $last_item; return $items; } add_filter( 'woocommerce_account_menu_items', 'b2bking_add_csv_order_link_my_account', 1000000 ); function b2bking_csv_order_content() { echo '<h2>Quick CSV Order</h2>'; echo do_shortcode( '[b2bking_csvorder]' ); } add_action( 'woocommerce_account_csv-order_endpoint', 'b2bking_csv_order_content' );
Powered by BetterDocs