Summary

Crowd Control can be deleted from a store using the Apps dashboard within a Shopify store. Due to limitations of Shopify, changes made to a store's theme by the app cannot be automatically removed and will not affect a store external to app use. Manually removing template files from a theme is optional.


On this page:

Deleting the Crowd Control app





Deleting the Crowd Control app

To remove Crowd Control from a store, locate the Crowd Control Pledge Manager app in the store's Apps dashboard. Clicking 'delete' will uninstall the app from the store.


Changes made to a store's theme by Crowd Control are not automatically removed and will not affect the store's functionality. Survey collections should be hidden or deleted when terminating use of Crowd Control.






Removing non-template code

The following code is added the bottom of the theme.liquid file of a store's theme. It can be located and removed manually but will not impact a store's functionality if left untouched.


<script type="text/javascript" data-name="crowdcontrol">

    var ccurlParams;

    (window.onpopstate = function () {

        var match,

        pl     = /\+/g,  // Regex for replacing addition symbol with a space

        search = /([^&=]+)=?([^&]*)/g,

        decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },

        query  = window.location.search.substring(1);

        ccurlParams = {};

        while (match = search.exec(query)){

            ccurlParams[decode(match[1])] = decode(match[2]);

        }

    })();

    if (ccurlParams["discount"] != (''||null) && typeof ccurlParams["discount"] != ('undefined'||undefined)) {

        sessionStorage.setItem("crwdctrl_discount", ccurlParams["discount"]);

    }

    {% if template contains 'cart' %}

    var discElems = document.querySelectorAll('form[action="/cart"] input[name="discount"]');

    var ccdiscount = sessionStorage.getItem("crwdctrl_discount");

    if(ccdiscount == ('' || null)) {

        ccdiscount = sessionStorage.getItem("discount");

    }

    if(discElems.length <= 0) {

        if(ccdiscount != ('' || null)) {

            var discElem = document.createElement("INPUT");

            discElem.setAttribute("type", "hidden");

            discElem.setAttribute("name", "discount");

            discElem.value = ccdiscount;

            var chkoutBtns = document.getElementsByName("checkout");

            for(i=0;i<chkoutBtns.length;i++) {

              chkoutBtns[i].parentNode.insertBefore(discElem, chkoutBtns[i]);

            }

        }

    }

    else {

        for(i=0;i<discElems.length;i++) {

            if(ccdiscount != ('' || null)) {

                discElems[i].value = ccdiscount;

            }

            else {

                discElems[i].remove();

            }

        }

    }

    {% endif %}

</script>