Display Product QR on Product Image Carousel

Display Product QR on Product Image Carousel
Simple code to Display Product QR on Product Image Carousel
OPEN THE FILE
catalog/view/theme/YOUR_TEMPLATE/product7product.tpl

SEARCH FOR CODE
<?php foreach ($images as $image) { ?>
<div class="item"><a href="<?php echo $image['popup']; ?>" class="popup-image" data-image="<?php echo $image['popup']; ?>" data-zoom-image="<?php echo $image['popup']; ?>"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a></div>
<?php } ?>

AFTER ADD:

<div class="item"><a href="<?php echo $image['popup']; ?>" class="popup-image" data-image="https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=<?php echo 'https://'.$_SERVER['HTTP_HOST'].parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); ?>&choe=UTF-8" data-zoom-image="https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=<?php echo 'https://'.$_SERVER['HTTP_HOST'].parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); ?>&choe=UTF-8"><img src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=<?php echo 'https://'.$_SERVER['HTTP_HOST'].parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); ?>&choe=UTF-8" title="QR Code to recommend this product" /></a></div>

You can match the dimensions with your template.




Download
  • Developed by OpenCart Community
  • 12 Months Free Support
  • Documentation Included

Rating

Compatibility
1.5.4, 1.5.4.1, 1.5.5.1, 1.5.6, 1.5.6.1, 1.5.6.2, 1.5.6.3, 1.5.6.4, 2.0.0.0, 2.0.1.0, 2.0.1.1, 2.0.2.0, 2.0.3.1, 2.1.0.1, 2.1.0.2, 2.2.0.0, 2.3.0.0, 2.3.0.1, 2.3.0.2

Last Update
30 Jul 2023

Created
30 Jul 2023
14 Downloads
0 Comments
comprido
comprido
Member since: 25 Jun 2012

View all extensions Get Support