Using or not using the "Add a Donation" payment page feature in only specific events

Good afternoon. We are thinking that we would like to be able to "Turn Off" the Payment Page "Add a Donation" option in some events, but leave it on in others. Have any TNEW users found a way to do this.

Thanks.

Parents
  • I don't think there's going to be a way to do this out-of-the-box, since basing logic on cart state can be complex to define with configuration. But I think you could accomplish this with some JavaScript, and/or some SQL. By customizing your template with some JavaScript, you could scan the products displayed in the cart on the payment page and remove or hide the donation element when you find the events in question. An alternative implementation that could offer a bit more end-user configurability would be to use a cart validation customization for the payment page that checks to see if the cart contains the "no-donation" events in SQL, and then conditionally return a JavaScript tag to the payment page which would, again, remove or hide the donation element.

Reply
  • I don't think there's going to be a way to do this out-of-the-box, since basing logic on cart state can be complex to define with configuration. But I think you could accomplish this with some JavaScript, and/or some SQL. By customizing your template with some JavaScript, you could scan the products displayed in the cart on the payment page and remove or hide the donation element when you find the events in question. An alternative implementation that could offer a bit more end-user configurability would be to use a cart validation customization for the payment page that checks to see if the cart contains the "no-donation" events in SQL, and then conditionally return a JavaScript tag to the payment page which would, again, remove or hide the donation element.

Children