Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working on my shopify store can you please help? #2

Open
AaqibAliGhuman opened this issue Feb 22, 2022 · 3 comments
Open

not working on my shopify store can you please help? #2

AaqibAliGhuman opened this issue Feb 22, 2022 · 3 comments

Comments

@AaqibAliGhuman
Copy link

I am trying to add this on Shopify but it's not working I am getting this error in the console.

Uncaught TypeError: Cannot read properties of undefined (reading 'makeCode')
at makeCode (index.js?v=8008257679650561710:195:10)
at HTMLButtonElement.onclick (qr-code-designer:1322:6)

that is the code error in the console..

// // Pad URL since we want more density
// maxLength = 40;
// if (url.length < maxLength) {
// url += "?/" + "0".repeat(maxLength - url.length);
// }

// Generate URL bits
qrcode.makeCode(url);

// Manually draw canvas
QRMatrix = qrcode._oQRCode.modules;
QRLength = QRMatrix.length;

// Form canvas
canvas = document.getElementById("myCanvas");
ctx = canvas.getContext("2d");

// QR code sizing
bitLength = 10;
canvasLength = bitLength * (QRLength + borderSizeValue * 2);
canvas.width = canvasLength;

that is where I am getting error...

here is my page URL can you please help.

[https://www.starkandcodesigns.com/pages/qr-code-designer

@HughChen
Copy link
Owner

HughChen commented Feb 23, 2022

Hi, maybe you are missing the dependency?
https://github.com/davidshimjs/qrcodejs

@AaqibAliGhuman
Copy link
Author

AaqibAliGhuman commented Feb 23, 2022 via email

@AaqibAliGhuman
Copy link
Author

AaqibAliGhuman commented Mar 4, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants