craftcms / shopify

Synchronize and extend product data from your Shopify storefront.
MIT License
45 stars 25 forks source link

Example templates #38

Open lukeholder opened 1 year ago

lukeholder commented 1 year ago

Description

Add a folder containing example templates

lukeholder commented 1 year ago

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

AugustMiller commented 1 year ago

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.