Linux 软件免费装
Banner图

Cartnorm B2B – EU VAT Number Validation (VIES) & Wholesale Prices for WooCommerce

开发者 cartnorm
更新时间 2026年10月31日 17:57
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

b2b vies eu vat wholesale vat number

下载

0.3.1 0.3.2

详情介绍:

Cartnorm B2B lets one WooCommerce shop sell to consumers and to businesses. Consumers keep seeing your normal prices. Business customers in a group see their own prices, net or gross, can be held to minimum order values and pack sizes, can request quotes, and can apply for a wholesale account themselves. EU businesses from other member states with a valid VAT ID buy without VAT, with the right legal note on the order. Customer groups Wholesale prices with a clear order of precedence For each group, the price of a product is found in this order:
  1. A fixed price for the group on the product (simple products and every single variation).
  2. A category discount of the group (subcategories included; the largest discount wins if a product is in several categories; 0% excludes a category).
  3. The group's discount on all products.
  4. The normal price.
A group price is never higher than the current normal or sale price. Quantity prices Add quantity prices per product and group, for example from 10 pieces €7, from 50 pieces €6. They are applied in the cart and shown as a small table on the product page. Works with simple and variable products, in the shop, on the product page, in the mini cart, in the classic cart and checkout and in the cart and checkout blocks. Your stored product prices are never changed. Order rules: minimum order value, minimum quantity, pack sizes Request a quote Wholesale registration Store modes: Hybrid or B2B only Showing only net prices is allowed only if consumers are effectively excluded, for example because every account is checked (VAT ID, company details) before it is approved. A checkbox "I am a business customer" is not enough. The settings screen explains this. Safe with page caches A consumer must never see a cached page with net prices that was made for a wholesale customer. Pages for logged-in B2B customers (and every page in "B2B only" mode) are sent with Cache-Control: private, no-store and DONOTCACHEPAGE. Group members get a signed cookie (cartnorm_b2b_group) so caches that cache logged-in users can keep the groups apart; prices are never taken from that cookie. Built-in support for WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and FlyingPress. The settings show which cache plugin was found and what Cartnorm B2B did, and a self-test loads your shop like an anonymous visitor and checks that no B2B prices leak. Unit prices Orders created in wp-admin When you create or edit an order in WooCommerce › Orders for a customer in a group, added items get the customer's group price (with quantity prices). "Recalculate" re-prices lines that still have the normal price, for example when you added the items before choosing the customer. Prices you changed by hand are kept. Net or gross prices per group Groups set to "excluding VAT" see shop and cart prices without VAT and with a clear "excl. VAT" suffix. Only the display changes; VAT is calculated as usual. Retail always uses your store settings. EU VAT ID check with correct 0% VAT The right legal wording on every order The wording is stored on the order in the language of the order and shown on the thank-you page, in My Account, in the order emails and in the admin order screen. Both phrases are built in for all 24 official EU languages (for example "Steuerfreie innergemeinschaftliche Lieferung (Art. 138 MwStSystRL)" and "Steuerschuldnerschaft des Leistungsempfängers (Reverse Charge, Art. 196 MwStSystRL)" in German, "Autoliquidation" in French, "Odwrotne obciążenie" in Polish), so they do not depend on installed translations. The language comes from WPML or Polylang, or from the language of the shop at checkout. The phrases and the language can be changed with filters. Works with Translations Translations come from translate.wordpress.org as language packs. So that shops do not have to wait for a language pack, the texts your customers see (price suffix, VAT ID field and its messages, order rule messages, quote and registration pages, customer emails) have built-in wording for German (Germany and Austria, formal "Sie"), Polish, French (France and Belgium), Italian, Spanish and Dutch (Netherlands and Belgium). The built-in wording is used only for strings that no installed language pack translates. The settings screens are in English until a language pack is available. Evidence for your tax office Every order with a VAT ID stores the VAT ID, its country, the VIES result, the consultation number, the time of the check and the decision. You see it in a box on the order screen, and invoice plugins can read it from the order meta (see "For developers"). Fast No database queries per cart line, also for the order rules. In our test a cart with 300 lines in a B2B group is calculated in about 40 ms. Not tax advice Cartnorm B2B applies the general EU rules for business-to-business sales (Articles 138 and 196 of Directive 2006/112/EC). It is not tax advice. Special cases – for example triangular trade, goods that are not dispatched to another member state, special schemes, or national rules – are not covered. Please confirm with your tax adviser how these rules apply to your business.

安装:

  1. Install and activate WooCommerce.
  2. Install and activate Cartnorm B2B.
  3. Go to WooCommerce › Settings › B2B and enter your own VAT ID.
  4. Under "Customer groups", create a group (for example "Wholesale").
  5. Assign customers to the group in Users › Edit user.
  6. Add group prices and quantity prices in the product editor (General tab, or each variation), and order quantities and pack sizes in the Inventory tab.
  7. Optional: set minimum orders, quote buttons and hidden prices per group under "Customer groups & rules", and the approval mode under "Wholesale registration". The quote and registration pages are created on activation; an existing page with the shortcode is used instead.

