Getting Started

Welcome to the Extended Shopping Cart Rules documentation.

Here you will find everything you need to set up your Extended Shopping Cart Rules and create unique discount offers to increase the average cost of the order and motivate customers for the next purchase in your store.

Go ahead, dive in!

Firstly, please, find our extension in My Downloadable Products section of our store.

Learn how to install extension and proceed with Quick Start, which will guide you to setup your shopping cart rules.

How to install the extension

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Copy the installation instructions from the page My Downloadable Products to the SSH console and press ENTER.
  4. Run command php -f bin/magento module:enable Mirasvit_Core Mirasvit_SalesRule Mirasvit_Banner to enable the extension.
  5. Run command php -f bin/magento setup:upgrade to install the extension.
  6. Run command php -f bin/magento cache:clean to clean the cache.
  7. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Note

Important: Our extension works only with secure connection (HTTPS) is enabled, so for proper work of our extension, make sure, that SSL is enabled on your store.

Installation via direct file upload

You can also install the extension via direct files uploading.

  1. Go to My Downloadable Products / View & Download
  2. Unpack .zip package and copy contents to magento root directory
  3. Run command php -f bin/magento module:enable Mirasvit_Core Mirasvit_SalesRule Mirasvit_Banner to enable all extensions.
  4. Run command php -f bin/magento setup:upgrade to run upgrade procedure.
  5. Run command php -f bin/magento cache:clean to clean the cache.
  6. Re-deploy static view files rm -rf pub/static/* rm -rf var/view_preprocessed/* php -f bin/magento setup:static-content:deploy

Quick Start

As you've successfully completed installation of Extended Shopping Cart Rules, we will guide you through the main steps required to start efficiently using our extension.

  1. Please open and configure your Cart Price Rules in Magento Main Menu > Marketing > Cart Price Rules

  2. Please create text or image Banner which describes the promo and rules in Magento Main Menu > Marketing > Banners

Cart Price Rules

Smart motivation policy will influence the choice of customers, showing them discount possibilities and advantages on the category, product, cart or the checkout pages.

To create a new Cart Price Rules go to Marketing > Cart Price Rules and press the button Add New.

Rule Information

  • Rule Name - name of the rule. Used only for internal purposes.
  • Description - is the rule description. Used only for internal purposes.
  • Active - rule status.
  • Websites - website, where this rule should apply.
  • Customer Groups - customer groups for which rule can be applied.
  • Coupon - select coupon to apply this rule, if "No Coupon" is selected then no coupon code required, if "Specific Coupon" option is selected then you will need coupon code to apply this discount rule.

The extension gives option to enter custom error message for each coupon.

  • Coupon Success Message - successfully applying coupon was used
  • Coupon Error Message - applying coupon is not valid, incorrect etc.

For example, if you create a coupon that can only apply to NIKE products priced at $100 & up, you can add custom error message "This coupon is only valid for NIKE products priced at $100 or more". It will be shown on the Shopping cart page

  • Uses per Customer - i.e. How many times customer can use this code?
  • From - the date from the code is active
  • To - the date till the code is active
  • Priority - specify the priority of the code, in case of multiple codes to be applied
  • Public In RSS Feed - If set Yes, Include the rule in RSS Feeds

Conditions

This section define either single condition or their set, which trigger the rule.

It has a number of discount options apart from Magento's default options (leave the conditions blank if you want to apply for all products).

Actions

In this tab there is the hint pop-up window, since you have chosen any Action and set Discount Amount you will see it at the bottom right corner.

This subsection contains possible actions that can be performed on customer that shall be executed, when conditions on previous sections are met:

  • Apply - strategy, which will be used for executing rules:

    • Percent of product price discount - Discounts item by subtracting a percentage from the original price. The discount applies to each qualifying item in the cart. For example: Enter 10 in Discount Amount for an updated price that is 10% less than the original price.
    • Fixed amount discount - Discounts item by subtracting a fixed amount from the original price. The discount applies to each qualifying item in the cart. For example: Enter 10 in Discount Amount for an updated price that is $10 less than the original price.
    • Fixed amount discount for whole cart - Discounts the entire cart by subtracting a percentage from the cart total.
      For example: Enter 10 in Discount Amount to subtract 10% from the cart total.
    • Buy X get Y free (discount amount is Y) - Defines a quantity that the customer must purchase to receive a quantity for free.
    • Buy product X Get % discount for product Y - Defines a percentage discount for product Y. For example: Enter 15 in Discount Amount then Customer will receive a 15% off for Y product.
    • Buy product X Get $ discount for product Y - Discounts item by subtracting a fixed amount from the original price for product Y. For example: Enter 25 in Discount Amount then Customer will receive a 25$ off for Y product.
    • For each $X spend, give $Y discount - Defines the fixed amount of discount from the total amount in cart. For example: Enter 10 in Discount Amount $Y and 50 in Spend $X then Customer will receive $10 discount for each $50 in cart.
    • Discount for Most Expensive product - Defines a percentage discount for most expensive product in cart. For example: Enter 10 in Discount Amount then Customer will receive a 10% discount for most expensive product in cart.
    • Discount for Most Cheapest product - Defines a percentage discount for the cheapest product in cart. For example: Enter 15 in Discount Amount then Customer will receive a 15% discount for the cheapest product in cart.
  • Discount Amount - number, without symbols. For example, depending on the discount option selected, the number 10 might indicate a percentage, a fixed amount, or a quantity of items.
  • Maximum Qty Discount is Applied To - enter the largest number of the same product that can qualify for the discount. For example, enter β€œ1” to discount only one item.
  • Discount Qty Step (Buy X) - enter the quantity that the customer must purchase to qualify for the discount. In this example, the customer must purchase three.
  • Discard subsequent rules - set β€œYes” If you want to prevent other discounts from being applied to the purchase

Apply the rule only to cart items matching the following conditions (leave blank for all items).

  • To include Free Shipping, choose one of the following options:
    • For matching items only
    • For shipment with matching items

Rules' Visualization

For easy navigation and search through the created rules in your stores we provide you the Rule`s visualization.

Go to Marketing > Cart Price Rules and press the button Visualize Rules. This feature will be useful if you have many storeviews/domain and should manage it as well. Click the Search and enter name of the rule.

There is an Edit button for each rule at the top right corner. Which will tranfer you to the Cart Price Rules window.

Banners

With the Mirasvit Extended Shopping price cart rules you can easily create a positive impression on your customers,
direct them to your most compelling offer, etc. what will benefit your income by implementing is an onsite Banner campaign.

For more details please visit this Promo Banners documentation

Integrating Segments

Our extension allows integration with Mirasvit Customer Segmentation Suite, which turns into powerful tool of automatic store's policy management by providing customers with discounts, using conditions based on their segment.

Please read more on the product page.

How to upgrade the extension

To upgrade the extension follow these steps:

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Run command composer require mirasvit/module-sales-rule:* --update-with-dependencies to update current extension with all dependencies.

    Note

    In some cases the command above is not applicable, it's not possible to update just current module, or you just need to upgrade all Mirasvit modules in a bundle. In this case command above will have no effect.

    Run instead composer update mirasvit/* command. It will update all Mirasvit modules, installed on your store.

  4. Run command php -f bin/magento module:enable Mirasvit_Core Mirasvit_SalesRule Mirasvit_Banner to re-enable the extension.
  5. Run command php -f bin/magento setup:upgrade to install updates.
  6. Run command php -f bin/magento cache:clean to clean the cache.
  7. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Disabling the Extension

Temporarily Disable

To temporarily disable the extension please follow these steps:

  1. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run the command php -f bin/magento module:disable Mirasvit_SalesRule to disable the extension.
  3. Login in to the Magento back-end and refresh the store cache (if enabled).

Extension Removing

To uninstall the extension please follow theses steps:

  1. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run the command composer remove mirasvit/module-sales-rule to remove the extension.
  3. Login in to the Magento back-end and refresh the store cache (if enabled).

Change Log

1.3.2

(2024-06-12)

Fixed

  • Fixed the issue with incorrect discount applied if more than one rule of one type is applicable for the cart (Buy product X Get $ discount for product Y, Buy product X Get % discount for product Y, Buy product X Get product Y for fixed price, Fixed Price for All Products)

1.3.1

(2024-03-11)

Fixed

  • Fixed the issue with coupon messages (PHP8)

1.3.0

(2024-02-15)

Fixed

  • Fixed the issue with 'Maximum Qty to Apply' for rules 'Buy product X Get ... discount for product Y'

Improvements

  • New Rule - Fixed discount for Most Expensive product
  • New Rule - Fixed discount for Most Cheapest product
  • New Rule - Fixed Price for All Products
  • New Rule - Fixed Price for Cheapest product by step
  • New Rule - Fixed Price for Cheapest Product
  • New Rule - Buy product X Get product Y for fixed price

1.2.8

(2023-10-06)

Improvements

  • New Rule - Fixed Discount for Cheapest products by step

1.2.7

(2023-03-22)

Fixed

  • Fixed the issue with the rule 'For each spend, give discount'

1.2.6

(2023-02-16)

Improvements

  • Added support of Magento 2.4.6

Fixed

  • Fixed the issue with the rule of type 'Discount for Cheapest products by step' not applied as expected
  • Condition "is Discounted" did not work in Rewards module

1.2.5

(2022-12-22)

Fixed

  • Fixed the issue with custom customer attributes

1.2.4

(2022-09-15)

Improvements

  • A few rules evaluator improvements (rule edit form)

1.2.3

(2022-09-06)

Fixed

  • Fixed the issue with preview (Magento 2.4.5)

1.2.2

(2022-08-18)

Fixed

  • PHP8.1 compatibility issue

1.2.1

(2022-06-20)

Improvements

  • remove db_schema_whitelist.json

1.2.0

(2022-05-31)

Improvements

  • Migrate to declarative schema

1.1.1

(2022-05-26)

Improvements

  • update mirasvit/module-banner dependency

1.1.0

(2021-11-19)

Features

  • New cart rule - Discount for cheapest by step

Improvements

  • Rule evaluator
  • Magento versions support - 2.3, 2.4

Fixed

  • Fixed the issue with cart rule form (Chrome 95.0+)

1.0.17

(2021-08-25)

Fixed

  • Fixed the issue with not able to add more than 1 product to the cart when Discount for All Except Most Expensive rule enabled

1.0.16

(2020-11-04)

Fixed

  • Fixed issue with the rule "For each $X spend get $Y discount" and bundle products [#40]()

1.0.15

(2020-09-11)

Improvements

  • Small spelling fixes

1.0.14

(2020-08-05)

Fixed

  • Fixed - rules with types BuyXGetY and BuyXGetAmountY applied when no conditions are set

1.0.13

(2020-07-29)

Improvements

  • Support of Magento 2.4

1.0.12

(2020-07-15)

  • Isolate PromoBanners in the separate extension.

1.0.11

(2020-05-27)

Fixed

  • Issue with discount in the "For each $X spend, give $Y discount" rule.

1.0.10

(2020-03-05)

Fixed

  • Issue with uri rule for banners
  • Issue with most cheapest rule applies only if cheapes product is first in the cart.
  • Issue with combination most expensive rule + most expensive rule with condition "is discounted is no"

1.0.8

(2020-01-14)

Fixed

  • Issue with currencies in "Buy product X Get $ discount for product Y" rule

1.0.7

(2019-12-10)

Fixed

  • Issue with rule "Most expensive product"
  • Issue with rule "Most cheapest product"
  • Issue with condition "Is discounted is No" and rules "Most expensive product", "Most cheapest product"
  • Issue with banners and condition "Total qty in cart"

Improvement

  • New Rule 'Discount for All except Most Expensive product'

1.0.6

(2019-11-05)

Fixed

  • Issue with saving Active From/To for Banners

1.0.5

(2019-11-01)

Fixed

  • Issue with layout on Magento 2.2.x

1.0.4

(2019-04-22)

Improvements

  • New Rule "Buy product X Get $ discount for product Y"

0.0.3

(2019-02-28)

Fixed

  • Banner display position issue

0.0.2

(2019-02-27)

Fixed

  • Issue with coupon messages

0.0.1-beta4

(2019-02-21)

Improvements

  • Ability to change coupon message
  • Filter items by special price
  • Filter items by discounted rule

0.0.1-beta3

(2019-02-20)

Improvements

  • Banner system

0.0.1-beta2

(2019-02-19)

Improvements

  • Banner module

0.0.1-beta1

(2019-02-13)