WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-available-offers

WooCommerce Available Offers - TechiEvolve

Display WooCommerce coupons in a beautiful horizontal carousel on product pages. Automatically shows product-specific and sitewide coupons, or manually select coupons to display.

by TechiEvolve · github.com/sangeeta-code/woocommerce-available-offers

★ 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/sangeeta-code/woocommerce-available-offers/archive/refs/heads/main.zip

🎯 Product Coupon Carousel for WooCommerce

🚀 Overview

A powerful WordPress plugin that automatically displays your WooCommerce coupons in a beautiful, horizontal carousel on product pages. Show product-specific coupons first, then sitewide offers - or manually select which coupons to display.

✨ Key Features

  • 🔄 Automatic Coupon Detection: Automatically finds and displays applicable coupons
  • 🎯 Smart Prioritization: Product-specific coupons shown first, then sitewide (newest to oldest)
  • ✋ Manual Control: Choose specific coupons to display per product
  • 🎨 Beautiful Carousel: Responsive horizontal slider with smooth navigation
  • 📋 One-Click Copy: Click to copy coupon codes instantly
  • 🎨 Customizable Design: Adjust colors, position, and carousel behavior
  • 📱 Fully Responsive: Perfect on all devices and screen sizes
  • ⚡ Performance Optimized: Lightweight and fast-loading

📋 Requirements

  • WordPress 5.8 or higher
  • WooCommerce 5.0 or higher
  • PHP 7.2 or higher

📥 Installation

Method 1: Upload ZIP (Recommended)

  1. Download the product-coupon-carousel.zip file
  2. Go to WordPress Admin → Plugins → Add New
  3. Click "Upload Plugin"
  4. Choose the ZIP file and click "Install Now"
  5. Click "Activate"

Method 2: FTP Upload

  1. Extract the ZIP file
  2. Upload the product-coupon-carousel folder to /wp-content/plugins/
  3. Go to WordPress Admin → Plugins
  4. Activate "Product Coupon Carousel for WooCommerce"

⚙️ Configuration

Global Settings

  1. Go to: WooCommerce → Coupon Carousel
  2. Configure:
    • Display Position: Where carousel appears on product pages
    • Show Coupon Codes: Enable/disable coupon code display
    • Auto-scroll Speed: Time between auto-scrolls
    • Enable Auto-scroll: Turn automatic scrolling on/off
    • Border Color: Customize card border color

Per-Product Settings

  1. Edit any product
  2. Scroll to "Coupon Display Settings" meta box
  3. Choose display mode:

🔄 Automatic Mode (Default)

  • Automatically shows all applicable coupons
  • Priority Order:
    1. Product-specific coupons (coupons restricted to this product)
    2. Sitewide coupons (newest to oldest)
  • Only shows valid, non-expired coupons

🎯 Manual Mode

  • Manually select which coupons to display
  • Choose from a dropdown of all active coupons
  • Full control over which offers appear

🎨 Features in Detail

Automatic Coupon Detection

The plugin intelligently finds:

  • ✅ Coupons restricted to the specific product
  • ✅ Sitewide coupons (no product restrictions)
  • ✅ Category-specific coupons (if product is in allowed categories)
  • ❌ Filters out expired coupons
  • ❌ Filters out coupons that reached usage limit
  • ❌ Filters out coupons excluding the product

Smart Prioritization

Coupons are displayed in this order:

  1. Product-Specific First: Coupons specifically for this product
  2. Sitewide Next: General coupons applicable to all products
  3. Newest First: Within each group, newest coupons appear first

Carousel Features

  • Responsive Slides: Shows 1-3 coupons depending on screen size
  • Auto-scroll: Optional automatic progression through offers
  • Navigation: Previous/Next buttons for manual control
  • Pagination Dots: Visual indicator of slide position
  • Touch/Swipe: Full touch gesture support on mobile

Copy Functionality

  • One Click: Click any coupon code to copy
  • Visual Feedback: "Copied!" message appears
  • Automatic: Uses clipboard API with fallback support
  • Tracking: Optional AJAX tracking when codes are copied

🎯 Use Cases

E-commerce Stores

  • Flash Sales: "50% OFF - Today Only"
  • BOGO Deals: "Buy 1 Get 1 FREE"
  • Free Shipping: "Free Shipping Over $50"
  • Bundle Offers: "Save 20% on Bundle"

Product-Specific Promotions

  • Clearance Items: Special discounts on specific products
  • New Arrivals: Launch discounts for new products
  • Seasonal Sales: Holiday-specific offers

Marketing Campaigns

  • Email Campaigns: Feature specific coupon codes
  • Social Media: Display trending discount codes
  • Loyalty Programs: Member-exclusive offers

