Promotional flag displayed on products outside of the price range
Marketing & Merchandising
•
ID:
Backlog
Published on4/10/2018
•
Last updated on12/22/2022
1 min read
Summary
The viewports $product.DiscountHightLight and <vtex.cmc:discountHightLight/> are based on the teasers provided by checkout as a rule for displaying promotional flags. However, the checkout does not filter "ItemMinPrice" rules if other rules are configured.
As a consequence, promotions that are based on ranges of values for items and have other restrictions, such as payment methods, appear as a promotional flag for other products, even if they are outside the price range for the promotion.
Simulation
- From the Admin, choose Rates and Benefits > Benefits.
- In the upper right corner, click the New Benefit button > Regular.
- Choose any type of discount.
- Under Product Highlight, choose Highlight.
- Apply some restriction, for example: by price range of the item.
- Restrict it by some payment method, such as Bank Slip.
- Activate and save the promotion.
Workaround
Use the checkout API (orderForm Simulation) to fetch information from available teasers for the product, and then render the promotional flag with the desired business rule in a custom way.