Mike Fallows

Tagged “javascript”

  1. Avoiding a DOMContentLoaded gotcha with readyState
    • 2 min

    I recently hit a race condition when a script was loading faster in some browsers.

  2. Prefill a Shopify discount with the Fetch API
    • 2 min

    Set a prefilled discount in checkout with a fetch request.

  3. Implement a low stock notice in a Shopify theme
    • 6 min

    A simple way to display a notice when the selected variant has a stock quantity below a specified value.

  4. Quick error reporting with Val Town
    • 6 min

    Using Val Town's simple storage and notifications to rig up a lightweight error reporting system.

  5. Observing cart changes in a Shopify theme
    • 8 min

    Identifying and responding to changes in a customer's cart.

  6. Hello World with Lit
    • 6 min

    Tinkering with Lit: a web components framework.

  7. Compiling `.kit` files with Grunt
    • 3 min

    How to generate HTML from `.kit` files without access to CodeKit.

  8. Using PostCSS and Autoprefixer with esbuild
    • 3 min

    Updating an esbuild config in a Shopify theme to utilise autoprefixer.

  9. Refactoring a Shopify upsell widget to a Custom Element
    • 5 min

    Often shop owners want the ability to offer a small upsell that can be easily added to an order.

  10. Adding VAT to 31,522 Shopify prices as quickly as possible
    • 5 min

    Yay! Shopify finally handles tax in a way that's useful for Europeans.

  11. Using Jest tests to replace jQuery in a Shopify theme
    • 7 min

    A strategy for safely removing jQuery as a dependency from custom Shopify themes.

See all tags.