function removeFromCartInProductCatalog()

in app/static/utilities.js [85:98]


function removeFromCartInProductCatalog(button) {
  const id = button.attributes.getNamedItem(`data-product-id`).value;
  button.innerText = `Processing`;
  button.attributes.onclick = ``;
  function updateButton() {
      button.attributes.onclick = `addToCartInProductCatalog(this)`;
      button.innerText = `Add to Cart`;
  }
  function restoreButton() {
      button.innerText = `Remove`;
      button.attributes.onclick = `removeFromCartInProductCatalog(this)`;
  }
  removeFromCartRequest(id, updateButton, restoreButton);
}