notrab / headless-dropshipping-starter

Create your own dropshipping store with Next.js, Snipcart & Printful 👕
https://headlessdropshipping.com
712 stars 134 forks source link

Variants not pulling through sizes #42

Closed christopherdowson closed 2 years ago

christopherdowson commented 2 years ago

I've just checked with a fresh install (just to check it wasn't something I'd accidentally changed as I'm still learning React) and it seems that the variant information isn't being pulled through from Printful at all. Just the colour.

image

Have they updated their API? The issue was intermittent at first, but now it seems to be everything.

notrab commented 2 years ago

Hey @christopherdowson

I just checked this with my own store, and it seems fine.

It may have something to do with the names of the product in Printful. Can you screenshot your product inventory?

Do the names look similar to this, or are they formatted different?

CleanShot 2021-11-29 at 17 29 54@2x

The code for the variant picker values is made up of this function: https://github.com/notrab/headless-dropshipping-starter/blob/main/src/lib/format-variant-name.ts

Essentially what I'm doing is using the 2nd item in the array when splitting the name by -.

christopherdowson commented 2 years ago

You know, it's just that obvious.😂

I'll double check but I think you've got it.

Thank you.

On Mon, 29 Nov 2021, 17:30 Jamie Barton, @.***> wrote:

Hey @christopherdowson https://github.com/christopherdowson

I just checked this with my own store, and it seems fine.

It may have something to do with the names of the product in Printful. Can you screenshot your product inventory?

Do the names look similar to this, or are they formatted different?

[image: CleanShot 2021-11-29 at 17 29 @.*** https://user-images.githubusercontent.com/950181/143915123-ccb789fc-da47-46df-bb33-a23b1e9e0624.png

The code for the variant picker values is made up of this function: https://github.com/notrab/headless-dropshipping-starter/blob/main/src/lib/format-variant-name.ts

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/notrab/headless-dropshipping-starter/issues/42#issuecomment-981855019, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRYQIBWZNK7GEE672NCNT3UOO2EBANCNFSM5I7VES5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

notrab commented 2 years ago

Awesome! Let me know, feel free to schedule some time if it doesn't work and we can debug together.

christopherdowson commented 2 years ago

That’s sorted it - thanks so much!

Now I just need to figure out how to get the variant price next to the size. Learning is fun.

Christopher Dowson

Dowson. Studio 1897, 109 Vernon House, Friar Lane, Nottingham NG1 6DQ 0115 727 0259 @. madebydowson.com On 29 Nov 2021, 18:31 +0000, Jamie Barton @.>, wrote:

Awesome! Let me know, feel free to schedule some time if it doesn't work and we can debug together. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.