function removeFromCartInCart()

in app/static/utilities.js [100:113]


function removeFromCartInCart(button) {
  const id = button.attributes.getNamedItem(`data-product-id`).value;
  button.attributes.innerHTML = `Processing`;
  button.attributes.onclick = ``;
  function updateSection() {
      document.getElementById(`section-${id}`).remove();
  }
  function restoreButton() {
      button.attributes.class = `button`;
      button.attributes.onclick = `removeFromCartInProductCatalog(this)`;
      button.innerHTML = `<i class="fas fa-trash"></i>`;
  }
  removeFromCartRequest(id, updateSection, restoreButton);
}