Difference between revisions of "VbzCart/tables/shop cart line"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (VbzCart/tables/shop cart lines moved to VbzCart/tables/shop cart line: changing table names to singular)
(changing table names to singular)
Line 1: Line 1:
 
==About==
 
==About==
* '''Purpose''': individual items in a shopping cart; child table of {{vbzcart|table|shop_carts}}
+
* '''Purpose''': individual items in a shopping cart
 +
* '''Parent''': {{vbzcart|table|shop_cart}}
 +
* '''History''':
 +
** '''2009-06-16''' Changing table name to singular
 
==SQL==
 
==SQL==
<section begin=sql /><mysql>DROP TABLE IF EXISTS `shop_cart_lines`;
+
<section begin=sql /><mysql>DROP TABLE IF EXISTS `shop_cart_line`;
CREATE TABLE `shop_cart_lines` (
+
CREATE TABLE `shop_cart_line` (
 
   `ID`        INT NOT NULL AUTO_INCREMENT,
 
   `ID`        INT NOT NULL AUTO_INCREMENT,
   `ID_Cart`    INT NOT NULL COMMENT "shop_carts.ID",
+
   `ID_Cart`    INT NOT NULL COMMENT "shop_cart.ID",
 
   `ID_Item`    INT NOT NULL COMMENT "cat_items.ID",
 
   `ID_Item`    INT NOT NULL COMMENT "cat_items.ID",
 
   `Qty`        INT NOT NULL COMMENT "quantity ordered; 0 = removed from order",
 
   `Qty`        INT NOT NULL COMMENT "quantity ordered; 0 = removed from order",

Revision as of 23:54, 16 June 2009

About

  • Purpose: individual items in a shopping cart
  • Parent: shop_cart
  • History:
    • 2009-06-16 Changing table name to singular

SQL

<mysql>DROP TABLE IF EXISTS `shop_cart_line`; CREATE TABLE `shop_cart_line` (

 `ID`         INT NOT NULL AUTO_INCREMENT,
 `ID_Cart`    INT NOT NULL COMMENT "shop_cart.ID",
 `ID_Item`    INT NOT NULL COMMENT "cat_items.ID",
 `Qty`        INT NOT NULL COMMENT "quantity ordered; 0 = removed from order",
 `WhenAdded`  DATETIME NOT NULL COMMENT "when this item was first added to the order",
 `WhenEdited` DATETIME NOT NULL COMMENT "when the quantity for this item was last changed",
 `PriceItem`  DECIMAL(9,2) NOT NULL COMMENT "price of item quoted at order time",
 `PriceShItm` DECIMAL(9,2) NOT NULL COMMENT "per-item shipping quoted for this item at order time",
 `PriceShPkg` DECIMAL(9,2) NOT NULL COMMENT "per-package shipping quoted for this item at order time",

/* These fields are redundant, and are used mainly to speed up cart display. They also preserve a record of

 how the item was presented to the customer. */
 `CatNum`    VARCHAR(63) COMMENT "cat_items.CatNum of item as sold",
 `ID_Title`  INT NOT NULL COMMENT "cat_titles.ID",
 `DescText`  VARCHAR(255) NOT NULL COMMENT "plain-text description of item being ordered (e.g. for emails)",
 `DescHtml`  VARCHAR(255) NOT NULL COMMENT "HTML description of item being ordered, for web-page display",
 PRIMARY KEY(`ID`)
) ENGINE = MYISAM;</mysql>