Discount - SilverStripe Shop SubModule
Allows creating discounts for products / orders.
- Discount by various criteria, including:
- User group
- Number of uses
- Order value
- Shipping zone
- Coupon codes
- Gift voucher products
- Shipping discount
Discounts can be applied to individual products, cart subtotal, or shipping. Discounts can be globally enabled/disabled.
- Shop Module + its requirements
- Install code to your SilverStripe root directory.
composer require burnbright/silverstripe-shop-discount dev-master
If you are using the stepped checkout, add the
CheckoutStep_Discount checkout step:
CheckoutPage: steps: 'contactdetails' : 'CheckoutStep_ContactDetails' 'shippingaddress' : 'CheckoutStep_Address' 'billingaddress' : 'CheckoutStep_Address' 'shippingmethod' : 'CheckoutStep_ShippingMethod' 'discount' : 'CheckoutStep_Discount' #here! 'paymentmethod' : 'CheckoutStep_PaymentMethod' 'summary' : 'CheckoutStep_Summary'
If you would like to display the coupon form seperately to the checkout form,
apply the following extension. This will make
CouponForm available in the checkout template:
CheckoutPage_Controller: extensions: - CouponFormCheckoutDecorator
OrderDiscountModifier modifier to your order modifiers yaml config:
Order: modifiers: - Blah - OrderDiscountModifier #here! - Blah
ProductVariation with the
SpecificPricingExtension to introduce a pricing table for each product. This allows admins to set prices according to things like, date, and membership group.
Configure as follows:
Product: extensions: - SpecificPricingExtension ProductVariation: extensions: - SpecificPricingExtension
OrderCoupon has become a subclass of
Discount, so if your existing database contains
OrderCoupon, it might be best to rename it to
Discount before running