Product Library
A comprehensive product library with custom post types, taxonomies, AJAX filtering, and quote request system.
by Ronak Hapaliya · github.com/ronak3899/product-library-quotation · 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/ronak3899/product-library-quotation/archive/refs/heads/main.zipReadme
Product Library WordPress Plugin
A comprehensive WordPress plugin for managing and displaying product catalogs with advanced filtering, search functionality, and quote request capabilities.
Features
- Custom Post Types: Products and Quotes management
- Advanced Filtering: Filter products by type and location with hierarchical taxonomies
- AJAX-powered: Smooth, fast product loading without page refreshes
- Quote System: Built-in quote request functionality with product selection
- Email Notifications: Automatic email notifications for quote requests
- Responsive Design: Mobile-friendly interface with modern UI/UX
- Shortcode Support: Easy integration with any page or post
- Admin Management: Comprehensive admin interface for managing products and settings
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or higher
- jQuery (included with WordPress)
Installation
- Upload the plugin to your
/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Configure the plugin by going to Products > Shortcode Settings
Quick Start
1. Add Products
- Go to Products > Add New in your WordPress admin
- Fill in the product details:
- Title
- Description
- Featured image
- Product type (taxonomy)
- Product location (taxonomy)
- Publish your product
2. Set Up Product Types and Locations
- Go to Products > Product Types to create product categories
- Go to Products > Product Locations to create location categories
- Both support hierarchical organization (parent/child relationships)
3. Display Products on Your Site
Use the shortcode [product_library] on any page or post where you want to display the product catalog.
Example:
[product_library posts_per_page="16"]
4. Add Quote Form
Use the shortcode [quote_form] on a dedicated quote request page.
Example:
[quote_form]
Configuration
Shortcode Settings
Navigate to Products > Shortcode Settings to configure:
- Which pages use the product library shortcode
- Which pages use the quote form shortcode
- Page URLs for navigation and redirects
Shortcodes
Product Library Shortcode
[product_library posts_per_page="16"]
Parameters:
posts_per_page: Number of products to display per page (default: 16)
Features:
- Advanced filtering by product type and location
- Search functionality
- AJAX-powered pagination
- Product modal views
- Add to quote functionality
Quote Form Shortcode
[quote_form]
Features:
- Customer information collection
- Selected products display
- Form validation
- Email notifications to customer and admin
- Success/error handling
API Endpoints
The plugin provides several AJAX endpoints for frontend functionality:
filter_products: Filter products by search terms and taxonomiesload_more_products: Load additional products for paginationget_product_modal: Get product details for modal displayadd_to_quote_list: Add products to quote listremove_from_quote_list: Remove products from quote listget_quote_list: Retrieve current quote listclear_quote_list: Clear all products from quote listsubmit_quote: Submit quote request
File Structure
product-library/
├── assets/
│ ├── css/
│ │ ├── admin.css
│ │ └── product-library.css
│ └── js/
│ └── product-library.js
├── includes/
│ ├── class-admin.php
│ ├── class-ajax-handler.php
│ └── class-quote-handler.php
├── templates/
│ ├── product-library.php
│ ├── product-modal.php
│ └── quote-form.php
├── product-library.php
└── README.md
Customization
Styling
The plugin includes comprehensive CSS files that can be customized:
assets/css/product-library.css- Frontend stylesassets/css/admin.css- Admin interface styles
Templates
Template files can be overridden by copying them to your theme:
templates/product-library.php- Main product catalog displaytemplates/product-modal.php- Product detail modaltemplates/quote-form.php- Quote request form
Hooks and Filters
The plugin provides various WordPress hooks for customization:
product_library_before_product_card- Before product card displayproduct_library_after_product_card- After product card displayproduct_library_quote_submitted- After quote submission
Troubleshooting
Common Issues
- Products not displaying: Check if the shortcode is properly placed and the post type is registered
- Filters not working: Ensure JavaScript is loading and AJAX endpoints are accessible
- Quote form not submitting: Check form validation and AJAX nonce verification
- Email notifications not working: Verify WordPress mail configuration
Debug Mode
Enable WordPress debug mode to see detailed error messages:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
Browser Console
Check browser console for JavaScript errors that might affect functionality.
Security Features
- Nonce verification for all AJAX requests
- Input sanitization and validation
- Capability checks for admin functions
- Secure cookie handling for quote lists
Performance
- AJAX-powered filtering for fast response times
- Lazy loading of product images
- Efficient database queries with proper indexing
- Minimal JavaScript footprint
Browser Support
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Internet Explorer 11+
Mobile Support
- Responsive design for all screen sizes
- Touch-friendly interface
- Mobile-optimized filtering
- Swipe gestures for mobile devices
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Changelog
Version 1.0.0
- Initial release
- Custom post types for products and quotes
- Advanced filtering and search
- Quote request system with email notifications
- Responsive design
- Shortcode support
Support
For support and questions:
- Check the troubleshooting section above
- Review WordPress error logs
- Test with default WordPress theme
- Verify plugin compatibility
License
This plugin is licensed under the GPL v2 or later.
Credits
Developed by Ronak Hapaliya.