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
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.zipGemstone 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
- Upload the
gemstone-certificatefolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Ensure WooCommerce is installed and activated
- 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
- Go to Gemstone Certificate > Certificate Types
- Click Add New
- Enter the certificate type name (e.g., "Blue Sapphire")
- Add custom fields like:
- Weight (in carats)
- Color
- Clarity
- Origin
- Treatment
- Any other relevant information
- Click Create Certificate Type
2. Assign Certificate Types to Products
- Edit a WooCommerce product
- In the Product Data section, find Gemstone Certificate Settings
- Select the appropriate certificate type
- Fill in the certificate field values
- For variable products, you can set different certificate data for each variation
- 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:
- Scan QR Code: Scanning the QR code redirects to the certificate page
- Enter Reference Number: Use the verification page at
/certificate-verify/ - Direct Link: Share the certificate URL directly
5. Manage Certificates
- Go to Gemstone Certificate > All Certificates
- View all generated certificates
- Access certificate details, reference numbers, and associated orders
- View certificates directly from the admin panel
Database Tables
The plugin creates three database tables:
- wp_gc_certificate_types: Stores certificate type definitions
- wp_gc_certificates: Stores individual certificate records
- wp_gc_certificate_fields: Stores custom fields for each certificate type
Hooks and Filters
Actions
gc_certificate_generated: Fired when a certificate is createdgc_before_certificate_display: Before certificate HTML is renderedgc_after_certificate_display: After certificate HTML is rendered
Filters
gc_certificate_data: Filter certificate data before savinggc_certificate_template: Customize certificate HTML templategc_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:
- Plugin URI: https://yourwebsite.com
- Documentation: https://yourwebsite.com/docs
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