Giter Club home page Giter Club logo

shopify-inline-cart's Introduction

Shopify Inline Cart

This is a git repository for the files and way to setup an inline cart in Shopify. If you have any questions, send me an email at [email protected]

well documented on Shopify Forums: http://forums.shopify.com/categories/2/posts/67681

1. An add to cart button:

This is pretty standard (style it however you want):

2. inline-cart.liquid

put the file inline-cart.liquid in your snippets folder.

This will be called from your theme.liquid file like this: {% include 'inline-cart' %}

The cart-top and cart-bottom divs allow for the space between top and bottom of cart. Style to your hearts content.

3. cart_tab.html

Because the cart updates information all over the place, you need some way of telling it where to find those things to update. I have a little cart tab that shows the count and also has a checkout button. add the snippet in the file cart_tab.html into theme.liquid

On my product page, I also have a message that pops up when you add an item to the cart, asking if you want to see the cart or checkout.

This is made possibly by a placeholder div that gets content written into it!

<div id="add-to-cart-msg"></div>

4. inlineCart.js

Add jquery.inlineCart.js to your assets folder, for me called like this in theme.liquid:

{{ 'monolitho.js' | asset_url | script_tag }} 

5 . jquery.hideIinlineCart.js

This does the fancy hide/show stuff for the inline cart. (note that you need jquery for this!)

shopify-inline-cart's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.