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. Coming from 1.x
  8. Before you publish

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. A minimum order value needs a developer: see Filters.

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.

    ↑ ↓ to moveEnter to openEsc to close