solution25/age-checker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

solution25/age-checker

Composer 安装命令:

composer require solution25/age-checker

包简介

Age Checker - Shopware 6 Plugin

README 文档

README

Packagist Version Packagist Downloads License: MIT

AgeChecker

Introduction

The AgeChecker plugin helps merchants enforce age verification on their Shopware 6 storefronts. By integrating with an external age verification service, it ensures that customers meet age requirements before proceeding to checkout.

This tool is especially useful for businesses selling age-restricted products, providing a configurable and user-friendly verification layer that integrates seamlessly with Shopware's sales channels.

Key Features

  1. Sales Channel Integration
    • Add API keys per sales channel for flexible configuration.
  2. Age Verification Options
    • Customers can verify their age by entering their date of birth.
  3. Retry Management
    • Users have 3 attempts by default to verify their age.
  4. Temporary Denial Logic
    • Block users temporarily after 3 failed attempts.
  5. Admin Panel Configuration
    • Easily manage settings from the Shopware admin panel.

Compatibility

  • ✅ Shopware 6.6.x

Get Started

Installation & Activation

  1. Download

Git

  • Clone the Plugin Repository:
  • Open your terminal and run the following command in your Shopware 6 custom plugins directory (usually located at custom/plugins/):
git clone https://github.com/solution25com/agechecker-shopware-6-solution25.git

Packagist

 composer require solution25/age-checker
  1. Install the Plugin in Shopware 6
  • Log in to your Shopware 6 Administration panel.
  • Navigate to Extensions > My Extensions.
  • Locate the newly cloned plugin and click Install.
  1. Activate the Plugin
  • After installation, click Activate or toggle the plugin to activate it
  1. Verify Installation
  • After activation, you will see AgeChecker in the list of installed plugins.
  • The plugin name, version, and installation date should appear as shown in the screenshot below.

img1

Plugin Configuration

  1. Access Plugin Settings
  • Go to Settings > System > Plugins.
  • Locate AgeChecker and click the three dots (...) icon or the plugin name to open its settings.
  1. API Key Setup
  • Go to Extensions > My Extensions > AgeChecker.
  • Select the appropriate Sales Channel.
  • Enter the API Key provided by AgeChecker.net. You must create an account there to obtain your API Key.

Warning

Each sales channel requires a unique API key.

img2

  1. Save Configuration
  • Click Save in the top-right corner to store your settings.

How It Works

  1. User Initiates Checkout
  • AgeChecker triggers a popup based on the configured method.
  1. Verification Attempt
  • The user provides their birthdate.

img3

  • If successful, checkout proceeds.

img4

  • If unsuccessful:
    • The user can retry up to 3 times.
    • After 3 failed attempts, the user is temporarily denied access.

img5

  1. Temporary Denial Logic
  • Denied users are blocked for 24 hours before they can try again.

Age Checker Plugin - API Documentation

This document describes the API endpoint for the Age Checker Plugin for Shopware 6. The plugin integrates with AgeChecker.net to verify a customer’s age and stores the result in the customer’s custom fields.

Update Customer Age Verification Status

Endpoint
POST /age-checker-user-status

Description

Updates the custom_age_confirmed_ custom field for a logged-in customer based on the age verification result received from the AgeChecker.net service.

System Checks

  • Customer must be logged in.
  • The uuid from AgeChecker.net must be provided.
  • Calls the AgeChecker.net API to verify the result.
  • Sets the customer’s custom field custom_age_confirmed_ to true if the verification is successful (status: accepted).

Request Headers

sw-context-token: <your-sales-channel-context-token>
Content-Type: application/json

Note: The sw-context-token must be obtained via the Shopware Store API authentication process or created automatically in a Storefront session.

Example Request Body

{
  "uuid": "8e7c35e2-3f48-4fc9-9283-fb0e198b0fd5"
}

Successful Response

{
  "message": "Customer age verification status updated"
}

Example Error Response

{
  "message": "uuid is required"
}

Troubleshooting

Verify Functionality

  • Confirm popup appears on checkout.
  • Test both verification methods.
  • Simulate 3 failed attempts to confirm that the user is blocked afterward.

FAQ

  • Is an API key required?
    Yes. Without a valid API key, age verification will not function.

  • Can I limit it to certain sales channels?
    Yes. You can enable or disable the plugin per sales channel.

  • Does this plugin block checkout?
    Yes, until the user passes age verification.

  • What happens after 3 failed attempts?
    The user is redirected to a temporary denial page and cannot retry until the timeout expires.

    Wiki

solution25/age-checker 适用场景与选型建议

solution25/age-checker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 solution25/age-checker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 solution25/age-checker 我们能提供哪些服务?
定制开发 / 二次开发

基于 solution25/age-checker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-30