Roych Posted January 25 Share Posted January 25 Hello Not sure why but it always shows me two qrcodes (images -> gif) next to each other on the page. Can't see the problem in my code. Any ideas? I have a select-options field with option to show the qr-code or not. If selected It always shows two qr-codes. This happened after the upgrade of the module actualy it was working fine before!! My code <?php if ($item->id == '3') : ?> <div class="qrkoda"><?=$page->qr_koda?></div> <?php else:?><?php endif;?> Thank you R Link to comment Share on other sites More sharing options...
monollonom Posted January 26 Author Share Posted January 26 Hi, Sorry about this issue. Do you have multi-language activated on your website ? Also, which field(s) do you show with this qrcode ? Link to comment Share on other sites More sharing options...
monollonom Posted January 26 Author Share Posted January 26 After doing a quick check I assume that was it (multilang issue). Here's a new version that will only output the QR Code in the user's language if it's a guest. Please note you'll still have the two QR Codes if you're logged in. I will think of something to help with the output, something like a ->get() to output a specific source and/or language. 2 Link to comment Share on other sites More sharing options...
Roych Posted January 26 Share Posted January 26 5 hours ago, monollonom said: Here's a new version that will only output the QR Code in the user's language if it's a guest. Please note you'll still the two QR Codes if you're logged in. Thank you, it's working now. As you'we stated above, showing two when logged in. 🙂 R Link to comment Share on other sites More sharing options...
Sava Posted February 23 Share Posted February 23 Thank you for a great module, I am just wondering how do I get URL to create a download link? 🙂 Link to comment Share on other sites More sharing options...
monollonom Posted February 24 Author Share Posted February 24 Hi @Sava, I'm not sure I get your question... do you want to know how to get a URL of the QR code to be able to download it ? In the unformatted output the QR code is already in the form of an <img> (or <svg>), but I went ahead and added a "raw" key in the unformatted output. You can download the latest version and try to do something like... $qrcode = $page->getUnformatted("qrcode_field"); foreach($qrcode as $qr) { $filename = $sanitizer->snakeCase($qr["label"]); $label = "Download QR code for \"{$qr["label"]}\""; echo "<a href=\"{$qr["raw"]}\" target=\"_blank\" download=\"$filename\">$label</a>"; } Hope this helps! 2 Link to comment Share on other sites More sharing options...
Sava Posted February 25 Share Posted February 25 Sorry for the unclear question but your answer @monollonom was exactly what I need. Thank you 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now