2.0 Beta

Smootify 2.0 is in public beta. Your 1.x store keeps working. Move when you want.

What changed

Quotes and B2B

Turn the cart into a quote request that reaches Shopify as a draft order, and show business customers their company, their quantity rules and their prices.

v2.0 betaServer planAdd-on: Draft Orders
Open .md1.x page ↗
On this page
  1. How it fits together
  2. 1. Build a quote cart
  3. 2. Or add a quote button to a normal cart
  4. 3. What the draft order holds
  5. 4. Send the quote from Shopify
  6. 5. Business customers (B2B)
  7. 6. Volume prices for companies
  8. Coming from 1.x
  9. Before you publish
Video · 3:52B2B quotes as draft orders4 of 18 in the add-on videos

With quotes, the cart does not go to checkout: it sends a request. You receive a draft order in Shopify, with the lines, variants and quantities the customer chose. You set your price, send the invoice, and the customer pays it in Shopify’s checkout. This page builds the quote cart and covers what Smootify shows to business (B2B) customers.

Note

Quotes need the Server plan and Draft Orders turned on in the Smootify dashboard. They run on the site’s licensed domain. On your .webflow.io address they run once the site is paid, not during a trial.

How it fits together

A quote is a cart. You build it as in Build the cart, then choose one of two ways:

data-draft="true"

A quote cart

Built with
The attribute on smootify-cart. Every submit of its form sends a quote.
Use it when
The store sells only on quote, or on a quote page of its own.
name="draft-order"

A quote button in a normal cart

Built with
A Custom element with the tag button and type="submit", next to the checkout button, which keeps working.
Use it when
Some customers buy and others ask.

What Smootify needs:

  • a smootify-cart with its Form Block, as for any cart;
  • a Text field whose Name setting is email, so the draft order has an address to send the invoice to.

What is up to you: the layout, the other fields you ask for, and the texts. Write them as a request, not as an order.

1. Build a quote cart

Example structure of the Navigator
smootify-cartCustom Elementdata-draft=true
Text Block“Your quote is empty”cart-condition=no-items-in-quote
Form Block
Form
cart-itemCustom Element
Text Block“Product”cart-item=title
Text Block“Red / M”cart-item=variant-title
quantity-inputCustom Element
buttonCustom Elementdata-action=minus
Text“-”
Text FieldName “quantity”
buttonCustom Elementdata-action=plus
Text“+”
buttonCustom Elementdata-action=remove
Text“Remove”
Text FieldName “email”
Form Button“Send request”Waiting text “Sending…”
Success Message
Text Block“Thank you. We will send you a quote by email.”
Error Message
Text Block“Something went wrong”

In a quote cart, the parts of the Form Block change meaning: the Success message is not the empty cart here. Two conditions work inside smootify-cart, cart-condition="items-in-quote" and cart-condition="no-items-in-quote". The cart’s four states:

Form

The quote has lines

The lines, the email field and the Form Button that sends the request. items-in-quote shows, such as the heading.

Success message

The request is sent

Write it as a request received, not an order. Smootify empties the cart, and “Your quote is empty” stays hidden. A Redirect URL on the Form opens a thank-you page instead.

no-items-in-quote

The quote is empty

Put it outside the Form: the Form and the Success message are hidden. smootify-cart has has-empty-quote.

Error message

Shopify refuses the request

Shopify's errors, as in any cart.

2. Or add a quote button to a normal cart

In a cart without data-draft, add a Custom element with the tag button, the custom attribute type="submit" and the custom attribute name="draft-order", inside the Form next to the checkout button. The email field goes in the same Form.

Example structure of the Navigator
Form Button“Check out”Waiting text “Please wait…”
buttonCustom Elementtype=submitname=draft-order
Text“Ask for a quote”

A Webflow Button cannot do this: it publishes a link, and a link does not submit the form.

3. What the draft order holds

Each field of the form has its place in the draft order:

1 On your site, in the quote cart's Form