💻 For Developers

Hooks & Filters

// Modify carousel title
add_filter('pcc_carousel_title', function($title) {
    return 'Special Deals Just for You!';
});

// Hook into coupon copy event
add_action('pcc_coupon_copied', function($coupon_code) {
    // Your tracking code here
    error_log('Coupon copied: ' . $coupon_code);
});

// Modify coupon data before display
add_filter('pcc_coupon_data', function($coupon_data, $coupon_post) {
    // Customize coupon data
    return $coupon_data;
}, 10, 2);

File Structure

product-coupon-carousel/
├── product-coupon-carousel.php   # Main plugin file
├── includes/
│   ├── class-pcc-coupon-handler.php  # Coupon logic
│   ├── class-pcc-frontend.php        # Frontend display
│   ├── class-pcc-admin.php           # Admin interface
│   └── class-pcc-settings.php        # Settings page
├── assets/
│   ├── css/
│   │   ├── frontend.css          # Product page styles
│   │   └── admin.css             # Admin styles
│   └── js/
│       ├── frontend.js           # Carousel & copy
│       └── admin.js              # Admin functionality
└── languages/                     # Translation files

Database Structure

Product Meta:

  • _pcc_display_mode: 'auto' or 'manual'
  • _pcc_selected_coupons: Array of coupon IDs (manual mode)

Options:

  • pcc_settings: Array of global settings

🔧 Customization

Change Carousel Appearance

Edit assets/css/frontend.css:

/* Adjust card border radius */
.pcc-coupon-card {
    border-radius: 20px; /* More rounded */
}

/* Change hover effect */
.pcc-coupon-card:hover {
    transform: scale(1.05); /* Slight zoom */
}

/* Modify button style */
.pcc-coupon-code {
    background: linear-gradient(135deg, #00D4AA 0%, #00A67E 100%);
}

Adjust Carousel Behavior

// In assets/js/frontend.js
const swiper = new Swiper('.pcc-coupon-swiper', {
    slidesPerView: 2,      // Show 2 slides at once
    speed: 800,            // Slower transition
    effect: 'fade',        // Fade instead of slide
    // ... more options
});

🐛 Troubleshooting

Coupons Not Showing

Check:

  1. Are there active, valid coupons in WooCommerce?
  2. Is the product page being viewed (not shop/category)?
  3. Are the coupons expired or usage limit reached?
  4. Clear all caches (browser + WordPress)

Solution:

  • Go to WooCommerce → Coupons
  • Verify coupons are published and valid
  • Check expiry dates and usage limits

Carousel Not Working

Check:

  1. Is jQuery loaded?
  2. Are there JavaScript errors in console?
  3. Is Swiper library loading?

Solution:

  • Check browser console (F12) for errors
  • Clear browser cache
  • Deactivate other plugins to check conflicts

Manual Selection Not Saving

Check:

  1. Are you clicking "Update" button?
  2. Do you have permission to edit products?
  3. Check browser console for errors

Solution:

  • Save the product after making changes
  • Check user permissions
  • Try a different browser

Styling Issues

Check:

  1. Theme CSS conflicts
  2. Other plugin conflicts
  3. Browser cache

Solution:

  • Use browser inspector to identify conflicts
  • Add !important to CSS rules if needed
  • Clear all caches

📱 Responsive Breakpoints

  • Desktop (1280px+): 3 coupons per view
  • Laptop (1024px): 3 coupons per view
  • Tablet (768px): 2 coupons per view
  • Mobile (640px): 1 coupon per view
  • Small Mobile (<640px): 1 coupon per view

🌍 Translation

The plugin is translation-ready. To translate:

  1. Use Loco Translate plugin (recommended)
  2. Or create .po/.mo files manually
  3. Text domain: product-coupon-carousel
  4. Place translations in: wp-content/languages/plugins/

🎁 Pro Tips

  1. Keep Offers Fresh: Update coupons regularly for best engagement
  2. Use Clear Copy: Make discount amounts obvious
  3. Test on Mobile: Always check mobile appearance
  4. Monitor Performance: Track which coupons are most copied
  5. Combine Modes: Use auto mode for most products, manual for special cases
  6. Set Expiry Dates: Create urgency with time-limited offers
  7. A/B Test: Try different coupon texts to see what converts

📄 License

GPL v2 or later - Free to use and modify!


🆘 Support

Need help?

  1. Read this documentation
  2. Check WordPress.org support forums
  3. Review WooCommerce coupon documentation
  4. Contact plugin author

🎉 Credits

  • Built with Swiper.js for smooth carousels
  • Select2 for enhanced dropdowns
  • Made with ❤️ for WooCommerce store owners

Happy Selling! 🚀