WooCommerce:在数据库中查找产品 [英] WooCommerce: Finding the products in database
问题描述
我正在使用WooCommerce创建一个网站,我想根据用户在我的主页上的搜索表单中输入的邮政编码将可用产品限制为用户使用.
I'm creating a website using WooCommerce and I want to restrict the available products to users depending on the postcode that they enter in the search form on my home page.
要实现这一点,我必须在phpMyAdmin中指定数据库中每个产品的条件,但是我似乎找不到它.
To be able to achieve that I'll have to specify the conditions of each product within the database in phpMyAdmin, but I can't seem to find it.
有人知道phpmyAdmin中产品和/或类别的woocommerce数据库在哪里吗?
Does anybody know where the woocommerce database for products and/or categories are within phpmyAdmin?
先谢谢您.
推荐答案
产品主要位于2个表中:
Products are located mainly in 2 tables:
-
具有
-
wp_posts
表,如product
或product_variation
,
post_type
的wp_posts
table with apost_type
likeproduct
orproduct_variation
,
wp_postmeta
表以及相应的post_id
产品(产品ID).
wp_postmeta
table with the corresponding post_id
by product (the product ID).
产品类型,类别,子类别,标签,属性和所有其他自定义分类法位于下表中:
Product types, categories, subcategories, tags, attributes and all other custom taxonomies are located in the following tables:
-
wp_terms
wp_termmeta
wp_term_taxonomy
wp_term_relationships
wp_woocommerce_termmeta
wp_woocommerce_attribute_taxonomies
(仅用于产品属性)
产品类型由具有以下默认术语的自定义分类法product_type
处理:
Product types are handled by custom taxonomy product_type
with the following default terms:
-
simple
-
grouped
-
variable
-
external
simple
grouped
variable
external
自Woocommerce 3+起,一个名为 product_visibility
的新自定义分类标准处理:
Since Woocommerce 3+ a new custom taxonomy named product_visibility
handle:
- 带有
exclude-from-search
和exclude-from-catalog
的产品可见性
- 功能产品
featured
- 库存状态为
outofstock
- 评分系统,其术语从
rated-1
到rated-5
- The product visibility with the terms
exclude-from-search
andexclude-from-catalog
- The feature products with the term
featured
- The stock status with the term
outofstock
- The rating system with terms from
rated-1
torated-5
特殊功能:每个产品属性是自定义分类法...
Particular feature: Each product attribute is a custom taxonomy…
参考:
- 普通表: WordPress数据库描述
- 特定表: Woocommerce数据库描述
- Normal tables: Wordpress database description
- Specific tables: Woocommerce database description
这篇关于WooCommerce:在数据库中查找产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!