Appearance
How does it work
The Store Price Rule module integrates seamlessly with the existing Store module by utilizing and extending its native discount system. The module processes rules in real-time and automatically applies the appropriate discounts based on your configured conditions.
Cart Rules Integration
For cart-level rules (cart percentage, cart fixed, and free shipping), the module leverages the Store module's existing discount infrastructure:
- Cart Discounts: Uses the native
discountfield that's already built into the Store module - Free Shipping: Utilizes the Store module's native free shipping system via
cart:has_free_shippingfor carts andorder:has_free_shippingfor completed orders
This means all cart-level discounts appear naturally in your existing Store module templates without requiring any template changes.
Product Rules Integration
For product-level rules (product percentage and product fixed), the module extends the product pricing system:
- old_price: Contains the original product price before any discounts are applied
- price: Contains the final discounted price after rule calculations
This dual-price system allows you to display both the original and discounted prices, perfect for showing "was/now" pricing or strike-through effects in your product displays.
Buy X Get Y Free Integration
For Buy X Get Y Free rules, the module adds items directly to the cart with a special tag indicating they were added through this promotion. This allows for easy identification and management of these items within the cart.
You can identify these items using the cart:items:added_by_buy_x_get_y_free variable in your cart templates, enabling you to customize the display or behavior of these promotional items as needed.
Rule Processing
The module automatically evaluates all active rules during cart operations and checkout, ensuring that the most beneficial combination of discounts is applied to your customers while respecting your configured conditions and limits.
