#DOWNTOWN DUNKARONI-missing-product

1 messages · Page 1 of 1 (latest)

rugged surge
#

Hello 👋
Can you post the second screenshot in the thread please? thanks

languid tulip
#

Yes sorry!

#

What's strange to me is that product_data exists in cartItems, but not when I log it on line 29

rugged surge
#

can you print line_items before you send the request?

languid tulip
#

Also, validateCartItems comes from use-shopping-cart

#

sure

rugged surge
#

yeah I suspect that function is doing something funky

languid tulip
#

so when logging line_items on line 45, I actually don't get any output in the console nor the terminal

#

this is my console

languid tulip
#

I spoke to the creator of use-shopping-cart for a few hours yesterday and we couldn't sort out what was going on

rugged surge
#

can you try without using validateCartItems ?

#

Just to narrow down on the issue

languid tulip
#

not for production though right?

rugged surge
#

does it work without it

#

yeah just a test

languid tulip
#

kk one second

#

so comment that out, then log what?

rugged surge
#

like try to create checkout session with the raw line_items (without validating it)

languid tulip
#

With the following (replacing validate_line_items with cartItems), I'm getting this output in my terminal: Missing required param: currency.

I'm also not seeing the output from line 47's log...

#

however cartItems contains a currency value..?

#

oh but, notice how the ID is the first child of the object, then the data is contained within the ID

rugged surge
#

yup that would be it

languid tulip
#

the lib uses the same data structure

rugged surge
#

hmm could be a bug with the example
since its a third-party lib, I don't know how much we can help with it 😦

languid tulip
#

do you know why my log on line 47 won't appear in my terminal?

rugged surge
#

I don't know. It almost seems like some code is getting cached by the server.
Can you try restarting the app?

languid tulip
#

I tried that + trying localhost in incognito mode

#

same thing

#

Going back to my very first message though, is there any kind of bandaid solution you can think of to attach product_data when creating a price, at least for testing?

rugged surge
#

so can't make any specific recommendations