/
Product Details (RN SDK)

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
    });

Related content

User Activity Tracking (JS SDK)
User Activity Tracking (JS SDK)
More like this
User Profile (JS SDK)
User Profile (JS SDK)
More like this
User Profile (Android SDK - Java)
User Profile (Android SDK - Java)
More like this
Product Recommendations (RN SDK)
Product Recommendations (RN SDK)
More like this
Product Details (JS SDK)
Product Details (JS SDK)
More like this
User Profile (RN SDK)
User Profile (RN SDK)
More like this

Copyright 2018-2024 PersonaClick