Giter VIP home page Giter VIP logo

ajaxify-cart's Introduction

ajaxify-cart

From your Shopify admin, go to Online Store > Themes.

Find the theme you want to edit, and then click Actions > Edit code.

In the Layout directory, click theme.liquid.

Ajax cart Find the closing tag. On a new line right above the closing tag, paste the following code:

{% render 'ajaxify-cart' %} Ajax cart 2 Click Save.

In the Snippets directory, click Add a new snippet:

Add a new snippet Name your snippet ajaxify-cart, and click Create snippet:

ajaxify-cart snippet Your new snippet will open in the code editor.

In your new ajaxify-cart.liquid file, paste this code hosted on GitHub.

Caution In the pasted code, replace all instances of .size() with .length. The .size() method is depreciated as of JQuery 1.8.

Click Save.

Debut If you use Debut, then continue to the next steps:

In ajaxify-cart.liquid, find the opening <script> tag at the top of the file. On a new line right below the opening <script> tag, paste the following code:

window.onload = function() { Find the closing </script> tag. On a new line right above the closing </script> tag, paste the following code:

} In the same file, find the following code:

cartCountSelector: '.cart-count, #cart-count a:first, #gocart p a, #cart .checkout em, .item-count', Replace it with:

cartCountSelector: '#CartCount', Click Save.

In the Sections directory, click header.liquid.

Find the following code:

{% if cart.item_count > 0 %} Replace it with:

{% if cart.item_count > -1 %} Click Save.

ajaxify-cart's People

Contributors

carolineschnapp avatar aaliyan111 avatar

Watchers

James Cloos avatar  avatar

Forkers

fatimahtariq

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.