Any help with QRCode generation would be greatly appreciated

I am trying to create/generate a QRCode from information within my Dataset and display it on a dynamic page would anyone know where to start with coding this? @stcroppe @yisrael-wix @liran-kurtz-wix ?

The qrcode NPM library might be able to help you.

You can Install Node Package from the Backend folder menu:

Then find the qrcode package and install:

Hi @yisrael-wix many thanks for your speedy response, I have had a look at the NPM module and it seems straight forward but I think I making it difficult, I’d like to be able to generate a QR for every user in a dynamic dataset / dataset that is generated from a field in a dataset. dataset is #dataset1 and QR image location is #image32 I would then like to be able to save the QR code to the dataset?

I have so far written the below but it is not working any help would be greatly appreciated.

import wixData from ‘wix-data’;
import QRCode from ‘qrcode’;

$w.onReady(() => {
$w(“#image32”).onViewportEnter( () => {
$w(“#dynamicDataset”).onReady(() => {
function makeCode () {
var qrcode = new QRCode(“test”, {
text: “#priKey”,
width: 128,
height: 128,
colorDark : “#000000”,
colorLight : “#ffffff”,
correctLevel : QRCode.CorrectLevel.H
});
}
}

The above code is not working and I can only assume it is my error in the code but being new to coding I am struggling a little any help again greatly appreciated.

Best wishes,

Si

Simon, cannot help you with the above, but I can alter an alternative. Look at qrserver.com;

It lets you create a QR by URL, like so:

I use it and it works fine (and I got it from Andreas)

Hi Thank you for this, your support is greatly appreciated, I am trying though to create a dynamic page that links with my dataset to create individual QR codes for each row, If you know anyone who can help it would be greatly appreciated. Is

@simonadams Wix does not provide support for the NPM libraries as they are not part of the Wix product. They are provided to provide additional external features to Wix Code developers.

You should check with the developer of the library for assistance.

One thing I see in your code is that you have a function embedded right inside of another function. I would suggest separating it out as it might cause problems where it is now. Although you might be able to use an “arrow” function.