ccrz.ccLogicCartAddTo.priceExternalItem

Sets an externally defined price for 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> priceExternalItem(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.

From ccrz.ccApiCart.CURR_LINE_DATA, this method evaluates the following subkeys:

ccrz.ccApiCart.LINE_DATA_EXT_NAME
String that specifies a value for the ccrz__ExtName__c field on the created ccrz__E_CartItem__c record.
ccrz.ccApiCart.LINE_DATA_EXT_SKU
String that specifies a value for the ccrz__ExtSKU__c field on the created ccrz__E_CartItem__c record.
ccrz.ccApiCart.LINE_DATA_SUBTOTAL
Decimal that specifies a unique subtotal price for the quantity of externally priced products.

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__ExtName__c ccrz.ccApiCart.CURR_LINE_DATA input key's ccrz.ccApiCart.LINE_DATA_EXT_NAME subkey
ccrz__ExtSKU__c ccrz.ccApiCart.CURR_LINE_DATA input key's ccrz.ccApiCart.LINE_DATA_EXT_SKU subkey
ccrz__Price__c ccrz.ccApiCart.CURR_LINE_DATA input key's ccrz.ccApiCart.LINE_DATA_PRICE subkey
ccrz__PricingType__c external
ccrz__Subtotal__c ccrz.ccApiCart.CURR_LINE_DATA input key's ccrz.ccApiCart.LINE_DATA_SUBTOTAL subkey