Table products
From Zen Cart(tm) Wiki
Database Version
- 1.3.5
Description
- Contains all the information about a given product that can't reasonably be translated into multiple languages. All of the contained information is consistent across all installed languages.
Table Details
Primary Key
Indexed Fields
- products_date_added
- products_status
- products_date_available
- products_ordered
- products_model
- products_price_sorter
- master_categories_id
- products_sort_order
- manufacturers_id
Columns
products_id
- A unique, auto incremented value, to identify each product.
Type: int(11) Null: No Default: Extra: auto_increment
products_type
- The product type used for this product.
- The following product types are included by default:
- 1: Product - General
- 2: Product - Music
- 3: Document - General
- 4: Document - Product
- 5: Product - Free Shipping
Type: int(11) Null: No Default: 1
products_quantity
- The quantity of a given product that you currently have in stock.
Type: float Null: No Default: 0
products_model
- An identifier for the product. Will be shown in the Admin as well as the Catalog (assuming you have it turned on).
Type: varchar(32) Null: Yes Default: NULL
products_image
- The path to the default small image file for the product.
Type: varchar(64) Null: Yes Default: NULL
products_price
- The base price, without any taxes included, in the default currency, of the product.
Type: decimal(15,4) Null: No Default: 0.0000
products_virtual
- Is this product virtual? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
products_date_added
- The date and time this product was first added.
Type: datetime Null: No Default: 0001-01-01 00:00:00
products_last_modified
- The date and time this product was last modified.
Type: datetime Null: Yes Default: NULL
products_date_available
- The first date that this product will become available for purchase.
Type: datetime Null: Yes Default: NULL
Simply changing this will probably not have the desired effect. The product will still appear as normal except that a note with this date will be shown on the product's listing page. If you want to disable this product, you need to change products_status to 0, or, if you want to display the product as out of stock you need to set products_quantity to 0.
products_weight
- The weight of the product in the default units for the store.
Type: float Null: No Default: 0
products_status
- The status of the product. Can be set to 0 (disabled) or 1 (enabled).
Type: tinyint(1) Null: No Default: 0
products_tax_class_id
- The tax class this product falls under. The default installation includes Taxable Goods (1). If set to 0, as it is by default, no tax class will be used.
Type: int(11) Null: No Default: 0
This value is pulled from the tax_class_id column in the tax_class table.
manufacturers_id
- Cross-reference link to the manufacturers table.
Type: int(11) Null: Yes Default: NULL
products_ordered
- The number of units of this product that have been ordered from your shop.
Type: float Null: No Default: 0
You can reset all of the products ordered to 0 through Admin > Tools > Store Manager > Reset ALL Products Ordered
products_quantity_order_min
- The minimum number of units of this product that can be ordered on one order.
Type: float Null: No Default: 1
This number must be divisible by products_quantity_order_units. For example, if this is 6, then products_quantity_order_units must be either 1, 2, 3 or 6
products_quantity_order_units
- Number of units of this product the customer needs to add to cart if they want this product. The customer can only order an amount that can be divided by this number. If this is set to 6, customers can only order 6, 12, 18, 24 etc. units of this product.
Type: float Null: No Default: 1
products_priced_by_attribute
- Used to indicate whether it's the products attributes that determine the final price of the product or not. Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
product_is_free
- Is the product free of charge to the customer? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
product_is_call
- The customer needs to contact you to get a final price on the product. Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
products_quantity_mixed
- Can the same product with different attributes be combined to meet the minimum order for that product? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
product_is_always_free_shipping
- Does the product always qualify for free shipping (the Free Shipping module must be enabled first)? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
If all items in the shopping cart are Always Free Shipping products you must have the Free Shipping module turned on in order for the customer to be able to checkout.
products_qty_box_status
- Show the quantity box for the product to allow the customer to add more than one of a given product to their shopping cart from the Product Information page? Can be set to 0 (disabled) or 1 (enabled).
Type: tinyint(1) Null: No Default: 1
products_quantity_order_max
- The maximum quantity of a give product that can be ordered on one order. 0 = no limit.
Type: float Null: No Default: 0
products_sort_order
- The sort order of this product. 0 = top.
Type: int(11) Null: No Default: 0
products_discount_type
- What type of discount does the product have? Can be set to 0 (none), 1 (percentage discount), 2 (actual price) or 3 (amount off price).
Type: tinyint(1) Null: No Default: 0
Always set to 0 if there is no discount (no related discount record exists in the products_discount_quantity table).
products_discount_type_from
Which price is the product discount taken from? Can be set to 0 (discount from price) or 1 (discount from special).
Type: tinyint(1) Null: No Default: 0
Always set to 0 if there is no discount (no related discount record exists in the products_discount_quantity table).
products_price_sorter
- Final product price after calculating any discounts and/or specials.
Type: decimal(15,4) Null: No Default: 0.0000
Use function zen_update_products_price_sorter((int)$products_id) to calculate. This function needs to be run after master_categories_id has been set.
This is the bottom line price and the display price of the product. It is used for sorting purposes as trying to calculate and sort on the fly with all the pricing features is next to impossible. It requires the master_categories_id.
Most import programs or mass upgrade programs on price may forget to update the products_price_sorter or set the master_categories_id.
The master_categories_id must be set before the products_price_sorter can be computed.
If the master_categories_id does not exist, you can backup your database and try to update the master_categories_id and then the products_price_sorter via Admin > Tools > Store Manager > Update ALL Products Price Sorter.
The update of the master_categories_id comes from the products_to_categories table. It assumes the first categories_id found is the master_categories_id Usually this is correct, but not always.
master_categories_id
- The master category of the product. Discounts and specials are calculated based on this id.
Type: int(11) Null: No Default: 0
This category must also be added for this product in the products_to_categories table. Get this ID from the categories or the categories_description tables.
products_mixed_discount_quantity
- Can the same product with different attributes be combined to qualify for quantity discounts? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 1
metatags_title_status
- Is the title meta tag enabled? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
metatags_products_name_status
- Is the products name in the title meta tag enabled? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
metatags_model_status
- Is the model in the title meta tag enabled? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
metatags_price_status
- Is the price in the title meta tag enabled? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
metatags_title_tagline_status
- Is the tagline in the title meta tag enabled? Can be set to 0 (no) or 1 (yes).
Type: tinyint(1) Null: No Default: 0
Default Entries (assuming demo data installed)
- TODO!
