Add the #DF24 Developer Keynote to your agenda. Join us in-person on 9/18 at 2:30 p.m. PT or on Salesforce+ at 5 p.m. PT for the must-see session built just for developers.

CartExtension.OptionalCartItem

This object may provide information about a specific CartExtension.CartItem.

Set specified CartItem

TypeDescription
OptionalCartItemOptionalCartItem

Set empty CartItem

TypeDescription
OptionalCartItemOptionalCartItem

Get CartItem

TypeDescription
CartItemCartItem
ExceptionDescription
OptionalNotCheckedExceptionIf the isPresent() method was not called prior to calling this method

Checks if CartItem exists (not null)

TypeDescription
BooleanBoolean