mandatory checkbox and automatic PDF generation

Let me preface this by saying that I am not a developer; I am selling a hardware product online. In order for customers to buy this product, they first need to consent to several agreements (Terms of Use, etc.). This is to protect my business so, for example, if I get sued in 3 years, I can have documentation to show in court.

I am subscribed to the Wix eCommerce Plan. I’m currently using Stripe to handle payment processing. I’m looking for a way to (1) have a checkbox that must be checked (mandatory) before a customer can complete an order, and (2) an automatically-generated PDF sent to my email that contains (a) all of the documents they agreed to (including all text), (b) buyer name (c) date (e) time (f) IP address, and (g) order form.

I posted this request yesterday on stack overflow and got the following suggestion for problem (1):

"You’re going to have to use Wix Code in order to add a conditional statement to check whether the box has been ticked. It also depends on whether or not you’re using Wix Stores. It would look something like this without Stores.

export function makePayment($w,event){ if(!$w('#checkbox1).checked)){ //This simply says if the checkbox is not ticked, don’t even bother continuing. //If it is, do what’s inside the curly brackets. requestStripe(…); }

If you are using Wix Stores, there is currently no way to get the order details, however, they are working on exposing it in their API."

As for problem (2), I think I will probably need to hire a developer to create a custom app that can do this, but please let me know if there are any better options.

thank you

As for implementing the above solution to problem (1), I don’t know where to start

Hi!

As for your first (1) issue, I would disable the submit button as default, and “.onChange” of the checkbox
I’d check if : the $w(#checkbox).checked => $w(#button1).enabled
else : $w(#button1).disabled + a message that informs that the user cannot proceed without agreeing to the terms.

As for the second (2) issue, right now the only way to export files is directly through the database collection and by CSV files only. Please submit a feature request and help us make it happen!

Hope it helps!
Best of luck.

Doron. :slight_smile: