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

Removing template files




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 template files

Removing template files from a store's theme is not necessary but can be done, if wanted. The following steps can be used to manually delete template files from a theme:

  • From the store's dashboard, click online store
  • Click actions > edit code for the theme with Crowd Control files
  • Locate and delete the following files:


    Templates

    collection.crowdcontrol-A.liquid

    collection.crowdcontrol-B.liquid

    collection.crowdcontrol-C.liquid

    page.crowdcontrol.liquid


    Snippets

    swatch_crowdctrl.liquid


    Assets

    crowd-control-A.scss.liquid

    crowd-control-B.scss.liquid

    crowd-control-C.scss.liquid

    crowd-control-widget.scss.liquid

    crowdctrl_loader.gif


    Config

    Presets and custom settings for templates are found within the Config files of a theme. All Crowd Control related data begins with the prefix crwdctrl.



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>