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.
Outra API da ShopifyIt deleted matching delivery options from the list before checkout rendered it.
Cole no Resgate de Scripts e veja o que ele reconstrói
- Copie o Ruby no botão ao lado de qualquer Script desta página.
- No admin da Shopify, abra o Stackable, depois Ferramentas e depois Resgate de Scripts.
- Cole lá, leia o que a ferramenta diz que vai criar e compare com as configurações desta página.
O Resgate de Scripts está no plano Pro. Nada é publicado até você informar quanto o Script antigo descontava e os dois valores baterem no centavo.
O Script
Outra API da 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 um Script não é um desconto. A Shopify constrói isso com outro tipo de função, citado acima, que o Stackable não oferece.
Leia a documentação da ShopifyChave do motivo: otherApi.deliveryCustomization
Não há carrinho para testar aqui, porque nada é criado. Colar isso produz a mensagem acima e nenhuma campanha.
Perguntas frequentes
- 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.
Formatos de Script relacionados
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.
Cole o seu Script e veja a reconstrução
A reconstrução é comparada com o valor que o seu Script antigo cobrava antes de você poder publicá-la.