Save Cart is a Woocommerce plugin that forces login for cart access and provides cart storage across browsers and sessions for different user roles preventing cart loss.
Features
🔐 Force Login Protection
- Requires users to be logged in before accessing cart, shop, or product pages
- Redirects unauthenticated users to login page
- Preserves intended destination for post-login redirect
💾 Persistent Cart Storage
- Saves cart data to database with user association
- Configurable cart expiry (1-365 days)
- Automatic cleanup of expired carts
- Prevents cart loss during approval processes
🔄 Cross-Browser Synchronization
- Syncs cart across different browsers and devices
- Real-time cart updates using AJAX
- Automatic cart restoration on page load
- Tab/window synchronization using BroadcastChannel API
⚡ Auto-Save Functionality
- Configurable auto-save intervals (30-300 seconds)
- Saves cart on quantity changes, add/remove items
- Saves cart when switching tabs or closing browser
- Visual save indicators for user feedback
🛡️ LiteSpeed Cache Compatibility
- Works seamlessly with LiteSpeed Cache
- Database-based storage bypasses cache issues
- Maintains cart integrity regardless of cache settings
👥 Guest Cart Preservation
- Merges guest cart items when user logs in
- Prevents loss of items added before authentication
- Smart cart merging with quantity handling
👥 User Role Management
- Restrict cart saving to specific user roles
- Custom “Wholesaler” role with appropriate permissions
- Configurable role-based access control
- Secure user role verification
🏠 My Account Integration
- View saved cart in My Account dashboard
- Restore saved cart with one click
- Delete unwanted saved cart
- Complete cart management interface
Installation
- Upload the plugin to your
/wp-content/plugins/save-cart/
directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Configure settings at Settings > Save Cart
- Test the functionality by adding items to cart while logged in
Configuration
Basic Settings
Navigate to WooCommerce > Save Cart to configure:
- Force Login for Cart Access: Enable/disable login requirement
- Cart Expiry (Days): How long to keep saved carts (1-365 days)
- Auto-Save Interval (Seconds): How often to auto-save cart changes
- Sync Across Browsers: Enable cross-browser synchronization
- Preserve Guest Carts: Merge guest carts on login
- Allowed User Roles: Select which user roles can use cart saving
Recommended Settings for Approval Workflows
Force Login: Yes
Cart Expiry: 30 days
Auto-Save Interval: 60 seconds
Sync Across Browsers: Yes
Preserve Guest Carts: Yes
Allowed User Roles: Administrator, Shop Manager, Customer, Wholesaler
Usage
For Users
- Login Required: Users must be logged in to access cart functionality
- Automatic Saving: Cart is automatically saved as items are added/removed
- Cross-Browser Sync: Cart syncs across all browsers and devices
- Visual Feedback: Save indicators show when cart is saved
- Persistent Storage: Cart survives browser restarts and cache clearing
- My Account Access: View and manage saved cart in My Account dashboard
- Cart Restoration: Restore saved cart with one click
- Role-Based Access: Access depends on user role permissions
For Administrators
- Monitor Carts: View saved carts in admin interface
- Manage Expiry: Configure how long carts are kept
- Cleanup Tools: Manually cleanup expired carts
- Statistics: View cart usage statistics

Reviews
There are no reviews yet.