Overlay circles with available colors on apparel
If an apparel product (or maybe any product with color options?) has multiple colors available, it'd be nice to overlay little circles w/the available colors on the product listing on the main page. And I guess set the title text for those circles to the color name?
This is going to be pretty hard. We would have to fetch every product's information, and then all of the variant information for it. Meaning with our current 19 products, 58 (I think) API requests...
I think the best thing would be to not do this. Otherwise:
- We do the huge amount of requests and hope stuff doesn't get rate limited
- We include something in the product title like
(Multiple Colors)and parse it out. Show some color wheel like icon
I'm fine parsing out (Multiple Colors) and then showing something on the index. Actually, to make this more generalizable and flexible, what if we support arbitrary strings between parenthesis or brackets or something, and then we wrap that in a span.callout, then I can do fun things in CSS?
Super rough mock:

I can do that. Do you want the parentheses parsed out everywhere, or just on the index so we can show that bubble? Basically should the cart show how it is now or without the parentheses?
I think parsed out everywhere; it's already a little weird that we show Terminal Tee – Fitted (Multiple Colors) - Black - L or whatever now. It would be cleaner to pull that out and only show it in the span on the index.
@btkostner should we do square brackets [] or braces {} to be more explicit (basically, something we won't ever want in the actual product names)? I guess parenthesis () are probably also safe, but I think something more intentional might avoid issues down the line if that's not too much added work.
No work at all, it's just regex :tm:. Just let me know what you want in printful and what you want parsed out.
Update: We could also split it to a comma split list. So we could have Terminal Tee {Unisex, Multiple Colors} parse into Terminal Tee with Unisex and Multiple Colors as little bubbles.
@btkostner I'm a fan of square brackets [] I think, because they won't look super weird if they show up somewhere user-facing but also I don't see us ever wanting them in a real product name. Comma-separation would be neat, too!