Code Monkey home page Code Monkey logo

shopify-scripts's Issues

Unable to duplicate scripts on one store "Failed to duplicate the script" error message

Problem

Unable to duplicate scripts on store, getting "Failed to duplicate the script" error message. Showing 422 error in Console

Scope

One store

Examples

Expected vs Actual

EB: Duplicating a script will create a duplicate

AB: Duplicating a script will result in an error message & 422 error

Replication Steps

  • Go to example script
  • Click Duplicate
  • See Failed to duplicate the script; refresh or try agin later message

More Information

  • Splunk Logs show 422 error but not much else from what I can see

Error shows for every script I tested on the merchants store
I can't replicate the error on my test store with existing scripts or when I copy the merchants script over to my store

Zendesk Ticket
@Shopify/scripts

Scripts should run on the StoreFront API as well as other channels

Scripts are limited to the Online Store channel only:
Scripts are not supported and do not fire in the wholesale channel checkout
Scripts do not fire when used in conjunction with the Buy Button
Scripts do not fire when sending a draft order invoice to a customer
Note: Scripts DO fire if using checkout permalinks

Part of Shopify's appeal is the ability to leverage all the amazing OOB features that Shopify provides such as cart/checkout/order management. Yet, the inability to run Shopify Scripts on a Shopify Plus store's Storefront API channel is really misleading to how much the Storefront API can be used to create a complex custom storefront experience.

Why do the Shopify Scripts only run on the cart object?
Since the Storefront API skips the creation of a cart object and creates a checkout object, why can't Shopify allow the scripts to run on the checkout object for all channels besides the Online Store channel?

I would love to be able to leverage Shopify to its full capabilities.

Allow scripts to use Theme Settings

A lot of merchants have requirements which exceed the features of the Wholesale Channel, so that's not an option for them.

However, when introduced to the Wholesale Channel, they love the easy configurability of the customer groups and discount options. Of course, once they see both, they want both.

In the interim, a great workaround would be to expose the Theme Settings attributes to Scripts, allowing the merchant to manage discounting tiers and values from a better UI, which we'd have access to in the Scripts.

Without this, they can only edit variables by digging into the code itself. As intuitive as we try to make this by putting it all in variables at the top of our scripts, it feels very stop-gap and makes the merchant nervous about having to dig into code, which is detrimental to their experience and confidence.

Variant FREE Gifts

How can this work so that only one variant of a product is free. Currently all variants of the product get added as free.

Take discount after all other discounts

I'm looking for a way to implement this script after all other discounts are taken.

For example, if Product A cost $200 and a coupon is used to save $50, I would like the script to discount this percentage off of the fully discounted price of $150, not on the full price of $200.

Is there a line I can add to accomplish this?

Scripts not saving or running 2nd time Error, Failed to run script... is shown

Problem

A script error is appearing when running a script twice: "Failed to run the script; refresh or try again later"

Scope

Identified on 2 stores

Examples

https://shinesty.myshopify.com/admin/apps/d25e45407e508f96409c2dd796e9bd95/scripts/6848527

https://shinesty.myshopify.com/admin/apps/d25e45407e508f96409c2dd796e9bd95/scripts/46923845

Screencast:
https://www.loom.com/share/25a6d9c71c214805a22c8fc306f56900

Expected vs Actual

Expected: Should save and run without error
Actual: Save shows error, 2nd run script also shows error. (workaround steps at bottom)

Replication Steps

  1. Adding a product to the cart input
  2. Clicking "Run Script"
  3. Clicking "Run Script" again will show the error above

This happens even on a script with nothing except Output.cart = Input.cart in the code

More Information

Workaround for now is:

When adding a product to the cart input, save the script first. Once it's saved, running the script multiple times will work

Zendesk ticket 1
Zendesk ticket 2

@Shopify/scripts

Bundles app - product object shows configurable products

Hi,

We have recently hit an issue with the Bundles App; when you view the JSON product object for the Bundle, there is no reference to any 'other products' in the bundle, just the (maximum of) 3 products with options.

This means the PDP (Shopify frontend product page) will only display 3 items - without manually adding those as a metafield object and hacking them in. Short of making a proxy app and requesting them via the API, there is no way to view the whole bundle.

Is there any plan to resolve this? The first question a client will ask is 'where's the rest? I only see part of the Bundle'

The cart transform and checkout displays the components correctly.

Shipping is free even when non tagged 'freeship' items are in the cart

Hi,

Thank you for your work.

Form the read me it seems as though the shipping price is only meant to change to free when all of the items in the cart are tagged with the "freeship" tag. This doesn't seem to be the case. When one tagged "freeship" item is in the cart then the shipping is changed to free regardless of whether there are other products in the cart that are not tagged with "freeship".

Scripts not working for checkout permalinks

I saw in the repo's Noteworthy Limitations here that Scripts DO fire if using checkout permalinks, but that doesn't seem to be the case.

I have a sample script here that updates the pricing of a specific product if it meets the criteria:

for line_item in Input.cart.line_items do
  if line_item.variant.skus.include?("KIT_SKU")
    if line_item.quantity > 2
      new_line_item = line_item.split(take: 2)
      new_line_item.change_line_price(Money.new(cents: 100) * 350, message: "2 Kit Bundle")
      Input.cart.line_items << new_line_item
    elsif line_item.quantity == 2
      line_item.change_line_price(Money.new(cents: 100) * 350, message: "2 Kit Bundle")
    end
  end
end

Output.cart = Input.cart

In the Script Editor, the Script had no errors and I was able to run the script and the result was as expected.

Can I get some help with this or confirm if Shopify Scripts are running for checkout permalinks? Thanks!

BuyOne_Load FX fail

Hi
When I use Script: BuyOne_Load FX chain on selected objects via file dialogue (guide inside).lua only half of the track is rendered. When I load FX Chain in the normal way it is fine.
Can you help? This is a recent problem Script worked fine unto now
I have the latest Reaper running Native on a MacMini M1 latest MacOs
Cheers
Andy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.