屏幕截图:

  • Product page for a wholesale customer: net group price and quantity prices.
  • Block checkout: a business customer from another EU country enters a VAT ID, VIES confirms it, and the order is calculated with 0% VAT.
  • VAT evidence on the order: VAT ID, VIES result, consultation number, time of the check, decision and the legal note.
  • Cart block: minimum order hint for a customer group ("add €80.00 more").
  • Answering a quote in WooCommerce › Quotes: price per line, validity date and a note to the customer.
  • Wholesale registration form with VAT ID check in VIES.
  • Settings: rules for Retail and for each customer group (prices with or without VAT, discounts, category discounts, minimum order, quotes).

常见问题:

Do my normal customers see any difference?

No. Guests and customers without a group are "Retail" and see exactly the prices WooCommerce shows without this plugin.

Can a customer put themselves into a wholesale group?

No. Only users who can manage WooCommerce or edit users can change a customer's group. The plugin never reads a group from a registration, checkout or account form.

How do I answer a quote?

Open WooCommerce › Quotes, enter a unit price (excluding VAT) for each line, check the validity date and click "Save and send quote". The customer receives an email with a link to accept. If you send the quote again, earlier links stop working.

What happens when the customer accepts a quote?

An order with your prices is created with the status "Pending payment". VAT is added with the same rules as at checkout (0% for valid EU VAT IDs from other member states). The customer goes straight to the "pay for order" page. Shipping is not added automatically; if you want to charge it, add it to your quote prices or edit the order before the customer pays.

Is the minimum order value checked with or without VAT?

The way the group sees prices: groups that see prices excluding VAT need the net subtotal, groups that see prices including VAT the gross subtotal. Coupons are not deducted.

Can a spammer get a wholesale account?

Applications get no group until you approve them (or VIES confirms the VAT ID, if you chose automatic approval). The form has a nonce, a honeypot field and a rate limit per IP address.

What happens if VIES is not available?

The customer can still order. VAT is charged, the order is marked "pending verification" and the VAT ID is checked again automatically (up to six times over about four days). If VIES then confirms the number, you get an order note so you can issue a corrected invoice. Order totals are never changed automatically.

Why is VAT charged although the VAT ID is valid?

Because the customer is in the same country as your shop (domestic sales always include VAT), outside the EU, or the VAT ID is from a different country than the billing (or shipping) address. The reason is stored on the order.

Which address decides about VAT?

The billing address by default. You can switch to the shipping address in the settings.

Does it work with the checkout block?

Yes. The VAT ID field is added with the official WooCommerce Additional Checkout Fields API (WooCommerce 8.9 or newer), and 0% VAT is shown as soon as the address is updated.

What happens when I deactivate the plugin?

Your products keep their normal prices and everyone simply sees them; nothing is changed in your product data. VAT evidence on existing orders stays. When you delete the plugin, its settings, groups, group prices, quantity rules, quotes, wholesale applications and cached VIES results are removed, and the quote and registration pages it created are moved to the trash. Orders, including orders created from quotes and their VAT evidence, are kept, because they belong to your order records.

Can a consumer see a cached page with net prices?

Not from WordPress page caches: pages for B2B customers are sent with "Cache-Control: private, no-store", DONOTCACHEPAGE is set and WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and FlyingPress are told not to cache them. Caches outside WordPress (your host's Varnish or nginx cache, Cloudflare "Cache Everything") cannot be configured by a plugin; most respect "no-store", and you should exclude logged-in users there. Run the self-test in WooCommerce › Settings › B2B › Store mode & caching after you change your caching setup.

Can customers change their group with the cartnorm_b2b_group cookie?

No. The cookie only helps caches keep separate copies. Prices always come from the group stored for the logged-in user on the server.

When may I show only net prices ("B2B only")?

Only when consumers are effectively excluded from buying: every customer has to register as a business and you check the account (VAT ID, company details) before it is approved. A notice or a checkbox "I am a business customer" is not enough, and consumers who can still order must see prices including VAT. Use "B2B only" mode with manual approval or automatic approval by VIES. This is not legal advice; please ask your lawyer or tax adviser.

Does it work with German Market?

Not yet tested, because German Market's source code was not available to us. Group prices work as usual. If German Market calculates unit prices automatically from the product price, they follow the group price; unit prices you entered by hand in German Market are not recalculated. Cartnorm B2B's own simple unit price is switched off when German Market (or Germanized) is active.

How many customer groups can I create?

As many as you need. There is no limit on the number of B2B groups, and every group can have its own prices, quantity prices, order rules and quote settings.

Do I need the Pro version?

No. Everything described here is free, without time limits and without a limit on customer groups. A separate add-on, Cartnorm B2B Pro, exists for shops that need more.

更新日志:

0.3.2 0.3.1 0.3.0 0.2.0 0.1.0