shopify icon indicating copy to clipboard operation
shopify copied to clipboard

Example templates

Open lukeholder opened this issue 3 years ago • 2 comments

Description

Add a folder containing example templates

  • [ ] Buy button JS Example template

lukeholder avatar Nov 10 '22 05:11 lukeholder

@AugustMiller what do you think, a whole page example templates or just put this example into the README?

lukeholder avatar Nov 10 '22 06:11 lukeholder

I like the idea of stubbing the example-templates folder as a nod to Commerce. I struggled with condensing an example that fit in the Readme, because there is so much boilerplate stuff with both the JS Buy SDK and Buy Button JS.

This particular example, though, I think we should avoid, because it doesn't make use of synchronized data… in its current state, this would be almost entirely possible to build without Craft, the plugin, etc. (so long as you had access to the product IDs).

Is there any way to bootstrap only the cart component, then render out our own custom product tiles that leverage a combination of Shopify + Craft data? I had to turn my attention elsewhere before I was able to find a way of interacting with the cart, like you can with the JS Buy SDK… but maybe because this is based on it, all that still applies?

Sorry if this is a nothingburger of a reply—hope it tracks?


In the interim, I added a couple sections (I think you already saw + merged) proffering the two Shopify libraries… but I still feel pretty strongly that the forced brevity works against us, and a folder of drop-in demo templates would be much easier for people to work with.

AugustMiller avatar Nov 11 '22 19:11 AugustMiller