WP Manifestindependent plugin directory
manifest / content / product-library-quotation

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

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/ronak3899/product-library-quotation/archive/refs/heads/main.zip

Readme

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

  1. Upload the plugin to your /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Configure the plugin by going to Products > Shortcode Settings

Quick Start

1. Add Products

  1. Go to Products > Add New in your WordPress admin
  2. Fill in the product details:
    • Title
    • Description
    • Featured image
    • Product type (taxonomy)
    • Product location (taxonomy)
  3. Publish your product

2. Set Up Product Types and Locations

  1. Go to Products > Product Types to create product categories
  2. Go to Products > Product Locations to create location categories
  3. 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 taxonomies
  • load_more_products: Load additional products for pagination
  • get_product_modal: Get product details for modal display
  • add_to_quote_list: Add products to quote list
  • remove_from_quote_list: Remove products from quote list
  • get_quote_list: Retrieve current quote list
  • clear_quote_list: Clear all products from quote list
  • submit_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 styles
  • assets/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 display
  • templates/product-modal.php - Product detail modal
  • templates/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 display
  • product_library_after_product_card - After product card display
  • product_library_quote_submitted - After quote submission

Troubleshooting

Common Issues

  1. Products not displaying: Check if the shortcode is properly placed and the post type is registered
  2. Filters not working: Ensure JavaScript is loading and AJAX endpoints are accessible
  3. Quote form not submitting: Check form validation and AJAX nonce verification
  4. 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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. 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.


Read the full README on GitHub →