Saltar al contenido
Ejemplos de Scripts

Migrating a hide shipping rates script

Where most shipping pastes land. The in-app picker offered four shipping templates and three of them hid, renamed or reordered rates, which is a different Shopify feature now and not a discount at all.

Otra API de Shopify
Qué hacía el Script

It deleted matching delivery options from the list before checkout rendered it.

Pruébalo en tu propia tienda

Pégalo en Rescate de scripts y mira qué reconstruye

  1. Copia el Ruby con el botón que hay junto a cualquier Script de esta página.
  2. En tu panel de Shopify, abre Stackable, luego Herramientas y luego Rescate de scripts.
  3. Pégalo ahí, lee lo que la herramienta dice que va a crear y compáralo con los ajustes de esta página.

Rescate de scripts está en el plan Pro. No se publica nada hasta que le digas cuánto descontaba tu Script antiguo y las dos cifras coincidan al céntimo.

El Script

Otra API de Shopify
El Ruby original

MAX_GRAMS = 10000

if Input.cart.total_weight > MAX_GRAMS
  Output.shipping_rates = Input.shipping_rates.delete_if do |shipping_rate|
    shipping_rate.name == "Express"
  end
else
  Output.shipping_rates = Input.shipping_rates
end
Qué pasa con este

This needs a different kind of Shopify app

Your Script hid, renamed, or reordered shipping rates. Shopify builds that with the Delivery Customization API, which Stackable does not ship.

Esta parte de un Script no es un descuento. Shopify lo construye con otro tipo de función, indicado arriba, que Stackable no ofrece.

Lee la documentación de Shopify

Clave del motivo: otherApi.deliveryCustomization

Aquí no hay carrito que probar, porque no se construye nada. Pegar esto produce el mensaje de arriba y ninguna campaña.

Preguntas frecuentes

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

Formas de Script relacionadas

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.

Pega tu Script y mira cómo se reconstruye

La reconstrucción se compara con el dinero que cobraba tu Script antiguo antes de que puedas publicarla.

Usamos cookies esenciales para el funcionamiento de este sitio y, solo con tu permiso, cookies analíticas para entender el tráfico. Lee nuestra Política de cookies.