Plugin screenshot thumbnail 1/1

Cart Notices

Cart Notices

Automatically show notices based off cart details

Currently Supports:

  • Minimum Amount: Show a notice based of the cart total
  • Deadline: Show a notice on a given day of the week and time
  • Referer: Show a notice to customers coming from a given referer
  • Products in cart: If the user has specific products (within a given quantity) in their cart
  • Categories in cart: Are any products or purchasables in the cart related to at-least one of these categories

Usage

You can perform an element query on the notices using:

{% set notices = craft.notices.all() %}

As well as supporting the generic parameters for element queries notices support some additional ones:

type

Specify the type of notice you want to show. Can be a string or an array of strings. Must match the handles of the notice types.

{% set notices = craft.notices.type(['deadline', 'referer']).all() %}

filter

Defines whether or not we should filter the notices by the currently active cart (or the cart passed to cart). If true, all notices will be checked against the cart to see if they should show. Defaults to true.

{# This will show all notices regardless of the cart #}
{% set notices = craft.notices.filter(false).all() %}

cart

What cart (or order) should we filter the notices against? Defaults to the currently active cart.

{% set notices = craft.notices.cart(craft.commerce.carts.cart).all() %}

Price includes 1 year of updates.
$10/year per site for updates after that.

Installation Instructions

To install this plugin, copy the command above to your terminal.

Active Installs
2
Version
1.0.4
License
Craft
Compatibility
Craft 3
Last release
January 7, 2021
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs