https://github.com/magesuite/cart-bonus
This module creates bonuses visible in the cart The feature is actually a cart price rule which can be triggered under certain conditions. On the storefront the user will notice a progress bar that hints at a potential bonus when meeting a subtotal threshold.
Installation
This module is optional
composer require "creativestyle/magesuite-cms-search" ^1.0.0
User manual
Admin settings
To add a cart bonus a new sales rule should be created in Marketing -> Promotions -> Cart price rules
The rule must be set as No coupon
In the Cart bonuses
tab, a rule can be cart-bonus
It is also possible to hide the rule label in order to make it a surprise for a user.
Free shipping
rule is set as a cart bonus with a hidden label. The label is visible when a user passes the threshold.
Backend
Frontend
Each bonus is displayed as a section of a bar. After cart page is loaded the progress bar is animated.
phtml template
The phtml template is placed in theme-creativeshop/src/MageSuite_CartBonus/templates/status.phtml
It is possible to pass some configuration from the layout - theme-creativeshop/src/MageSuite_CartBonus/layout/default.xml
<referenceBlock name="bonus.gift.status"> <arguments> <argument name="additional_css_classes" xsi:type="string"></argument> <argument name="headline" xsi:type="string" translate="true">Acquire your gift now!</argument> </arguments> </referenceBlock>
Also, paths or configurations for the following icons can be adjusted:
bonus.gift.icon.headline
bonus.gift.icon.gift
bonus.gift.icon.status
Styling
The styling for this component is provided by default in theme-cerativeshop. Styles are placed in components/cart/cart-bonus
file.