The project is in a healthy, maintained state
Allows admin to create percentage discounts on true order total including options
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

= 5.3.6
 Project Readme

SpreeOrderTotalDiscount

spree_order_total_discount adds a promotion calculator that takes a percentage off the true order total — the amount a customer actually pays, including option fees and other line-item adjustments.

Why this exists

Spree's built-in FlatPercentItemTotal calculates against item_total, which is the sum of line item prices before adjustments. If your store adds option fees on top of a variant's price, a "10% off" promotion built on the stock calculator quietly discounts less than customers expect.

Spree::Calculator::FlatPercentOrderTotal calculates against the order total instead, so the discount matches what the customer sees.

Features

  • Spree::Calculator::FlatPercentOrderTotal — percentage discount on the real order total
  • Selectable from the Spree admin like any other promotion calculator

Installation

Add this line to your application's Gemfile:

gem 'spree_order_total_discount'

Then run:

bundle install

Usage

Create a promotion in the Spree admin, add the action Create adjustment, and choose Flat percent (order total) as the calculator. Set the percentage as usual.

Requirements

  • Spree 5.3.6

Licence

AGPL-3.0-or-later. See LICENSE.