Question and Validation before allowing someone to add to cart

Đã có trọn bộ đề thi thử THPT Quốc Gia 2022 các môn: vip.dethihsg247.com
QUẢNG CÁO: Đổi thẻ cào thành tiền mặt min rút 10k tại đây

I’m wanting to add the ability (on each of my products listed) to only allow the adding a product to the cart if they have answered a question correctly. My goal is to have it work as follows:

Someone visits a product page
They decide to purchase the product, but before they are able to (maybe the add to cart isn’t showing or its greyed out) they see a message:
In order to purchase, please answer the following question
User selects the correct answer from the drop-down list of answers and the ‘Add to Cart’ button becomes visible.
User adds to cart and can checkout as normal.

In admin:
I would like the ability to add a question to each product, write 3 answers, and mark which answer is correct.

That is what I’m trying to work out how to do. But I’ve never been able to code anything since I was around 6-7 because I have difficulty learning/remembering code (due to ADD) so if you’re able to help or point me in a direction, would you please explain anything in a really basic form to help me understand a little more. I just really have no idea where to start with any of this.

Thank you to anyone who can help.

Paul

Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
  • Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
  • Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
  • Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.

Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com