Shopify Cart Transform API Function unable to read data across different stores in the same Plus org?

Hi guys. We developed a custom function that was ingesting an image from a separate shopify domain (within the same Plus org. i.e. Sandbox)

We had a rather intricate flow where a custom product image was being set, and then uploaded to a product in the sandbox store.

Everything worked fine, even in a busy production environment.

Then, on October 29th 2024, the function began throwing errors on the product image being passed into the bundle. (Image not found)

Checked the image, it was uploading fine. Checked timing / race conditions and setting a long delay had no effects.

Can Functions use Shopify CDN urls for product images during a MergeOperation that aren’t the same domain as the store?

Can anyone confirm? This was working fine previously!

If we cannot – I can simply route the image to the same domain, but figured I’d ask here if there’s any understanding around this given it was working before, and now the Function is not able to find the image hosted on the Shopify CDN but uploaded to a separate domain

TIA

Hi Sean!

We have made some changes to how CDN asset URLs are used. You can see this post for more context.

In regards to cart transforms, we validate that the image belongs to the shop and that the URL originates from the Shopify CDN. We recently fixed an omission that was not validating the new CDN asset URLs about a month ago. Image URLs using any of the shop’s domains (with CDN pathing) should now work as expected.

However this situation sounds more like the other validation that has been in place prior to the October date you mention: the image must belong to the shop. I can’t say for sure why it would have been working for you before, but the error is the expected behavior. Updating the URL to point to the shop’s domain CDN is the correct fix in this case.

Hope this helps!

Levi

1 Like