WP Manifestindependent plugin directory
manifest / ecommerce / softuni-cheapest-unit-off

SoftUni – Cheapest Unit Off (Fixed Cart Coupon)

Ako je aktivan označeni kupon i u korpi ima ≥ N artikala, od ukupne sume se oduzima cena NAJJEFTINIJE JEDINICE u korpi (samo 1 komad). Ne dira cene stavki; kupon mora biti tipa "Fixed cart".

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/milosmilenkovic007/softuni-cheapest-unit-off/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

SoftUni - Cheapest Unit Off (WooCommerce Plugin)

A WooCommerce plugin that applies the price of the cheapest single unit in the cart as a discount when specific conditions are met.

Description

This plugin adds a new coupon functionality to WooCommerce that automatically applies the price of the cheapest single unit in the cart as a discount when:

  • A coupon with this feature enabled is active
  • The cart contains a minimum number of items (default: 3)
  • The coupon is of type "Fixed cart"

Features

  • Applies the price of the cheapest single unit as a cart discount
  • Configurable minimum quantity requirement (default: 3 items)
  • Works with WooCommerce's "Fixed cart" coupon type
  • Preserves original product prices (discount is applied at cart level)
  • Handles tax calculations correctly (works with prices including/excluding tax)
  • Compatible with other WooCommerce discounts and coupons

Installation

  1. Upload the plugin files to /wp-content/plugins/softuni-cheapest-free directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Make sure WooCommerce is installed and activated

Usage

  1. Go to WooCommerce → Coupons
  2. Create a new coupon or edit an existing one
  3. Set the coupon type to "Fixed cart"
  4. In the coupon settings, enable "SoftUni: Cheapest Unit as Discount"
  5. (Optional) Adjust the minimum quantity requirement (default is 3 items)
  6. Save the coupon

When applied to a cart with sufficient items, the coupon will automatically set its discount amount to match the price of the cheapest single unit in the cart.

Requirements

  • WordPress 6.0 or higher
  • PHP 7.4 or higher
  • WooCommerce (latest version recommended)

Technical Details

The plugin:

  • Uses WooCommerce hooks for cart calculations
  • Properly handles tax calculations (works with prices excluding tax)
  • Maintains cart item prices and applies discount at cart level
  • Validates coupon type and minimum quantity requirements
  • Provides clear error messages when requirements are not met

License

GPLv2 or later