VbzCart/tables/cat ship cost

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


  • Purpose: This table defines the numbers used to calculate shipping costs for different types of items. Eventually it should have fields for tracking weight and co-packaging compatibility so we might have the option of just feeding the estimated shipping weight to shipper APIs and getting back an actual shipping estimate -- but for now, it's based on:
    • $ per package: roughly, the cost of shipping the smallest package which can hold this item, without the actual item. Or, more practically: The cost difference between shipping two of the item and shipping one of the item, subtracted from the cost of shipping one of the item.
    • $ per item: roughly, the cost which the actual item adds to the package. (The rise of shipping cost as weight goes up is approximately linear, but only very approximately.)
  • Fields:
    • CartMsg is a message which should appear near (or in) the shopping cart whenever an item with the corresponding shipping code is ordered. There was also an isApprox field, but the message seems adequate to serve this function. (The flag never did anything beyond displaying a message.)
  • History:
    • 2009-07-15 renamed to singular


<mysql>CREATE TABLE `cat_ship_cost` (

 `Descr`   VARCHAR(63) NOT NULL COMMENT "brief description, for internal use",
 `PerItem` DECIMAL(9,2) COMMENT "s/h cost differential per item",
 `PerPkg`  DECIMAL(9,2) COMMENT "s/h cost for packaging this item",
 `Sort`    FLOAT DEFAULT NULL COMMENT "optional sorting, for internal use",
 `CartMsg` VARCHAR(255) DEFAULT NULL COMMENT "messages regarding shipping for items using this code",