ccrz.ccLogicCartAddTo.applyTieredPricing
Applies a tier-based pricing adjustment, if applicable, to a major cart
item.
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> applyTieredPricing(Map<String, Object>)
Inputs (Required)
This method accepts the working Map<String, Object> from the ccrz.ccLogicCartAddTo.handlePricing method.
This method requires the following keys in the working map:
- ccrz.ccApiCart.CURR_CARTITEM
- ccrz__E_CartItem__c that corresponds to the item currently being evaluated within the loop.
- ccrz.ccApiCart.CURR_LINE_DATA
- Map<String, Object> that describes the line data for only the line currently being evaluated within the loop.
- ccrz.ccApiCart.CURR_PRODUCT
- Map<String, Object> that describes the ccrz__E_Product__c that corresponds to the item currently being evaluated within the loop.
- ccrz.ccApiCart.PRODUCTS_PRICING_DATA
- Map<String, Object> of product pricing data, keyed by product ID. The non-overridable ccrz.ccLogicCartAddTo.fetchProducts method added this key to the working map.
Outputs
This method returns the working Map<String, Object>, and sets the following fields on the ccrz__E_CartItem__c record:
ccrz__E_CartItem__c Field | Source for Value |
---|---|
ccrz__Price__c | The price evaluated from the product's pricing tiers, based on the quantity of the item in the cart. |