0

I'm trying to follow this tutorial, but I'm stuck. I create the layout.html file and the index.html and it's still not working. Any ideas?

enter image description here

enter image description here

enter image description here

1
  • What happens before you started working with snipcart? For example, what happens when you visit localhost:8080/Elementhal.dev/ – Damon Dec 15 '15 at 20:48
1

I'll be the first to admit, I know nothing about snipcart so my answer could be way off.

Since your site works without snipcart, that means you are here:

Once the installation is completed, simply login into the Craft admin and go to Settings. You will have to create the fields that will be required to define a Snipcart product. In the settings, click on Fields and create 2 new fields:

Once you have those fields created, you will need to create a new section - which is a Channel

Name: Store

Handle: store

Section Type: Channel

Uncheck Entries in this section have their own URLs

Once you have that done, and the entry fields created/updated as they suggest, I think where you went wrong is with the actual layout.html file.

You need to include Snipcart’s JavaScript file and jQuery if it is not already included. Use the default CSS theme that you need to include as well.

What that is telling me is to open layout.html that I downloaded with snipcart and copy/paste all of the appropriate javascript into this file:

/path-to-your-project/craft/templates/_layout.html

That's the default layout template that Craft uses. So by pasting all of the necessary javascript & css into that file, each entry will have access to it.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.