Send Cart Notes with Cashier

Follow

Warning!

This script may not function correctly with customized themes.

To send cart notes with Cashier, follow these steps:

  1. From Shopify's admin, select Online Store.

    select online store

  2. Select Actions.

    select actions

  3. Select Edit code.

    select edit code

  4. Under "Layout" select theme.liquid.

    Select theme.liquid

  5. Find the opening <body> tag.

    Find <body> Tag

  6. Copy and paste the following code directly below this tag:
    <script>
    $(document).ready(function(){
    $('[name=note]').change(function(){
    var $form = $(this).closest('form');
    if($form.length > 0 && $form.attr('action') == '/cart') {
    var datastring = $form.serialize();
    $.ajax({
    type: "POST",
    url: "/cart",
    data: datastring,
    dataType: "json",
    success: function(data) {},
    error: function() {}
    });
    }
    });
    });
    </script>

    Copy/Paste Script

  7. Select Save.

    Select Save

That's it!

Next Steps:

Blog Posts:

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.