Exempel på migrering från Shopify Scripts
Varje form av Shopify Script vi har katalogiserat, med den ursprungliga Ruby-koden, vad den blir, den exakta varukorgen som bevisar det, och avslagen utskrivna i sin helhet.
- Script-former
- 42
- Ombyggda i dag
- 38
- Avslagna, med skäl
- 21
Varför avslagen finns på den här sidan
Inget migreringsverktyg publicerar det som det inte klarar, så en handlare som söker efter en viss Script-form hittar marknadsföring och inget annat. Varje avslag här står med skälet, med den exakta text som appen visar, och med en länk till Shopifys egen dokumentation varje gång skälet ligger hos Shopify och inte hos oss.
13 av de 21 avslagen i biblioteket är vår egen lucka, och det säger vi rakt ut. 2 är begränsningar i Shopify som ingen rabattapp kan gå runt, och 4 är inte rabatter alls: de kräver en annan sorts Shopify-app, namngiven på sidan.
Hur ditt Script skrevs
De två dialekter som det mesta av den inklistrade Ruby-koden är skriven i, och vad var och en avslöjar direkt.
- Help Center script templateOmbyggt
The dialect Shopify’s own documentation taught, with its settings block above a do-not-edit banner.
- Script Creator outputOmbyggt
Generator output, with a CAMPAIGNS array at the bottom that states the merchant’s intent as data.
Priser och procent
Att sätta ett pris, att dra av ett belopp, och paret som skiljer sig åt med ett enda minustecken.
- Fixed price per itemOmbyggt
Everything in the clearance line repriced to one round number per unit.
- Amount off each itemOmbyggt
A flat sum taken off every unit, however many the shopper bought.
- Amount off the orderOmbyggt
One lump sum off the whole cart, spread across the lines.
- Sitewide percentage offOmbyggt
One percentage off the whole catalogue, with no condition attached.
- Capped percentage discountOmbyggt
A percentage with a ceiling on it, so a large cart never gave away more than a set maximum.
- Remove VAT outside the EUOmbyggt
Tax-inclusive prices reduced for shoppers outside the VAT area.
Antal, BOGO och gratis artiklar
Köp-och-få-erbjudanden, och räknesätten som avgör hur mycket du ger bort.
- Buy one get one freeOmbyggt
A set of paid units earns an extra unit at no charge.
- Buy X get Y, inclusiveOmbyggt
The same buy-and-get offer, counted so the reward sits inside each set rather than beside it.
- Limit the discounted unitsOmbyggt
The discount applied to the first few units only, with the rest at full price.
The least expensive thing in the cart discounted, once.
- BOGO across the cartOmbyggt
Buy-and-get applied to the whole eligible selection rather than within one line.
Beloppsgränser
Förmåner som låses upp när varukorgen är värd tillräckligt mycket.
- Spend threshold, percentageOmbyggt
A percentage that unlocks once the cart is worth enough.
- Spend threshold, amount offOmbyggt
A flat sum off the order once the cart crosses a value.
- Discounted cart subtotalShopify-begränsning
A threshold read from what was left after a code had already come off.
Frakt
Rabatt på leveransen, och de frakt-Script som visar sig inte vara rabatter alls.
- Percentage off shippingOmbyggt
A share taken off every delivery rate at checkout.
- Amount off shippingOmbyggt
A flat sum off the delivery charge, floored at free.
- Flat rate shippingStöds inte än
Every delivery rate rewritten to one price rather than reduced by an amount.
Delivery drops to free once the cart is worth enough.
Free delivery for one group of customers and nobody else.
- Discount one named rateStöds inte än
One delivery option discounted while the others stayed at full price.
- Free shipping on certain productsStöds inte än
Delivery went free because of what was in the cart, not what it was worth.
- Hide shipping ratesAnnat Shopify-API
A delivery option removed from checkout under a condition.
Vem rabatten nådde
Kundtaggar, orderhistorik och samlad köpsumma.
- First order discountStöds inte än
A discount for shoppers with no order history, or with enough of it.
- First time customer, cheapest itemStöds inte än
A new-customer gate wrapped around a cheapest-item reward.
- Lifetime spend discountStöds inte än
A reward for customers who had spent enough over their lifetime.
- Customer tag discountOmbyggt
A discount only tagged customers ever saw.
Rabattkoder
Script som bevakade en kod, kände igen en hel familj av dem, eller avvisade en.
- Reject a discount codeStöds inte än
A code the shopper typed, turned away at checkout with a message.
- Discount code drivenOmbyggt
Script logic that only ran when the shopper had typed a particular code.
- Discount code patternStöds inte än
A whole family of codes driving one rule through a prefix match.
Omfattning och undantag
Vad en rabatt fick röra, och vad den måste lämna i fred.
- Scoped to a tag or vendorOmbyggt
A discount limited to products carrying one tag, vendor or type.
- Exclude sale itemsOmbyggt
Already-marked-down products protected from a second discount.
- Exclude gift cardsOmbyggt
Gift cards left out of a discount that would otherwise have hit them.
- Line item propertyStöds inte än
A discount keyed on a property attached to one cart line.
- Exclude subscription itemsStöds inte än
Subscription lines held apart from the discount that hit everything else.
- Skip already discounted itemsShopify-begränsning
Lines another discount had already touched, held back from a second one.
Ingen rabatt alls
Script som ändrade varukorgen eller kassan i stället för priset.
- Purchase quantity limitAnnat Shopify-API
A cap on how many units a shopper could buy, enforced by trimming the cart.
- Remove products by countryAnnat Shopify-API
Products that could not ship to the shopper’s country, quietly deleted.
- Hide a payment methodAnnat Shopify-API
A payment option taken off checkout under a condition.
Problem med själva filen
Två sätt som en inklistrad text är oläsbar redan innan något kan byggas om från den.
- Several campaigns in one fileStöds inte än
One file holding several separate rules that ran one after another.
- Copied from a forum threadKontrollera texten
A paste that lost its instance variables on the way through a forum post.
Klistra in ditt döda Script och se vad det blir
Ombyggnaden stäms av mot beloppet som ditt gamla Script tog ut innan något kan publiceras.