Difference between revisions of "VbzCart/tables/shop cart"
Jump to navigation
Jump to search
m (VbzCart/tables/shop carts moved to VbzCart/tables/shop cart: using singular names for tables) |
(changing to singular) |
||
| Line 4: | Line 4: | ||
** '''ID_Cust''' is for future use when customers can log in to retrieve their personal data | ** '''ID_Cust''' is for future use when customers can log in to retrieve their personal data | ||
** '''ID_Session''' is for future use when sessions are tracked | ** '''ID_Session''' is for future use when sessions are tracked | ||
| + | * '''History''': | ||
| + | ** '''2009-06-16''' Changing names to singular (tables not in use yet, so this is the time to do it) | ||
==SQL== | ==SQL== | ||
| − | <section begin=sql /><mysql>DROP TABLE IF EXISTS ` | + | <section begin=sql /><mysql>DROP TABLE IF EXISTS `shop_cart`; |
| − | CREATE TABLE ` | + | CREATE TABLE `shop_cart` ( |
`ID` INT NOT NULL AUTO_INCREMENT, | `ID` INT NOT NULL AUTO_INCREMENT, | ||
| − | `ID_Session` INT DEFAULT NULL COMMENT " | + | `ID_Session` INT DEFAULT NULL COMMENT "shop_session.ID, when implemented -- session in which cart was created", |
`WhenCreated` DATETIME NOT NULL COMMENT "when the cart was first created", | `WhenCreated` DATETIME NOT NULL COMMENT "when the cart was first created", | ||
`WhenViewed` DATETIME DEFAULT NULL COMMENT "when the cart's contents were last displayed by the customer", | `WhenViewed` DATETIME DEFAULT NULL COMMENT "when the cart's contents were last displayed by the customer", | ||
Revision as of 23:48, 16 June 2009
About
- Purpose: Shopping cart data is kept separate from order data because we end up with a lot of carts that never become orders; eventually they get cleaned out. Order data may eventually get cleaned out too, but with different criteria; for now, we are keeping order data indefinitely.
- Fields:
- ID_Cust is for future use when customers can log in to retrieve their personal data
- ID_Session is for future use when sessions are tracked
- History:
- 2009-06-16 Changing names to singular (tables not in use yet, so this is the time to do it)
SQL
<mysql>DROP TABLE IF EXISTS `shop_cart`; CREATE TABLE `shop_cart` (
`ID` INT NOT NULL AUTO_INCREMENT, `ID_Session` INT DEFAULT NULL COMMENT "shop_session.ID, when implemented -- session in which cart was created", `WhenCreated` DATETIME NOT NULL COMMENT "when the cart was first created", `WhenViewed` DATETIME DEFAULT NULL COMMENT "when the cart's contents were last displayed by the customer", `WhenUpdated` DATETIME DEFAULT NULL COMMENT "when the cart's contents were last changed", `WhenOrdered` DATETIME DEFAULT NULL COMMENT "when the cart's contents were transferred to an order", `ID_Order` INT DEFAULT NULL COMMENT "core_orders.ID of order into which cart was transferred", `ID_Cust` INT DEFAULT NULL COMMENT "core_custs.ID of customer for this order", PRIMARY KEY(`ID`) ) ENGINE = MYISAM;</mysql>