WP Manifestindependent plugin directory
manifest / ecommerce / gemstone-certificate-qr-verification-wordpress-plugin

Gemstone Certificate Generator

Generate certificates for gemstones with QR codes and verification system

by Your Name · github.com/mmohitsingh05/gemstone-certificate-qr-verification-wordpress-plugin · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/mmohitsingh05/gemstone-certificate-qr-verification-wordpress-plugin/archive/refs/heads/main.zip

Gemstone Certificate Generator Plugin

A comprehensive WordPress/WooCommerce plugin for generating, managing, and verifying gemstone certificates with QR codes.

Features

  • Multiple Certificate Types: Create different certificate types for various gemstone categories (Panna, Neelam, Blue Sapphire, etc.)
  • Custom Fields: Add unlimited custom fields to each certificate type
  • WooCommerce Integration: Seamlessly integrates with WooCommerce products and variations
  • Automatic Certificate Generation: Certificates are automatically generated when orders are completed
  • QR Code Support: Each certificate includes a unique QR code for verification
  • Verification System: Public verification page with reference number search
  • PDF Download: Customers can download certificates as PDF
  • Admin Dashboard: Complete admin interface for managing certificates and certificate types

Installation

  1. Upload the gemstone-certificate folder to /wp-content/plugins/
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Ensure WooCommerce is installed and activated
  4. Go to Gemstone Certificate in the admin menu to start creating certificate types

File Structure

gemstone-certificate/
├── gemstone-certificate.php          # Main plugin file
├── README.md                          # This file
├── includes/
│   ├── class-gc-database.php         # Database management
│   ├── class-gc-certificate-types.php # Certificate types CRUD
│   ├── class-gc-certificates.php     # Certificates CRUD
│   ├── class-gc-product-integration.php # WooCommerce product integration
│   ├── class-gc-order-handler.php    # Order processing and certificate generation
│   ├── class-gc-qr-generator.php     # QR code generation
│   └── class-gc-verification.php     # Public verification system
├── admin/
│   ├── class-gc-admin-menu.php       # Admin menu and dashboard
│   └── class-gc-admin-certificate-types.php # Certificate types management UI
├── public/
│   └── class-gc-public.php           # Public-facing functionality
└── assets/
    ├── css/
    │   ├── admin.css                 # Admin styles
    │   └── public.css                # Public styles
    └── js/
        ├── admin.js                  # Admin JavaScript
        └── public.js                 # Public JavaScript

Usage

1. Create Certificate Types

  1. Go to Gemstone Certificate > Certificate Types
  2. Click Add New
  3. Enter the certificate type name (e.g., "Blue Sapphire")
  4. Add custom fields like:
    • Weight (in carats)
    • Color
    • Clarity
    • Origin
    • Treatment
    • Any other relevant information
  5. Click Create Certificate Type

2. Assign Certificate Types to Products

  1. Edit a WooCommerce product
  2. In the Product Data section, find Gemstone Certificate Settings
  3. Select the appropriate certificate type
  4. Fill in the certificate field values
  5. For variable products, you can set different certificate data for each variation
  6. Save the product

3. Automatic Certificate Generation

  • When a customer completes an order, certificates are automatically generated
  • Customers can view and download certificates from their order page
  • Each certificate has a unique reference number and QR code

4. Certificate Verification

Customers and visitors can verify certificates in three ways:

  1. Scan QR Code: Scanning the QR code redirects to the certificate page
  2. Enter Reference Number: Use the verification page at /certificate-verify/
  3. Direct Link: Share the certificate URL directly

5. Manage Certificates

  1. Go to Gemstone Certificate > All Certificates
  2. View all generated certificates
  3. Access certificate details, reference numbers, and associated orders
  4. View certificates directly from the admin panel

Database Tables

The plugin creates three database tables:

  1. wp_gc_certificate_types: Stores certificate type definitions
  2. wp_gc_certificates: Stores individual certificate records
  3. wp_gc_certificate_fields: Stores custom fields for each certificate type

Hooks and Filters

Actions

  • gc_certificate_generated: Fired when a certificate is created
  • gc_before_certificate_display: Before certificate HTML is rendered
  • gc_after_certificate_display: After certificate HTML is rendered

Filters

  • gc_certificate_data: Filter certificate data before saving
  • gc_certificate_template: Customize certificate HTML template
  • gc_qr_code_size: Change QR code dimensions

Shortcodes

[gc_verification_form]

Displays a certificate verification form on any page.

[gc_verification_form]

Requirements

  • WordPress 5.8 or higher
  • WooCommerce 5.0 or higher
  • PHP 7.4 or higher
  • MySQL 5.6 or higher

URLs

The plugin creates these custom URLs:

  • /certificate-verify/ - Verification page
  • /certificate-view/?ref=XXX - View certificate
  • /certificate-download/?ref=XXX - Download certificate PDF

Customization

Custom Certificate Template

You can customize the certificate design by filtering the HTML output:

add_filter('gc_certificate_template', function($html, $certificate) {
    // Customize $html here
    return $html;
}, 10, 2);

Custom PDF Generation

For production use, install a PDF library like TCPDF or Dompdf:

composer require dompdf/dompdf

Then modify the generate_certificate_pdf() method in class-gc-verification.php.

Security Features

  • Nonce verification on all forms
  • Data sanitization and validation
  • Prepared SQL statements to prevent injection
  • Capability checks for admin functions
  • Unique reference numbers prevent duplication

Support

For support and feature requests, please visit:

Changelog

Version 1.0.0

  • Initial release
  • Certificate type management
  • WooCommerce integration
  • QR code generation
  • Verification system
  • Admin dashboard

Credits

Developed by [Your Name]

License

This plugin is licensed under the GPL v2 or later.

Future Enhancements

  • [ ] Bulk certificate generation
  • [ ] Email certificates to customers
  • [ ] Certificate expiration dates
  • [ ] Advanced PDF customization
  • [ ] Certificate analytics
  • [ ] Multi-language support
  • [ ] Certificate templates library
  • [ ] API for third-party integrations