The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

748 Modules
509 Ready
236 Need Help
πŸ† Leaderboard
Actively Maintained v1.0.3

Rollpix QrLanding

rollpix/module-qr-landing

Enables QR code landing pages for products, recording visits when scanned. Redirects to the product page, preserving UTM parameters for analytics.

1
Downloads
Below average
0
GitHub Stars
2mo ago
Last Release
0
Open Issues
Build Issues
0/3 checks passed

Build Tests

Composer Install
– DI Compile
– Templates

Code Quality

CS Coding Standard
– PHPStan

Tested on Magento 2.4.8-p4

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.3 on Magento 2.4.8-p4
Mar 22, 2026
v1.0.3 on Magento 2.4.8-p3
Mar 12, 2026

Looking for Contributors

Composer installation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

Rollpix QrLanding Magento compatibility status badge

README

Loaded from GitHub

Rollpix_QrLanding

VersiΓ³n en espaΓ±ol

SPONSOR: www.rollpix.com

Magento 2 module that serves as a QR code landing page for physical store products. When a customer scans a QR code printed next to a product, the module records the visit and redirects to the product detail page (PDP), preserving UTM parameters for Google Analytics tracking.

Compatibility

Requirement Version
PHP 8.1 | 8.2 | 8.3
Magento 2.4.7 | 2.4.7-p1~p4 | 2.4.8

Installation

Via Composer (recommended)

composer config repositories.rollpix-qr-landing vcs https://github.com/ROLLPIX/M2-qr-landing.git
composer require rollpix/module-qr-landing
bin/magento module:enable Rollpix_QrLanding
bin/magento setup:upgrade
bin/magento cache:flush

Manual

  1. Create app/code/Rollpix/QrLanding and copy all repo files there
  2. Run:
bin/magento module:enable Rollpix_QrLanding
bin/magento setup:upgrade
bin/magento cache:flush

Admin Configuration

Path: Stores > Configuration > Rollpix > QR Landing

Field Type Default Scope
Enable Module Yes/No Yes Store View
Enable Tracking Yes/No Yes Store View
Identifier Type Select SKU Store View
Fallback URL Text / Store View

What It Does

QR Landing Controller (/qr/{sku})

  • Receives QR scan via URL like /qr/ABC123?utm_source=qr_store
  • Validates that the module is enabled for the current store view
  • Resolves the SKU to a product and verifies it exists and is enabled
  • Records the visit in rollpix_qr_visits (automatic when tracking is enabled, with 5-minute deduplication per IP+SKU)
  • Sanitizes all stored inputs (strip_tags + length truncation)
  • Redirects (302) to the product page, appending UTM parameters
  • If the product is not found, redirects to the Fallback URL (defaults to homepage); shows 404 if fallback is empty

REST API β€” Status (GET /V1/rollpix-qr/status)

  • Auth: Bearer token (admin)
  • ACL: Rollpix_QrLanding::status
  • Returns: { "enabled", "tracking_enabled", "module_version", "identifier_type" }

REST API β€” Report (GET /V1/rollpix-qr/report)

  • Auth: Bearer token (admin)
  • ACL: Rollpix_QrLanding::report
  • Query params: from, to (Y-m-d), sku, page, pageSize
  • Returns visit aggregations by SKU and daily counts

Behavior When Disabled

  • /qr/{sku} returns 404 (or redirects to fallback URL if configured)
  • REST APIs still respond (they report enabled: false)
  • No visits are recorded

Technical Architecture

M2-qr-landing/                          ← repo root
β”œβ”€β”€ registration.php
β”œβ”€β”€ composer.json
β”œβ”€β”€ etc/
β”‚   β”œβ”€β”€ module.xml
β”‚   β”œβ”€β”€ di.xml                           (interface preferences)
β”‚   β”œβ”€β”€ acl.xml
β”‚   β”œβ”€β”€ config.xml
β”‚   β”œβ”€β”€ db_schema.xml                    (rollpix_qr_visits table)
β”‚   β”œβ”€β”€ db_schema_whitelist.json
β”‚   β”œβ”€β”€ webapi.xml                       (status + report endpoints)
β”‚   β”œβ”€β”€ adminhtml/
β”‚   β”‚   └── system.xml
β”‚   └── frontend/
β”‚       β”œβ”€β”€ di.xml                       (custom router registration)
β”‚       └── routes.xml
β”œβ”€β”€ Api/
β”‚   β”œβ”€β”€ StatusInterface.php
β”‚   └── ReportInterface.php
β”œβ”€β”€ Block/Adminhtml/System/Config/
β”‚   └── ModuleInfo.php
β”œβ”€β”€ Controller/Qr/
β”‚   └── Index.php
β”œβ”€β”€ Helper/
β”‚   └── Config.php
β”œβ”€β”€ Model/
β”‚   β”œβ”€β”€ Status.php
β”‚   β”œβ”€β”€ Report.php
β”‚   β”œβ”€β”€ Visit.php
β”‚   β”œβ”€β”€ Config/Source/
β”‚   β”‚   └── IdentifierType.php
β”‚   └── ResourceModel/
β”‚       β”œβ”€β”€ Visit.php
β”‚       └── Visit/
β”‚           └── Collection.php
β”œβ”€β”€ Router/
β”‚   └── QrRouter.php
β”œβ”€β”€ view/frontend/layout/
β”‚   └── qr_qr_index.xml
└── i18n/
    └── es_AR.csv
Component Type Purpose
QrRouter Custom Router Parses /qr/{sku} into controller params
Controller\Qr\Index HttpGetActionInterface Landing logic: validate, track, redirect
Helper\Config Config reader Reads rollpix_qrlanding/general/*
Model\Status API implementation Returns module status
Model\Report API implementation Aggregated visit report

Manual Testing Guide

# 1. Redirect works with existing SKU
curl -sI "https://yourstore.com/qr/EXISTING_SKU"
# β†’ HTTP 302 + Location: product URL

# 2. Tracking records visit (automatic when tracking is enabled)
curl -sI "https://yourstore.com/qr/EXISTING_SKU?utm_source=test"
# β†’ Check rollpix_qr_visits table

# 3. Non-existent SKU returns 404
curl -sI "https://yourstore.com/qr/FAKE_SKU"
# β†’ HTTP 404

# 4. Status API
curl -s -H "Authorization: Bearer $TOKEN" "https://yourstore.com/rest/V1/rollpix-qr/status"

# 5. Report API
curl -s -H "Authorization: Bearer $TOKEN" "https://yourstore.com/rest/V1/rollpix-qr/report?from=2026-01-01"

Uninstall

Via Composer

bin/magento module:uninstall Rollpix_QrLanding
# or
composer remove rollpix/module-qr-landing
bin/magento setup:upgrade

Manual

bin/magento module:disable Rollpix_QrLanding
rm -rf app/code/Rollpix/QrLanding
bin/magento setup:upgrade

The rollpix_qr_visits table will be removed automatically on module uninstall via composer. For manual removal, drop it manually.

License

MIT

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.