Installation
To install the WooCommerce Simple Cart Discount plugin:
- Download the plugin ZIP file
- Go to WordPress admin > Plugins > Add New
- Click "Upload Plugin" and choose the downloaded ZIP file
- Click "Install Now" and then "Activate"
After activation, you'll find the settings under WooCommerce > Settings > Simple Cart Discount or Marketing > Simple Cart Discount.
Basic Settings
Enable/Disable
Toggle the discount functionality on or off using the enable checkbox.
Minimum Amount
Set the minimum cart total required to trigger the discount. For example, if set to $100, customers need to add items worth $100 or more to their cart to receive the discount.
Discount Types
Choose from three discount types:
- Fixed Amount: Apply a fixed discount amount (e.g., $10 off)
- Percentage: Apply a percentage discount (e.g., 15% off)
- Free Shipping: Offer free shipping when cart total meets the threshold
Location Restrictions
Limit the discount to specific countries:
- All Selling Locations: Apply discount to all countries where you sell, all selling locations are set in the WooCommerce General Settings
- Specific Countries: Choose specific countries where the discount will be available
Customer Restrictions
Option to limit discounts to new customers only (those without completed orders). If unchecked, the discount will be applied to all customers including returning customers.
Excluded Products
Select specific products to exclude from the discount calculation. These products will still count towards the cart total but won't receive the discount.
Progress Bar
The progress bar will be displayed on the cart page by default, if you want to display the progress bar on other pages, you can use the shortcode to display the progress bar on other pages.
Position Options
- Top Bar (fixed)
- Bottom Bar (fixed)
- Above Cart Table
- Above Cart Totals
Customizable Messages
Customize both progress and success messages using these variables:
{remaining}- Shows remaining amount needed{discount}- Shows the discount amount
Customization
Colors
Customize the colors of the progress bar:
- Background Color
- Progress Bar Color
- Text Color
- Border Color
Shortcodes
Use this shortcode to display the progress bar anywhere:
[simple_cart_discount_progress_bar class="my-custom-class" style="margin: 20px 0;"]
Available Parameters
class- Additional CSS classesstyle- Inline CSS stylestext_color- Text colorbar_color- Progress bar colorbg_color- Background colorborder_color- Border color
Developer Guide
Display the progress bar programmatically using PHP:
if (class_exists('WC_Simple_Cart_Discount')) {
$wc_cart_discount = new WC_Simple_Cart_Discount();
echo $wc_cart_discount->simple_cart_discount_progress_bar('custom', array(
'class' => 'my-custom-class',
'style' => 'margin: 20px 0;',
'text_color' => '#000000',
'bar_color' => '#ff0000',
'bg_color' => '#ffffff',
'border_color' => '#dddddd'
));
}
Troubleshooting
Common Issues
- Discount not applying: Check if the cart total meets the threshold and no excluded products are in cart
- Progress bar not showing: Verify the position setting and ensure no JavaScript errors
- Styling issues: Check for theme conflicts and try adjusting the custom colors