Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example templates #38

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Example templates #38

wants to merge 2 commits into from

Conversation

lukeholder
Copy link
Member

Description

Add a folder containing example templates

  • Buy button JS Example template

@lukeholder
Copy link
Member Author

lukeholder commented Nov 10, 2022

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

@AugustMiller
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants