We would like to have an authenticity verification page, where customers enter a unique code.

I have a site selling a product. We would like to have an authenticity verification page, where customers enter a unique code and the website returns a check mark or a cross for if the product is authentic or not.

Hi Tushar,

You can create a collection with fields: Product Name, Serial Key… blah blah blah

Then, you can use have an input for the user to enter the Serial Key, and a button to call the code.

Code:
When the user clicks the button, the code looks for the data
(https://www.wix.com/velo/reference/wix-data/query)

wixData.query("myCollection")
.eq('key', $w('#keyInput'))
  .find()
  .then( (results) => {
    if(results.items.length > 0) {
      // tell user the item exsits! :)
      $w('#have').show() //this should be your tick image
      $w('#fake').hide() //this should be your cross image
    } else {
      // It is fake! We don't have this key! :(
            $w('#have').hide() //this should be your tick image
      $w('#fake').show() //this should be your cross image
    }
  } )
  .catch( (err) => {
    let errorMsg = err;
  } );

Thank you so much. But I am new to wix and the world of code…can you please guide step by step how to add the code and where to add them. That would be very helpful. I have tried to use this code meny times but I am absolutely clueless what you meant by creating a collection and how it works!!

@tushardasgupta1 Hi Tushar, I’m helping a client with a similar need. Did you ever solve the coding puzzle?

@jameslhogg
How far is your progress? Did you already tried to create/construct some code?

Like Tushar I was hoping for a step-by-step guide to the setup process. I’m familiar with Velo and data collections but only a beginner with this sort of query code.

Take a look at this… (i think it is similar to your own issue)…

https://russian-dima.wixsite.com/meinewebsite/id-check

Thanks! Will check it out.

Consider adding additional security measures like a captcha or two-factor authentication to make authenticity verification more effective. Also, ensure the process is seamless and user-friendly to encourage customers to verify their products.

You might want to explore other authentication solutions as well. There are various fake id checker systems available that can help you enhance the security of your verification process. Good luck!