Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: same shopping cart product saved into more than 1 rows

  1. #1
    duke is offline Junior Member
    Join Date
    Nov 2009
    Posts
    28

    Question same shopping cart product saved into more than 1 rows

    Hi all,

    I'm new in this bussiness :-)

    I'm taking over an ASPDNSF project. can any1 tell me, is that possible when we add product to shopping cart then the products will be saved into more than 1 rows?

    I run this query
    [SQL]
    select c.customerid, c.email, p.productid, p.Name, s.Quantity
    from shoppingcart s, customer c, product p
    where s.productid = p.productid
    and c.customerid = s.customerid
    order by c.customerid, p.productid
    [/SQL]

    the result:
    Customer ID Email Product ID Product Name Qty
    58639 aabbcc@somewhere.com 85 Chocolate 1
    58639 aabbcc@somewhere.com 85 Chocolate 1
    58639 aabbcc@somewhere.com 85 Chocolate 1
    58669 eeffgg@somewhere.com 35 Pine 1
    58669 eeffgg@somewhere.com 65 Apple 1

    FYI, Chocolate is product pack.

    how is this happen?

    does the same product only save into 1 rows?
    Last edited by duke; 12-10-2009 at 07:12 PM.

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    No. A record exists in the shoppingcart table once per customer per unique product. In your case - packs - it's assumed that no two packs will ever be the same (since they can contain multiples of countless other products) so each pack added to the cart, even if they are the same pack, get their own shopping cart record. The contents of that pack then exist in the CustomCart table. Also, if you have any kit products, you'll find the contents in the KitCart table.
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>