Text field · Name emailanna@studionord.com
Text field · Name CompanyStudio Nord
Text field · Name Phone+39 02 555 0142
Text area · Name noteDeliver after 5 pm

2 Orders › Drafts › #D12

ProductsEUR
Oak tableNatural / 180 cmEngraving: S.N.€1,200.00 × 2
Oak benchNatural€350.00 × 4
Customer
anna@studionord.com
Notes
Deliver after 5 pm
Additional details
CompanyStudio NordPhone+39 02 555 0142
Add discountSend invoice
  • The lines keep their properties, such as an engraving or an uploaded file. A Magic Box arrives as the products inside it. A Shopify bundle arrives as its components, with a “Bundle” detail listing them.
  • The customer is the Shopify customer with the email in the form. If there is none, Shopify creates one with that email. Without an email field, a logged-in customer’s account is used.

Subscription lines are left out: a draft order does not carry the selling plan. See Subscriptions.

4. Send the quote from Shopify

In your Shopify admin, the request is under Orders > Drafts, with the discount codes the customer had applied to the cart. Change the prices or add a discount, then send the invoice. The customer gets an email with a link to Shopify’s checkout, at the price you set. Discount codes can still be used there.

To get an email for each new request, import the ready-made Quote request notification workflow in the free Shopify Flow app. It reacts when a draft order is created: after importing it, replace the default email with the address that should receive the requests.

5. Business customers (B2B)

Shopify’s B2B features, with companies, catalogs and quantity rules, are on every paid Shopify plan. Outside Shopify Plus, a store can have at most 3 active B2B catalogs, and it needs Shopify’s new Markets: see Shopify’s B2B plans. When a customer who belongs to a company logs in with customer accounts, Smootify asks Shopify for products and the cart as that company’s buyer, using the company’s first location. The prices and quantity rules Shopify sets for that company then apply on the site.

Show the company. company="name" shows the name of the customer’s company, anywhere on the page. company-metafield="…" shows a metafield of the company, such as a customer code or the name of their sales contact, and if-company-metafield shows an element only when that metafield has a value. For a customer without a company, these elements are removed, and so are the if-company-metafield elements for a visitor who is not logged in. unless-company-metafield does the opposite: it shows its element when the company has no value for that metafield, and to guests, who have no company. Use it for the guest’s Add to cart next to the company’s Add to quote list. See customer attributes.

Show the quantity rules. Inside smootify-product:

  • variant="quantity-min": the smallest quantity that can be ordered;
  • variant="quantity-max": the largest, hidden when there is no maximum;
  • variant="quantity-increment": the pack size the quantity must be a multiple of.

Buy for some, quote for others. Put the quote button inside an element with customer-tagged="wholesale" (use your own tag). Only logged-in customers with that tag see it. Everyone else keeps the checkout button.

Example structure of the Navigator
Form Button“Check out”Waiting text “Please wait…”
Div Blockcustomer-tagged=wholesale
buttonCustom Elementtype=submitname=draft-order
Text“Ask for a quote”

To order the same list again later, customers can use Buy again on a past order: see Orders and buy again. For a minimum order value, or products sold in packs, use purchase rules.

Customers also see the quotes you send them in their account, with a link to pay each one: see Orders and buy again.

6. Volume prices for companies

A B2B catalog in Shopify can lower the price as the quantity grows: €10.00 each from 1, €9.00 from 10, €8.50 from 50. Smootify shows these price breaks as a table on the product page, and the price follows the quantity in the form. Volume prices need neither the Server plan nor Draft Orders.

Where the prices come from. In Shopify, you set the price breaks of a variant in the price list of a B2B catalog. Outside Shopify Plus, Shopify attaches that catalog to a B2B market made of the company’s locations. A catalog assigned directly to company locations is a Shopify Plus feature. Only the contacts of a company in that catalog get the breaks: guests and customers without a company see none.

