Product Details (RN SDK)

Get User's Current Cart

Method Objective

The method allows getting the current profile's cart.

Syntax and parameters

pcsdk.cart().then(success).catch(error)

NameTypeRequirementDescription
successfunctionrequiredA callback function, to which the API response will be passed. Response type: object.
errorfunctionoptionallyA callback function that will be called when an error occurs (any HTTP status code other than 200).

API response

Name

Type

Description

statusstring

Contains "success" if the request is successful.

dataobject

Contains the "items" object array, where each object contains the following properties:

  • uniqid - product ID
  • quantity - product quantity

Example of use

pcsdk.cart()
    .then((response) => {
        // success
    })
    .catch((error) => {
        // error
    });

Copyright 2018-2024 PersonaClick