Zum Inhalt springen
Script-Beispiele

Migrating a free shipping over a threshold script

If a Plus store had exactly one shipping script, it was this one. It is also the entry where the app’s own preview and the real checkout quote different savings on purpose, and knowing why is worth two minutes on camera.

Nachgebaut
Was das Script gemacht hat

It discounted every delivery rate to zero once the cart subtotal passed a threshold.

Im eigenen Shop ausprobieren

Fügen Sie es in die Scripts-Rettung ein und sehen Sie, was daraus wird

  1. Kopieren Sie das Ruby mit der Schaltfläche neben jedem Script auf dieser Seite.
  2. Öffnen Sie im Shopify-Adminbereich Stackable, dann Tools, dann Scripts-Rettung.
  3. Fügen Sie es dort ein, lesen Sie, was das Tool bauen will, und vergleichen Sie das mit den Einstellungen auf dieser Seite.

Die Scripts-Rettung gehört zum Pro-Tarif. Nichts wird veröffentlicht, bevor Sie angeben, was Ihr altes Script berechnet hat, und beide Zahlen auf den Cent genau übereinstimmen.

Das Script

Nachgebaut
Das ursprüngliche Ruby

Input.shipping_rates.each do |shipping_rate|
  if Input.cart.subtotal_price >= Money.new(cents: 5000)
    shipping_rate.apply_discount(shipping_rate.price, message: "Free shipping over $50")
  end
end

Output.shipping_rates = Input.shipping_rates
Was daraus wird

Erkannt als Shipping discount und neu aufgebaut als Angebot vom Typ free_shipping. Das sind die echten Konfigurationsschlüssel, mit denen das Angebot gespeichert wird, sodass Sie Ihren eigenen Nachbau Feld für Feld damit abgleichen können.

Jede Einstellung im Detail
EinstellungWertKonfigurationsschlüssel
Offer typefree_shippingtype
Countingper_cartcounting
Recurrenceoncerecurrence
Tier 1min spend $50.00 -> 100% offtiers[0]
Target scopealltarget.scope
MethodautomaticdiscountMethod
Allocationstandardstacking.allocation
Combines with other discountsnostacking
Sie werden um Bestätigung gebeten
  • Confirm which products this applies to. We could not read product targeting from the script.
Sie werden darauf hingewiesen
  • This discounts every shipping rate at checkout, not one named rate.
Der Warenkorb, der es belegt

Aufgebaut in unserem öffentlichen Demo-Shop Meridian Goods, damit sich jeder Preis hier nachrechnen lässt und nicht geglaubt werden muss. Der Rabatt unten ist das, was dieselbe Engine, die im Checkout läuft, für genau diesen Warenkorb berechnet.

Der Warenkorb, der dieses Angebot auslöst, und was es kostet
ArtikelMengeEinzelpreis
Ceramic Travel Mug1$22.00
Summit Insulated Bottle1$28.00
Zwischensumme$50.00
Lieferung, normalerweise $6.90$0.00
Summe$50.00

Nicht angemeldet oder als Kunde ohne Tags angemeldet.

Die Zahl, an der das Tool Sie misst

This rebuild only changes shipping. We price shipping against a sample rate rather than the rate your shopper saw, so there is no figure here we could honestly compare. Publishing records that the amount was not checked.

Der Warenkorb, der nichts auslösen darf
  • swap the cart for a single Braided USB-C Cable
Der Warenkorb, der dieses Angebot nicht auslösen darf
ArtikelMengeEinzelpreis
Braided USB-C Cable1$14.00
Zwischensumme$14.00
Summe$14.00

Nicht angemeldet oder als Kunde ohne Tags angemeldet.

Häufige Fragen

Will Stackable rebuild this script?
Yes. Every spelling on this page is rebuilt today as a free_shipping offer, and the cart above is the one that proves it.
What cart proves it works?
1 x Ceramic Travel Mug at $22.00 plus 1 x Summit Insulated Bottle at $28.00. The engine takes $6.90 off, and checkout charges $50.00 plus $0.00 delivery.
What will I have to check before publishing?
Confirm which products this applies to. We could not read product targeting from the script. This discounts every shipping rate at checkout, not one named rate.

Verwandte Script-Formen

Percentage off shipping

A share taken off every delivery rate at checkout.

Amount off shipping

A flat sum off the delivery charge, floored at free.

Flat rate shipping

Every delivery rate rewritten to one price rather than reduced by an amount.

Fügen Sie Ihr Script ein und sehen Sie den Nachbau

Der Nachbau wird mit dem Betrag abgeglichen, den Ihr altes Script berechnet hat, bevor Sie ihn veröffentlichen können.

Wir verwenden essenzielle Cookies für den Betrieb dieser Website und, nur mit Ihrer Erlaubnis, Analyse-Cookies, um den Traffic zu verstehen. Lesen Sie unsere Cookie-Richtlinie.