VbzCart/docs/tables/shop cart data: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (7/24 changes (updated SQL to match new name; changed field name & comment)) |
m (Woozle moved page VbzCart/VbzCart/tables/shop cart data to VbzCart/docs/tables/shop cart data without leaving a redirect: part 4/5) |
||
(7 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''OBSOLETE''' | |||
* '''Purpose''': This is a simple table for retaining customer data entered at check-out time before converting the cart to an order. | * '''Purpose''': This is a simple table for retaining customer data entered at check-out time before converting the cart to an order. | ||
* '''Relates to''': parent: {{l/same|shop_cart}} | |||
* '''History''': | * '''History''': | ||
** '''2009-07-24''' renamed: shop_cust_data -> shop_cart_data; changed ID_Key -> Type | ** '''2009-07-24''' renamed: shop_cust_data -> shop_cart_data; changed ID_Key -> Type | ||
** '''2009-08-02''' removed "ID" field; now using ID_Cart+Type as primary key | |||
** '''2014-11-04''' renamed "Type" field to "ID_Type" | |||
** '''2015-01-20''' added '''WhenCrypt''' field | |||
** '''2019-07-25''' this table has been obsolete/unused for months (in dev code) | |||
==Fields== | |||
* '''ID_Type''': numeric constants are currently defined in {{l/vbzcart/code|vbz-const-ckout.php}}. | |||
* '''WhenCrypt''': this is primarily a signal that '''Val''' has been encrypted. If it is NULL, then '''Val''' is plaintext. This is so we can encrypt sensitive data left in shopping carts. | |||
==SQL== | ==SQL== | ||
< | <source lang=mysql>DROP TABLE IF EXISTS `shop_cart_data`; | ||
CREATE TABLE `shop_cart_data` ( | CREATE TABLE `shop_cart_data` ( | ||
`ID_Cart` INT NOT NULL COMMENT "shop_cart.ID", | |||
`ID_Cart` INT NOT NULL COMMENT " | `ID_Type` INT NOT NULL COMMENT "data type - defined in code", | ||
` | |||
`Val` VARCHAR(255) NOT NULL COMMENT "Value of data item", | `Val` VARCHAR(255) NOT NULL COMMENT "Value of data item", | ||
PRIMARY KEY(` | `WhenCrypt` DATETIME DEFAULT NULL "when encrypted (NULL = is plaintext)", | ||
) ENGINE = MYISAM;</ | PRIMARY KEY(`ID_Cart`,`Type`) | ||
) ENGINE = MYISAM;</source> |
Latest revision as of 01:57, 25 February 2024
About
- OBSOLETE
- Purpose: This is a simple table for retaining customer data entered at check-out time before converting the cart to an order.
- Relates to: parent: shop_cart
- History:
- 2009-07-24 renamed: shop_cust_data -> shop_cart_data; changed ID_Key -> Type
- 2009-08-02 removed "ID" field; now using ID_Cart+Type as primary key
- 2014-11-04 renamed "Type" field to "ID_Type"
- 2015-01-20 added WhenCrypt field
- 2019-07-25 this table has been obsolete/unused for months (in dev code)
Fields
- ID_Type: numeric constants are currently defined in Template:L/vbzcart/code.
- WhenCrypt: this is primarily a signal that Val has been encrypted. If it is NULL, then Val is plaintext. This is so we can encrypt sensitive data left in shopping carts.
SQL
DROP TABLE IF EXISTS `shop_cart_data`;
CREATE TABLE `shop_cart_data` (
`ID_Cart` INT NOT NULL COMMENT "shop_cart.ID",
`ID_Type` INT NOT NULL COMMENT "data type - defined in code",
`Val` VARCHAR(255) NOT NULL COMMENT "Value of data item",
`WhenCrypt` DATETIME DEFAULT NULL "when encrypted (NULL = is plaintext)",
PRIMARY KEY(`ID_Cart`,`Type`)
) ENGINE = MYISAM;