---
title: How Shopping Cart Content is Stored [Migration Draft]
description: How Shopping Cart Content is Stored [Migration Draft]
---

[Skip to content](https://productcart-kb.nsource.com/kb/how-shopping-cart-content-is-stored#main-content)

<https://productcart-kb.nsource.com/kb/kb-tickets/new?hsLang=en>

[![pc\_logo](https://productcart-kb.nsource.com/hs-fs/hubfs/pc_logo.png?width=162&height=75&name=pc_logo.png)](https://productcart.com/)

Open main navigation

Close main navigation

- <https://productcart-kb.nsource.com/kb/kb-tickets/new>
- [Contact Support](mailto:help@productcart.com)

[Contact Support](mailto:help@productcart.com)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [ProductCart Help Center](https://productcart-kb.nsource.com/kb?hsLang=en)
2. [Default](https://productcart-kb.nsource.com/kb/default?hsLang=en)

March 5, 2024

# How Shopping Cart Content is Stored \[Migration Draft\]

## Overview

When products are added to the shopping cart, ProductCart holds the information into an array called **pcCartArray**. The array is first created when a [ProductCart session is started](https://productcart.desk.com/customer/portal/articles/1600490-starting-a-productcart-session), using the syntax:

```

dim pcCartArray(100,45)
```

The array holds up to 100 different products and 45 variables for each product (35 variables in v3). This means that ProductCart has a structural limitation to allowing for 100 different products added to the shopping cart at any given time. The limitation is meant to limit the amount of server resources reserved for the task. This is typically never a problem as customers don't normally add 100 different items to the shopping cart.

However, if you need to allow your customers to add more than 100 different individual products, you can do so by performing a global “find & replace” on the strings *dim pcCartArray(100,45)* and *redim pcCartArray(100,45)* replacing the number “100” with a higher one (change 45 with 35 for v3).   
 

## Looping through the shopping cart array

To keep track of the number of products (indexes) there exist in the cart array, we store a value that in the following session variable: **session(“pcCartIndex”)**

Each time a customer adds a new product to the shopping cart, the product and all of its attributes such as units purchased, product options, price, discounts, etc. are added to the cart array (you can find a list of properties and corresponding location in the array below). As the product is added to the cart, the “cart index” is incremented by 1 unit.

So if a customer added two products to the cart, the following would be true:

```

session("pcCartIndex") = 2
```

The index count (product count) is kept in a session variable so that ProductCart knows how many indexes exist in the shopping cart array. This makes it easy to loop through and use the contents of the array. For example, you could easily loop through and extract the Product ID and Product Name, as shown below:   
 

```

 ppcCartIndex =session(“pcCartIndex”)
 for f=1 to ppcCartIndex					
  response.write "Product ID: " & pcCartArray(f,0)
  response.write "Product Name: " & pcCartArray(f,1)
 Next
```

  

## List of cart array assignments

If you are customizing ProductCart, you may need to store additional product variables in the cart array and/or retrieve existing variables. The following table provides details on what each element of the array stores.   
 

- [Managing Your Products](https://productcart-kb.nsource.com/kb/managing-your-products?hsLang=en)
- [Managing Orders](https://productcart-kb.nsource.com/kb/managing-orders?hsLang=en)
- [Managing Customers](https://productcart-kb.nsource.com/kb/managing-customers?hsLang=en)
- [Getting Started](https://productcart-kb.nsource.com/kb/getting-started?hsLang=en)
- [Apparel Add-On](https://productcart-kb.nsource.com/kb/apparel-add-on?hsLang=en)
- [Upgrading ProductCart](https://productcart-kb.nsource.com/kb/upgrading-productcart?hsLang=en)
- [Change Logs](https://productcart-kb.nsource.com/kb/change-logs?hsLang=en)
- [Store Settings](https://productcart-kb.nsource.com/kb/store-settings?hsLang=en)
- [Security](https://productcart-kb.nsource.com/kb/security?hsLang=en)
- [Shipping Options](https://productcart-kb.nsource.com/kb/shipping-options?hsLang=en)
- [Payment Options](https://productcart-kb.nsource.com/kb/payment-options?hsLang=en)
- [Tax Options](https://productcart-kb.nsource.com/kb/tax-options?hsLang=en)
- [Advanced Technical Articles](https://productcart-kb.nsource.com/kb/advanced-technical-articles?hsLang=en)
- [Pages](https://productcart-kb.nsource.com/kb/pages?hsLang=en)
- [What's New In ProductCart](https://productcart-kb.nsource.com/kb/whats-new-in-productcart?hsLang=en)
- [Marketing](https://productcart-kb.nsource.com/kb/marketing?hsLang=en)
- [How To's](https://productcart-kb.nsource.com/kb/how-tos?hsLang=en)
- [Google Analytics](https://productcart-kb.nsource.com/kb/google-analytics?hsLang=en)
- [QuickBooks Sync](https://productcart-kb.nsource.com/kb/quickbooks-sync?hsLang=en)
- [Default](https://productcart-kb.nsource.com/kb/default?hsLang=en)
- [Configurator](https://productcart-kb.nsource.com/kb/configurator?hsLang=en)
- [SEO](https://productcart-kb.nsource.com/kb/seo?hsLang=en)
- [Mobile Commerce](https://productcart-kb.nsource.com/kb/mobile-commerce?hsLang=en)
- [Troubleshooting](https://productcart-kb.nsource.com/kb/troubleshooting?hsLang=en)
- [Customizing Your ProductCart Store](https://productcart-kb.nsource.com/kb/customizing-your-productcart-store?hsLang=en)
- [ProductCart Apps](https://productcart-kb.nsource.com/kb/productcart-apps?hsLang=en)
- [Hidden Topic](https://productcart-kb.nsource.com/kb/hidden-topic?hsLang=en)
- [Reports and Exports](https://productcart-kb.nsource.com/kb/reports-and-exports?hsLang=en)

[![ProductCart Logo](https://productcart-kb.nsource.com/hs-fs/hubfs/pc_logo.png?width=200&height=93&name=pc_logo.png "ProductCart Logo")](https://netsourceinc.com)

NetSource Commerce, Inc. **|** Headquarters - 3700 South Pine Avenue, Ocala, FL 34471 **|** Tel [(800) 709-3240](tel:+8007093240) **|** Fax (352) 401-0353

<https://www.facebook.com/productcartsoftware> <https://x.com/productcart?s=20> <https://www.linkedin.com/company/productcart/> [mailto:help@productcart.com](mailto:help@productcart.com)

Copyright © 2026, NetSource