> For the complete documentation index, see [llms.txt](https://docs.antsomi.com/developers-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.antsomi.com/developers-guide/hybrid-apps/react-native/tracking-events/sample-e-commerce-events/view-the-shopping-cart.md).

# View the Shopping Cart

When a user accesses their shopping cart within your app, suggesting they are reviewing their selected items.

{% tabs %}
{% tab title="TypeScript" %}

```typescript
import AntsomiRnSDK from '@antsomicorp/antsomirnsdk';

const items: Record<string, any>[] = [];

// Replace the object cartData, and userData with your object
cartData.forEach((productDetail) => {
  items.add({
    type: "product",
    id: productDetail.sku,
    name: productDetail.name,
    sku: productDetail.sku,
    price: +productDetail?.salePrice,
    original_price: +productDetail?.price,
    quantity: +productDetail.quantity
  });
});

const event: CDPEvent = {
  en: "view_cart_product",
  items: items,
  customerProps: {
    customer_id: MD5Hash().generateMd5(userData.email ?? ''),
    name: userData.name
  },
  eventProps: {
    cart_subtotal: cartData.subtotal,
    cart_item_count: cartData.itemCount
  }
};

await AntsomiRnSDK.track(event);
```

{% endtab %}
{% endtabs %}
