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.
ReconstruitIt discounted every delivery rate to zero once the cart subtotal passed a threshold.
Collez-le dans Sauvetage des Scripts et regardez ce qu'il reconstruit
- Copiez le Ruby avec le bouton placé à côté de chaque Script de cette page.
- Dans votre interface Shopify, ouvrez Stackable, puis Outils, puis Sauvetage des Scripts.
- Collez-le, lisez ce que l'outil annonce qu'il va construire et comparez-le aux réglages de cette page.
Sauvetage des Scripts fait partie du forfait Pro. Rien n'est publié tant que vous n'avez pas indiqué la remise de votre ancien Script et que les deux chiffres ne correspondent pas au centime près.
Le Script
ReconstruitInput.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_ratesReconnu comme Shipping discount et reconstruit en offre de type free_shipping. Voici les vraies clés de configuration avec lesquelles l'offre est enregistrée, pour que vous puissiez comparer votre propre reconstruction champ par champ.
| Réglage | Valeur | Clé de configuration |
|---|---|---|
| Offer type | free_shipping | type |
| Counting | per_cart | counting |
| Recurrence | once | recurrence |
| Tier 1 | min spend $50.00 -> 100% off | tiers[0] |
| Target scope | all | target.scope |
| Method | automatic | discountMethod |
| Allocation | standard | stacking.allocation |
| Combines with other discounts | no | stacking |
- 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.
Construit sur notre boutique de démonstration publique, Meridian Goods, pour que chaque prix ici puisse être reproduit plutôt que cru sur parole. La remise ci-dessous est ce que le moteur qui tourne au paiement calcule pour ce panier précis.
| Article | Qté | Prix unitaire |
|---|---|---|
| Ceramic Travel Mug | 1 | $22.00 |
| Summit Insulated Bottle | 1 | $28.00 |
| Sous-total | $50.00 | |
| Livraison, normalement $6.90 | $0.00 | |
| Total | $50.00 | |
Déconnecté, ou connecté en tant que client sans tag.
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.
- swap the cart for a single Braided USB-C Cable
| Article | Qté | Prix unitaire |
|---|---|---|
| Braided USB-C Cable | 1 | $14.00 |
| Sous-total | $14.00 | |
| Total | $14.00 | |
Déconnecté, ou connecté en tant que client sans tag.
Questions fréquentes
- 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.
Formes de Script apparentées
A share taken off every delivery rate at checkout.
A flat sum off the delivery charge, floored at free.
Every delivery rate rewritten to one price rather than reduced by an amount.
Collez votre Script et voyez sa reconstruction
La reconstruction est comparée au montant que facturait votre ancien Script avant que vous puissiez la publier.