mojo3120
02-15-2006, 11:08 AM
I'm working on a new asp shopping cart for my company. Some of the items we sell have a core charge...for example
http://www.mojo3120.com/store/comersus_viewItem.asp?idProduct=291
I wanted the core charge to be a seperate item added to the cart when you add the original item. I figured out a way to do by adding a field to the products table and using the following code. Now the problem is that someone could add the product to the cart, then remove the core charge and check out. Anyone have any ideas on how I could tie the 2 products together (the original item and the core charge) so if one is removed both are?
Thanks
-Andrew
' insert new row line, is not in the cart
'Core Charge chenges -Andrew
if not pCore="" then
mySQL="INSERT INTO cartRows (idProduct, quantity, unitPrice, unitCost, unitWeight, idDbSessionCart, personalizationDesc) VALUES (293,1," &pCore& ",0,0," &pIdDbSessionCart& ",'" &pPersonalizationDesc& "')"
call updateDatabase(mySQL, rstemp, "addItem")
end if
'End Core Charge changes
mySQL="INSERT INTO cartRows (idProduct, quantity, unitPrice, unitCost, unitWeight, idDbSessionCart, personalizationDesc) VALUES (" &pIdProduct& "," &pQuantity& "," &pUnitPrice& "," &pUnitCost& "," &pUnitWeight& "," &pIdDbSessionCart& ",'" &pPersonalizationDesc& "')"
call updateDatabase(mySQL, rstemp, "addItem")
http://www.mojo3120.com/store/comersus_viewItem.asp?idProduct=291
I wanted the core charge to be a seperate item added to the cart when you add the original item. I figured out a way to do by adding a field to the products table and using the following code. Now the problem is that someone could add the product to the cart, then remove the core charge and check out. Anyone have any ideas on how I could tie the 2 products together (the original item and the core charge) so if one is removed both are?
Thanks
-Andrew
' insert new row line, is not in the cart
'Core Charge chenges -Andrew
if not pCore="" then
mySQL="INSERT INTO cartRows (idProduct, quantity, unitPrice, unitCost, unitWeight, idDbSessionCart, personalizationDesc) VALUES (293,1," &pCore& ",0,0," &pIdDbSessionCart& ",'" &pPersonalizationDesc& "')"
call updateDatabase(mySQL, rstemp, "addItem")
end if
'End Core Charge changes
mySQL="INSERT INTO cartRows (idProduct, quantity, unitPrice, unitCost, unitWeight, idDbSessionCart, personalizationDesc) VALUES (" &pIdProduct& "," &pQuantity& "," &pUnitPrice& "," &pUnitCost& "," &pUnitWeight& "," &pIdDbSessionCart& ",'" &pPersonalizationDesc& "')"
call updateDatabase(mySQL, rstemp, "addItem")