WP Manifestindependent plugin directory
manifest / ecommerce / click-and-collect

Click & Collect

A comprehensive Click & Collect plugin with radius search and time-slot booking for WooCommerce.

by H M Shahadul Islam · github.com/shahadul878/click-and-collect · 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/shahadul878/click-and-collect/archive/refs/heads/master.zip

Click & Collect Plugin for WooCommerce

A comprehensive Click & Collect plugin with radius search and time-slot booking for WooCommerce stores.

Features

🚀 Core Features

  • Radius Search: Find pickup points within a specified distance
  • Time-slot Booking: Book specific collection time slots
  • Google Maps Integration: Geocoding and distance calculations
  • Geolocation Support: Use customer's current location
  • Branch Management: Easy branch setup and management
  • Order Integration: Seamless WooCommerce checkout integration

💼 Admin Features

  • Branch Management: Create and manage pickup locations
  • Time Slot Configuration: Set working hours and capacity per branch
  • Order Management: View pickup details in order admin
  • Dashboard Analytics: Track pickup performance and statistics
  • Email Integration: Automatic pickup confirmations and reminders

🛒 Customer Experience

  • Easy Selection: Intuitive pickup point selection modal
  • Real-time Availability: Live time slot availability
  • Distance Display: Shows distance from customer location
  • Mobile Responsive: Works perfectly on all devices
  • Multiple Payment Methods: Supports various payment options

Installation

  1. Upload the plugin files to /wp-content/plugins/click-and-collect/
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Configure your Google Maps API key in the settings
  4. Create your first branch under "Branches" in the admin menu

Configuration

Google Maps API Key

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the following APIs:
    • Geocoding API
    • Maps JavaScript API
    • Distance Matrix API
  4. Create an API key
  5. Add the API key in Click & Collect settings

Branch Setup

  1. Go to "Click & Collect" > "Branches"
  2. Click "Add New Branch"
  3. Fill in branch details:
    • Name and address
    • Contact information
    • Working hours
    • Capacity per time slot
    • Slot duration

Payment Method Setup

  1. Go to WooCommerce > Settings > Payments
  2. Enable "Cash on Collection" payment method
  3. Configure the payment method settings

Usage

For Customers

  1. Add products to cart and proceed to checkout
  2. Select "Cash on Collection" as payment method
  3. Click "Select Pickup Point"
  4. Enter postal code or use current location
  5. Choose a branch from the list
  6. Select an available time slot
  7. Complete the order

For Store Owners

  1. Manage Branches: Add, edit, or deactivate pickup locations
  2. Monitor Orders: View pickup details in order management
  3. Track Performance: Use dashboard analytics to monitor usage
  4. Customize Settings: Configure search radius, time slots, and more

Technical Details

System Requirements

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

WooCommerce Compatibility

  • ✅ HPOS Compatible: Fully supports WooCommerce High-Performance Order Storage (HPOS)
  • ✅ Traditional Orders: Works with both traditional post-based orders and custom order tables
  • ✅ Future-Proof: Automatically adapts to WooCommerce's order storage system

Database Tables

The plugin creates the following custom table:

  • wp_click_collect_bookings: Stores time slot bookings

Hooks and Filters

The plugin provides various hooks for customization:

Actions

  • click_collect_before_pickup_selection: Before pickup point selection
  • click_collect_after_pickup_selection: After pickup point selection
  • click_collect_order_pickup_booked: When pickup is booked
  • click_collect_pickup_reminder_sent: When pickup reminder is sent

Filters

  • click_collect_branches_query: Modify branch search query
  • click_collect_timeslot_display: Customize time slot display
  • click_collect_pickup_confirmation_email: Modify confirmation email
  • click_collect_search_radius: Modify default search radius

Customization

Styling

Override plugin styles by adding custom CSS to your theme:

/* Customize pickup point selection modal */
.click-collect-modal {
    /* Your custom styles */
}

/* Customize branch list */
.branch-item {
    /* Your custom styles */
}

JavaScript

Extend plugin functionality with custom JavaScript:

// Listen for pickup selection events
jQuery(document).on('click_collect_pickup_selected', function(event, data) {
    // Your custom code
    console.log('Pickup selected:', data);
});

API Reference

AJAX Endpoints

  • click_collect_search_branches: Search for branches within radius
  • click_collect_get_timeslots: Get available time slots for a branch
  • click_collect_validate_pickup: Validate pickup selection
  • click_collect_get_user_location: Get user's current location

REST API Endpoints

  • GET /wp-json/click-collect/v1/branches: Get all branches
  • GET /wp-json/click-collect/v1/branches/{id}: Get specific branch
  • GET /wp-json/click-collect/v1/orders/{id}/pickup: Get pickup details for order

Troubleshooting

Common Issues

Google Maps Not Loading

  • Verify your API key is correct
  • Check that required APIs are enabled
  • Ensure API key has proper restrictions

No Branches Found

  • Check that branches are set to "Active" status
  • Verify branch coordinates are set
  • Check search radius settings

Time Slots Not Available

  • Verify working hours are configured
  • Check that branch capacity is set
  • Ensure date is not in the past

Debug Mode

Enable debug mode by adding this to your wp-config.php:

define('CLICK_COLLECT_DEBUG', true);

This will log additional information to help troubleshoot issues.

Support

For support and feature requests, please visit the GitHub repository or contact the developer.

Changelog

Version 1.0.1

  • ✅ HPOS Compatibility: Added full support for WooCommerce High-Performance Order Storage
  • ✅ Database Queries: Updated all order queries to work with both traditional and HPOS systems
  • ✅ Future-Proof: Plugin automatically adapts to WooCommerce's order storage system

Version 1.0.0

  • Initial release
  • Branch management system
  • Time slot booking
  • Google Maps integration
  • WooCommerce checkout integration
  • Admin dashboard and analytics
  • Email notifications
  • Mobile responsive design

License

This plugin is licensed under the GPL v2 or later.

Credits

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Roadmap

Upcoming Features

  • [ ] Multi-language support
  • [ ] SMS notifications
  • [ ] Advanced reporting
  • [ ] Integration with popular delivery plugins
  • [ ] Mobile app support
  • [ ] Customer pickup history
  • [ ] Branch performance analytics
  • [ ] Automated reminder system