notrab / headless-dropshipping-starter

Create your own dropshipping store with Next.js, Snipcart & Printful 👕

Home Page:https://headlessdropshipping.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variants not pulling through sizes

christopherdowson opened this issue · comments

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.

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 -.

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