projects/congarevenuecloud/ecommerce/src/lib/modules/constraint-rules/services/applied-rule-action-info.service.ts
This service is work in progress. Constraint rules are a powerful feature when configuring products. They allow you to include, excludes, recommend, validate and replace products based on business logic.
AObjectService
Properties |
Methods |
| deleteRulesForCart | ||||||
| This method is deprecated. | ||||||
deleteRulesForCart(cart?: Cart)
|
||||||
|
Deletes constraint rules for the given cart.
Parameters :
Returns :
Observable<any>
|
| fetchRulesFromPrimaryCart |
fetchRulesFromPrimaryCart()
|
|
Fetches the applied rule actions from the primary cart after ensuring the cart is valid. Example:
Returns :
Observable<Array<AppliedRuleActionInfo>>
An observable array of |
| fetchRulesFromSecondaryCart |
fetchRulesFromSecondaryCart()
|
|
Returns :
Observable<Array<AppliedRuleActionInfo>>
|
| getAppliedActionsForCart | ||||||||
getAppliedActionsForCart(cart?: Cart)
|
||||||||
|
Method retrieves the actions that are applied to a cart when the constraint rules are applied
Parameters :
Returns :
Observable<Array<AppliedRuleActionInfo>>
An observable array of 'AppliedRuleActionInfo' |
| getExclusionProductActionsForCart |
getExclusionProductActionsForCart()
|
|
This method can be used to fetch the list of Applied rule action info records for active cart. It returns AppliedRuleActionInfo record having constraint rule action, actionType as Exclusion. Example:
Returns :
Observable<Array<AppliedRuleActionInfo>>
Observable<Array |
| getPendingActionsForCart |
getPendingActionsForCart()
|
|
This method can be used to fetch the list of Applied rule action info records for active cart. It returns applied rule action info records have pending flag as true. Example:
Returns :
Observable<Array<AppliedRuleActionInfo>>
Observable<Array |
| onInit |
onInit()
|
|
Returns :
void
|
| appliedRuleActionSubject |
Type : BehaviorSubject<Array<AppliedRuleActionInfo>>
|
Default value : new BehaviorSubject<Array<AppliedRuleActionInfo>>([])
|
| type |
Default value : AppliedRuleActionInfo
|