Naar de inhoud
Script-voorbeelden

Migrating a hide payment method script

Worth noticing that the show-a-gateway examples do not add anything: they delete everything that does not match. Show and hide are the same operation with the predicate flipped, and both end up in the same place.

Andere Shopify-API
Wat het Script deed

It deleted matching payment gateways from the list checkout offered.

Probeer het in je eigen winkel

Plak het in Scripts-redding en kijk wat eruit komt

  1. Kopieer de Ruby met de knop naast elk Script op deze pagina.
  2. Open in je Shopify-beheer Stackable, dan Hulpmiddelen, dan Scripts-redding.
  3. Plak het daar, lees wat het hulpmiddel zegt te gaan bouwen en vergelijk dat met de instellingen op deze pagina.

Scripts-redding zit in het Pro-abonnement. Er wordt niets gepubliceerd totdat je vertelt wat je oude Script gaf en beide bedragen tot op de cent kloppen.

Het Script

Andere Shopify-API
De oorspronkelijke Ruby

HIDDEN_GATEWAY = "Cash on Delivery"
THRESHOLD = Money.new(cents: 5000)

if Input.cart.subtotal_price < THRESHOLD
  Output.payment_gateways = Input.payment_gateways.delete_if do |payment_gateway|
    payment_gateway.name == HIDDEN_GATEWAY
  end
else
  Output.payment_gateways = Input.payment_gateways
end
Wat er met deze gebeurt

This needs a different kind of Shopify app

Your Script hid, renamed, or reordered payment methods. Shopify builds that with the Payment Customization API, which Stackable does not ship.

Dit deel van een Script is geen korting. Shopify bouwt het met een ander functietype, hierboven genoemd, dat Stackable niet levert.

Lees de documentatie van Shopify

Redensleutel: otherApi.paymentCustomization

Er is hier geen winkelwagen om te testen, want er wordt niets gebouwd. Dit plakken levert de melding hierboven op en verder geen campagne.

Veelgestelde vragen

Will Stackable rebuild this script?
No, and the reason is stated rather than hidden: Your Script hid, renamed, or reordered payment methods. Shopify builds that with the Payment Customization API, which Stackable does not ship.

Verwante Script-vormen

Purchase quantity limit

A cap on how many units a shopper could buy, enforced by trimming the cart.

Remove products by country

Products that could not ship to the shopper’s country, quietly deleted.

Plak je Script en zie het herbouwd worden

De herbouw wordt getoetst aan het bedrag dat je oude Script rekende voordat je hem kunt publiceren.

We gebruiken essentiële cookies om deze site te laten werken en, alleen met uw toestemming, analytische cookies om verkeer te begrijpen. Lees ons Cookiebeleid.