Build the table. Inside smootify-product:

  • variant="price-breaks" on a Div block is the template of one row. Smootify repeats it once per row: the variant’s price from its minimum quantity, then each price break.
  • Inside the row, price-break="range" writes 1–9, 10–49, 50+. price-break="price" writes the price of one, "savings" the saving, such as -10% (hidden on the first row), and "total" the row’s first quantity at its price. "min" and "max" write the row’s first and last quantity (max is hidden on the last row). A row with none of these writes 10+ €9.00.
  • condition="has-price-breaks" on the section around it hides it for buyers without breaks.
  • variant="price-at-quantity" on a Text block writes the price of one at the form’s quantity, and follows it.
Example structure of the Navigator
Div Blockcondition=has-price-breaks
Div Blockvariant=price-breaks
Text Block“1–9”price-break=range
Text Block“€10.00”price-break=price
Text Block“-10%”price-break=savings
Div Block
Text“Price each:”
Text Span“€10.00”variant=price-at-quantity

A row is a choice. A click on a row sets the form’s quantity to the row’s first quantity. The row of the current quantity gets the class is-active: style it with a combo class. For the click to work, the add-to-cart form needs its quantity field.

Add a row to the cart. Optionally, put a Custom element with the tag button and price-break="add" inside the row. It adds the row’s first quantity to the cart without changing the form’s quantity. It goes through the product’s smootify-add-to-cart, with its add-ons, so that form must be on the page. To make it read “Add 10”, write Add in it followed by an element with price-break="min": <button price-break="add">Add <span price-break="min"></span></button>.

Example: a café orders mugs at its company price

Stoneware mug, 300 mlCompany price · Café Nord
1–9€14.20€14.20Add 1
10–49€12.80-10%€128.00Add 10
50+€11.40-20%€570.00Add 50
12€12.80 per piece at this quantity

Click a row, its Add button or the quantity.

1variant="price-breaks"One row, repeated once per price break. The row of the current quantity gets is-active, and a click sets the quantity to the row’s first quantity.
2price-break="range"1–9, 10–49, 50+.
3price-break="price"The price of one piece in that row.
4price-break="savings"The saving on the first row’s price. Hidden on the first row.
5price-break="total"The row’s first quantity at its price: 10 × €12.80.
6price-break="add"A button: “Add ” and price-break="min", the row’s first quantity. It adds that quantity to the cart, and the quantity field stays as it is.
7variant="price-at-quantity"The price of one piece at the form’s quantity. It follows the quantity.

With purchase rules. The first row starts at the variant’s minimum: the higher of the B2B catalog’s minimum and the minimum of the purchase rules. Price breaks at or below that minimum are left out.

To order many variants of a product at once, each row with its own quantity and its company volume price, add a quick order list.

Coming from 1.x

window._filterDraftOrderData still works but is deprecated. The draft_order_data filter replaces it and applies to every draft order, not only quotes: see Filters.

Before you publish

On your .webflow.io address, press Alt⇧ ShiftD (⌥ Option⇧ ShiftD on a Mac) to turn on Smootify’s debugger, then send a test request and open it in Shopify.

Check these first

  • The draft order has no email. The field’s Name setting is not exactly email. Webflow renames fields when you copy a form, such as Email or Email 2. Set the Name back to email.
  • The quote cart goes to checkout. Draft Orders is not available on this page: check the Server plan, that Draft Orders is turned on in the dashboard, and that the page is on the licensed domain. Without it, Smootify turns a quote cart back into a normal cart, and a quote button does nothing.
  • Customers think they have ordered. The Success message still reads like an order confirmation. Rewrite it as a request received.
  • “Your quote is empty” never shows. The element with cart-condition="no-items-in-quote" is inside the Form, which is hidden while the cart is empty. Move it outside the Form, inside smootify-cart.
  • The quote button opens a page or does nothing. It is a Webflow Button, which is a link. Use a Custom element with the tag button and type="submit".
  • A subscription is missing from the draft order. Smootify leaves subscription lines out of a quote.
  • The volume price table never shows. The customer is not a contact of a company whose B2B catalog has price breaks for that variant. Outside Shopify Plus, the catalog must be attached to a B2B market of the company’s locations.

    ↑ ↓ to moveEnter to openEsc to close