ccrz.ccLogicPICreate.fetchProducts
Begins the For loop within the ccrz.ccLogicPICreate.buildIndex method by returning product records for a specific
locale.
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> fetchProducts(Map<String, Object>)
Inputs (Required)
This method accepts the working Map<String, Object> from the ccrz.ccLogicPICreate.buildIndex method.
This method requires the following keys in the working map:
- ccrz.ccApiProductIndex.LOCALE
- String that specifies the current locale evaluated in the ccrz.ccLogicPICreate.buildIndex For loop.
- ccrz.ccApiProductIndex.PRODUCT_PRICING_DATA
-
Map<String, Map<String, Map<String,
Object>>> of pricing data for the price list items, where:
- The outer map is keyed by product ID
- The second-level map is keyed by currency ISO code
- The inner map describes the indexed price and its corresponding price list
Logic Performed
This method passes the following inputs to ccrz.ccApiProduct.fetch:
Logic Chain Input | ccrz.ccApiProduct.fetch Input |
---|---|
ccrz.ccApiProductIndex.PRODUCT_PRICING_DATA using the keySet method of the Apex Map class | ccrz.ccApiProduct.PRODUCTIDLIST |
ccrz.ccApiProductIndex.LOCALE | ccrz.ccApiProduct.PRODUCTLOCALE |
By default, this query applies the following data size request parameters:
ccrz.ccApi.SIZING => new Map<String, Object> {
ccrz.ccApiProduct.ENTITYNAME => new Map<String, Object> {
ccrz.ccApi.SZ_DATA => ccrz.ccApi.SZ_M,
ccrz.ccApi.SZ_ASSC => false,
ccrz.ccApi.SZ_REL => new List<String>{'Product_Categories__r', 'XLProduct_Item_I18Ns__r'}
}
Outputs
This method returns the working Map<String, Object>, and sets the following keys:
- ccrz.ccApiProduct.PRODUCTLIST
- List<Object> of ccrz__E_Product__c records that the ccrz.ccApiProduct.fetch method returned.