ccrz.ccLogicCartPrice.evaluateComplexProducts
Evaluates cart items that are included in complex products and sets the status of each
cart item. A complex product can be a bundle, kit, dynamic kit, assembly product,
or attribute-based product.
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
B2B Commerce for Visualforce Spring ’20 | 4.12 | 11 |
B2B Commerce for Visualforce Summer ’19 | 4.11 | 10 |
B2B Commerce for Visualforce Spring ’19 | 4.10 | 9 |
B2B Commerce for Visualforce Summer ’18 | 4.9 | 8 |
Signature
global virtual Map<String, Object> evaluateComplexProducts(Map<String, Object>)
Inputs (Required)
This method accepts a Map<String, Object> from the ccrz.ccLogicCartPrice.applyPricing method. The map can include the following keys:
- 'cartItems'
- Map<String, ccrz__E_CartItem__c> of cart items that have parent cart items, or cart items that are part of attribute-based products (where ccrz__PricingType__c is ATTRGROUP).
- 'completeInputData'
- Map<String, Object> of the working map passed from ccrz.ccLogicCartPrice.applyPricing.
- 'complexCartItems'
- Map<String, List<ccrz__E_CartItem__c>>, keyed by parent cart item ID, that describes major cart line items and its associated minor cart line items.
Outputs
This method returns the input Map<String, Object> and sets the value of the ccrz__E_CartItem__c record's ccrz__ItemStatus__c field to Invalid for any of the following conditions:
- The cart item is a major line item for a complex product (other than an assembly product) but it doesn't have any child cart items.
- The cart item's ccrz__PricingType__c is ATTRGROUP and contains child cart items where the ccrz__ItemStatus__c is already set to Invalid. This method also sets the major line item to Invalid.
- The cart item is a major line item for a kit or dynamic kit and contains child cart items where the ccrz__ItemStatus__c is already set to Invalid. This method also sets the major line item to Invalid.
When the cart item is invalid, this method also sets the following fields:
ccrz__E_CartItem__c Field | Value |
---|---|
ccrz__OriginalItemPrice__c | The same value as ccrz__Price__c. |
ccrz__Price__c | -1 |
ccrz__RecurringPrice__c | null |
ccrz__RecurringPriceSubAmt__c | null |
ccrz__SubAmount__c | null |
For a kit or dynamic kit, this method also evaluates any subscription terms applied to the major line item, and sets the following fields:
ccrz__E_CartItem__c Record | Field | Value |
---|---|---|
Major line item (composite product for a kit or dynamic kit) | ccrz__RecurringPrice__c | Calculated from the child cart item's ccrz__RecurringPrice__c |
ccrz__RecurringPriceSubAmt__c | Recurring price multiplied by quantity. | |
Child line item (component product for a kit or dynamic kit) | ccrz__RecurringPrice__c | null |
ccrz__RecurringPriceSubAmt__c | null |