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 ShopifyIt deleted matching delivery options from the list before checkout rendered it.
Pégalo en Rescate de scripts y mira qué reconstruye
- Copia el Ruby con el botón que hay junto a cualquier Script de esta página.
- En tu panel de Shopify, abre Stackable, luego Herramientas y luego Rescate de scripts.
- 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 ShopifyMAX_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
endThis 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 ShopifyClave 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
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.
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.