Cloud Commerce 2.64 can limit checkout to customers you approve

3 hours ago

Cloud Commerce 2.64 lets a store sell only to customers it has approved, the wholesale and B2B case. The new gates are opt-in, so a store that sets nothing checks out as before. Around that come a minimum shipping price, and fixes for coupons, PagHiper, Braspag and deploys.

Ask about this presentation

Chapters

  1. 0:00Checkout for approved customers
  2. 0:19Checkout gates
  3. 0:40New logins wait for approval
  4. 1:00Minimum shipping price
  5. 1:19Coupon messages
  6. 1:36PagHiper and Braspag
  7. 1:57Deploys and product pages
  8. 2:16Security: nodemailer 10
  9. 2:31Before you upgrade
Show transcript
  1. Cloud Commerce 2.64 lets a store sell only to customers it has approved, the wholesale and B2B case. The new gates are opt-in, so a store that sets nothing checks out as before. Around that come a minimum shipping price, and fixes for coupons, PagHiper, Braspag and deploys.

    Slide text
    Cloud Commerce 2.64

    Cloud Commerce 2.64 can limit checkout to customers you approve

    Plus a shipping price floor, correct coupon messages, and fixes for PagHiper, Braspag and deploys.
    Cloud Commerce demo storefront on desktop and mobile
  2. The settings live under checkout in the store config. Customers only refuses shoppers who aren't registered, or aren't enabled yet. Require staff signature also wants the store's own approval mark. And a minimum subtotal turns away small carts. Shoppers see these messages at checkout, and if the registration check fails, they're asked to try again.

    Slide text
    Store config · checkout

    Checkout can now refuse unknown, unapproved or small orders

    Registered customers only
    checkout.customersOnly: true
    “Only registered customers can place orders”CKT804
    Approved by store staff
    checkout.requireStaffSignature: true
    “Your account is not yet approved by the store”CKT805
    Minimum order subtotal
    checkout.minSubtotal: 300
    “Minimum order subtotal is 300.00”CKT806
  3. There's a catch. A first login creates the customer, and the Store API enables new customers by default, so they would pass the gate. Set the passport new customer default to enabled false, and first logins wait for approval. When staff enable or approve someone, two new events let your apps react.

    Slide text

    New logins pass the gate unless they start out disabled

    Set both together passport.newCustomer: { enabled: false }
    checkout.customersOnly: true
    New events your apps can listen for
    A customer is enabled
    customers-enabledSet
    Staff approve a customer
    customers-staffSignatureSet
  4. Custom shipping rules gain a minimum price. Say three percent of the cart, but at least a hundred and fifty reais. On a cart of three thousand reais, three percent is ninety, so shipping costs the hundred and fifty floor. On ten thousand, the percentage wins at three hundred. It works on weight rules too.

    Slide text

    Percentage and weight shipping rules can now have a minimum price

    3% of the cart, at least R$ 150
    amount_tax: 3
    min_price: 150
    Cart R$ 3,000
    3% of cart R$ 90
    Shipping R$ 150
    The floor applies
    Cart R$ 10,000
    3% of cart R$ 300
    Shipping R$ 300
    The percentage applies
  5. In the discounts app, while a kit or gift campaign was giving a discount, checkout took any typed coupon as accepted. Now an unknown coupon is called invalid, and a real coupon on a small cart says how much more to add. Stores without campaigns see no change.

    Slide text

    A wrong coupon now says it's wrong, even during a campaign

    Unknown coupon, kit or gift campaign active
    “Discount coupon entered is invalid.”
    Real coupon, cart under its minimum
    “Add more R$ … to cart to get the discount.”
    Cumulative freebie coupons stay valid when a kit is active. Stores without campaigns see no change.
  6. Two payment apps got fixes. PagHiper had its billet switch backwards, showing the billet only when it was set to disabled. Now it shows unless disabled, your minimum amount applies to Pix and billet, and due dates are read in Brasília time. Braspag now accepts a saved address, and sends the saved phone with its own country code.

    Slide text

    PagHiper lists the billet unless disabled, and Braspag takes saved addresses

    PagHiper
    • Banking billet is listed unless pix.disable_billet is set
    • Your min_amount applies to Pix and billet; Pix keeps its R$ 3 floor
    • Due dates read in Brasília time, and Pix gets a countdown
    Braspag
    • Paying with a saved address works
    • Brazil is sent as BRA
    • The saved phone keeps its own country code
  7. The command line tool fixes two deploy problems. Rewrites a store adds to hosting now go before the server rendering catch-all, so they match. Partial deploys now pass force too, so a first deploy of a function with a retry policy works on CI. And products without a public price skip the rich snippet.

    Slide text

    Store rewrites now match, and partial deploys go through on CI

    CLI
    Store hosting rewrites go before the SSR catch-all **, so they match
    CLI
    --force also on deploy --only functions:<codebase>, so a first deploy of a function with a retry policy works on CI
    Storefront
    Products without a public price skip the JSON-LD product snippet
  8. One update is marked as a security fix. The emails package moves nodemailer from version 9 to 10. It's a major version, but the only code change is a type import, and the separate nodemailer types package is dropped.

    Slide text
    SECURITY · @cloudcommerce/emails
    nodemailer 9 → 10
    "nodemailer": "^10.0.0", up from ^9.1.1. The SMTP provider only changes how it imports the Transporter type, and @types/nodemailer is dropped.
  9. The notes list no breaking changes, and the new gates stay off until you set them. If you use PagHiper, check the billet switch, which now works the other way round, and your minimum amount. If you sell only to approved customers, set customers only together with the new customer default. That's Cloud Commerce 2.64, with checkout for the customers you approve.

    Slide text
    v2.64.0

    No breaking changes listed. Two things to check.

    If you use PagHiper
    The billet now shows unless pix.disable_billet is set, the reverse of before, and your min_amount applies to both methods.
    If you sell only to approved customers
    Set checkout.customersOnly together with passport.newCustomer: { enabled: false }.
    github.com/ecomplus/cloud-commerce/releases/tag/v2.64.0

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️