The Shopify product image not pulling through
The Shopify product image not pulling through, I have tried various ways to prompt it to add the main image but it always throws out errors and I have to roll it back

21 Replies
Add some logs to debug it?
this is what I made a report section look like

I ask the Ai Assistant "in the main report, Top Products tile: make sure the product images are being pulled from the shopify store, it should display the main image from the product listed in the top products tile" and this happens

this is the only thing in the log that isnt blue on the side:

Hello,
Do you have the shopifyProductMedia model in your application? If not, there's no way for you to actually use the product's image as its not stored on the shopifyProduct model
I checked and it appears not, even after trying about 10 different prompts with the ai assistant to place the product images there.
I added it and then got chatgpt to give me a detailed prompt (which has been amazing so far) but nothing seems to actually pull the image through still
Could you please share the name of the application?
"myshopwrapped"
So your shopifyProduct model definitely has a featuredMedia field since your application as the shopifyProductMedia model.
Do you know what file the field is being used in? The media model is really weird (Shopify uses it for all media on the shop) and has multiple fields that the assistant could be getting confused about
I'll be honest - I do not know what you mean by that.
I am trying to use the photos in the "📊 Full Report" tab, there is a tile called "🏆 Top Products" showing the top 3 products sold from the store. The product names and stats all seem correct, just wont pull the main photo from those products
Whats the name of the route that you're seing those in?
I am not familiar with that term - I am very new at ai coding and coding in general, struggling my way through
Two things:
- You have not shopifyFile data in your application so you'll need to resync in order to evenm display any images
- Your application is using the wrong field so I'll go switch that over for you. The field you were using was
src
when it should have been using image
Give me a moment to see the correct syntax and make the changeI appreciate that

Try now
I have tried about 4 different ways via chatgpt prompts and nothing has worked yet
I have made the code changes for you. All you need to do now is sync the data
Oh I didn't know what you meant by 'Try now' my bad. I am not sure if my recent prompts overrode what you did. I just resynced and it looks the same to me

Ok, the code is fixed again
thank you for that, I resynced again just in case but still just shows the initials of the product in those boxes