Cart page - show default image for products when no other image is shown

Hi all,

I am using the Brooklyn Shopify theme.

I am using a gift box bundle app, that puts several of my products into one.

However, on the cart, there is no image displaying anymore.

From developer tools, I am able to find and change the image (please see screenshots below).

Could someone please tell me, when I go to “Edit Code” which file do I need to insert this piece of code to?

Could you confirm both the file/section where to put the code, and confirm how the written code should look like?

As mentioned, I want to show this default image only when no other products are showing.

Many thanks for the quick help!

Have you asked the guys who make the plugin? I think they are called StayTuned.

https://apps.shopify.com/boxup-product-builder

1 Like

Hi @Spr123 I don’t think we can replace default no-image of shopify but if the app developers add a default image for all the bundle products they are creating, this issue should be fixed.

As a temporary solution, you can use JS script which should work in your case.
Here is the video showing the small demo:
https://www.loom.com/share/72a3122b28c7487d9a199c74b7ade805

Here is the script, change the image URL with the one you would like to use.
var imgFullURL = document.querySelector(‘.cart__image img’).src;
if(imgFullURL.includes(“no-image”)){
document.querySelector(‘.cart__image img’).src=‘https://cdn.shopify.com/s/files/1/0555/0673/1197/products/2_d397e635-c9f9-4c15-aafa-ee0092cc01eb_800x.png?v=1663923923’;
}

1 Like