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
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)
- Download the
product-coupon-carousel.zipfile - Go to WordPress Admin → Plugins → Add New
- Click "Upload Plugin"
- Choose the ZIP file and click "Install Now"
- Click "Activate"
Method 2: FTP Upload
- Extract the ZIP file
- Upload the
product-coupon-carouselfolder to/wp-content/plugins/ - Go to WordPress Admin → Plugins
- Activate "Product Coupon Carousel for WooCommerce"
⚙️ Configuration
Global Settings
- Go to: WooCommerce → Coupon Carousel
- 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
- Edit any product
- Scroll to "Coupon Display Settings" meta box
- Choose display mode:
🔄 Automatic Mode (Default)
- Automatically shows all applicable coupons
- Priority Order:
- Product-specific coupons (coupons restricted to this product)
- 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:
- Product-Specific First: Coupons specifically for this product
- Sitewide Next: General coupons applicable to all products
- 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:
- Are there active, valid coupons in WooCommerce?
- Is the product page being viewed (not shop/category)?
- Are the coupons expired or usage limit reached?
- 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:
- Is jQuery loaded?
- Are there JavaScript errors in console?
- 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:
- Are you clicking "Update" button?
- Do you have permission to edit products?
- Check browser console for errors
Solution:
- Save the product after making changes
- Check user permissions
- Try a different browser
Styling Issues
Check:
- Theme CSS conflicts
- Other plugin conflicts
- Browser cache
Solution:
- Use browser inspector to identify conflicts
- Add
!importantto 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:
- Use Loco Translate plugin (recommended)
- Or create .po/.mo files manually
- Text domain:
product-coupon-carousel - Place translations in:
wp-content/languages/plugins/
🎁 Pro Tips
- Keep Offers Fresh: Update coupons regularly for best engagement
- Use Clear Copy: Make discount amounts obvious
- Test on Mobile: Always check mobile appearance
- Monitor Performance: Track which coupons are most copied
- Combine Modes: Use auto mode for most products, manual for special cases
- Set Expiry Dates: Create urgency with time-limited offers
- A/B Test: Try different coupon texts to see what converts
📄 License
GPL v2 or later - Free to use and modify!
🆘 Support
Need help?
- Read this documentation
- Check WordPress.org support forums
- Review WooCommerce coupon documentation
- Contact plugin author
🎉 Credits
- Built with Swiper.js for smooth carousels
- Select2 for enhanced dropdowns
- Made with ❤️ for WooCommerce store owners
Happy Selling! 🚀