project_e_commerce icon indicating copy to clipboard operation
project_e_commerce copied to clipboard

Images of products don't show on product page but do show in cart. Please help.

Open fpmoore33 opened this issue 3 years ago • 14 comments

image

image

fpmoore33 avatar Jun 07 '21 14:06 fpmoore33

go to your Product.jsx file and image = {product.media.source} in the CardMedia Component

jumbopere avatar Jun 15 '21 14:06 jumbopere

{product.media.source}

Didn't work for me unfortunately

GewoonMennoplays avatar Sep 20 '21 14:09 GewoonMennoplays

go to your Product.jsx file and image = {product.media.source} in the CardMedia Component

This* didn't quote right

GewoonMennoplays avatar Sep 20 '21 14:09 GewoonMennoplays

I have a problem when using {product.media.source} as well (just by cloning and changing the in the .env my public key of commerce.js)

The names, prince and description work but .media says its undefined

fbientrigo avatar Oct 10 '21 07:10 fbientrigo

Here's the thing! The Commerce.js API has actually changed its response object. Here's the newest implementation of the CardMedia component: <CardMedia className={classes.media} image={product.image.url} title={product.name} /> The response for image details is now within {image} Happy coding! 😉

Pooreffects avatar Nov 11 '21 23:11 Pooreffects

Here's the thing! The Commerce.js API has actually changed its response object. Here's the newest implementation of the CardMedia component: The response for image details is now within {image} Happy coding! 😉

use {product.image.url}

JohnESwan3 avatar Nov 25 '21 02:11 JohnESwan3

Im having the opposite error where the image doesnt show up in the cart, im using {item.image.url} does anyone know how to fix this?

eramadani3 avatar Dec 22 '21 03:12 eramadani3

Im having the opposite error where the image doesnt show up in the cart, im using {item.image.url} does anyone know how to fix this?

use this image = {product.media.source}

jumbopere avatar Dec 22 '21 11:12 jumbopere

In my case {product.image.url} works.

But having issue after clicking checkout. White blind screen approaching... Errors in console: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

The above error occurred in the div component:

Unfortunately, can't find out exact solution where is wrong...

koushik80 avatar Dec 28 '21 02:12 koushik80

In my case {product.image.url} works.

But having issue after clicking checkout. White blind screen approaching... Errors in console: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

The above error occurred in the div component:

Unfortunately, can't find out exact solution where is wrong...

yeah same error of checkout page - working on that the problem is we are watching old tutorial and in that time commerce.js got updated and they have changed the name of the responese

kabir0x23 avatar Jan 08 '22 08:01 kabir0x23

In my case {product.image.url} works.

But having issue after clicking checkout. White blind screen approaching... Errors in console: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

The above error occurred in the div component:

Unfortunately, can't find out exact solution where is wrong...

image

checkout this is working now @koushik80

you can compare it with my project https://github.com/kabir0x17/ecommerce-web-shop

kabir0x23 avatar Jan 08 '22 09:01 kabir0x23

Thank you Kabir! My one was started working. Anyways, I couldn't find out your Checkout.jsx file in your github link. All the best!

koushik80 avatar Jan 08 '22 09:01 koushik80

Thank you Kabir! My one was started working. Anyways, I couldn't find out your Checkout.jsx file in your github link. All the best!

thank you, yeah i am still on his video, not completed yeh. will gonna finish in 2 days

kabir0x23 avatar Jan 09 '22 13:01 kabir0x23

In my case {product.image.url} works. But having issue after clicking checkout. White blind screen approaching... Errors in console: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. The above error occurred in the div component: Unfortunately, can't find out exact solution where is wrong...

image

checkout this is working now @koushik80

you can compare it with my project https://github.com/kabir0x17/ecommerce-web-shop

Im having this issue, which I can only see my title header. The rest is blank. The link is expired. Any help?

Auzaiealias avatar Apr 17 '23 05:04 Auzaiealias