Knowledgebase

Home » Item #669

Item count on mini-basket changed to count individual items

Item: #669
Date: 22 Oct 2003
Applies to
v5

Question

Currently the 'Number of Items' on the mini-basket counts up the number of different products. Is there a simple way to change this to the total number of items?

E.g. if I put 8 x Product-A and 8 x Product-B in the basket, 'Number of items' reads 2. I'd like this to read 16.

Answer

There isn't config setting to make this change, but it only requires a small change in the scripts. If you load up includes/buildpage.asp and go down to line 239, you should see this line:

numNewItemCount = numNewItemCount + 1

After this line, you need to insert a new line which reads:

numTotalItems = (numTotalItems * 1) + (numDisplayQuantity * 1)

Now, go down to line 339, where you should see:

strBasketHTML = Replace(strBasketHTML, "xxxBASKETCOUNTxxx", numItemCount * 1)

Now replace this line with the following:

strBasketHTML = Replace(strBasketHTML, "xxxBASKETCOUNTxxx", numTotalItems * 1)

Can't find the answer you need? Click here to open a support ticket.

« Back