Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

Increasing the maximum number of products in the cart array

The size of the cart array is set by the following code. As you can see, it limits the system to 100 separate items in the cart, each with up to 35 variables in ProductCart v3 and 45 in v4.

ProductCart v3

pcCartArray(100,35)

ProductCart v4

pcCartArray(100,45)

There are several variations on this array:

pcCartArray(100,45), pcCartArray1(100,45), pcCartArray2(100,45), pcCartArrayORG(100,45), pcProductList(100,5), ProList(100,5), sscProList(100,5) , PromoArr(100,5)

These arrays are found in the following files:

pc\addsavedprdstocart.asp
pc\atc_viewprd.asp
pc\CustLO.asp
pc\CustLOb.asp
pc\CustSavedCarts.asp
pc\ggg_addtoGR.asp
pc\gwReturn.asp
pc\inc_CalPromotions.asp
pc\instConfiguredPrd.asp (BTO Only)
pc\instPrdCharges.asp (BTO Only)
pc\opc_inc_viewitems.asp
pc\opc_OrderVerify.asp
pc\orderComplete.asp
pc\pcPay_GoogleCheckout_Calculations.asp
pc\pcPay_GoogleCheckout_Callback.asp
pc\pcPay_GoogleCheckout_Start.asp
pc\pcStartSession.asp
pc\SmallShoppingCart.asp
pc\SmallShoppingCartSmall.asp
pc\viewcart.asp

To allow a user to order more than 100 separate items at the same time (rare), you will need to replace the value 100 with a higher value (e.g. 150). To find the variations listed above, simply search each file for the string ”(100,” and make your change to the size of the array.

Please note that this can affect performance as it means that each shopping cart session will require a larger amount of server memory.

Related Articles:


QR Code
QR Code Increasing the maximum number of products in the cart array (generated for current page)