WooCommerce:在数据库中查找产品 [英] WooCommerce: Finding the products in database

查看:850
本文介绍了WooCommerce:在数据库中查找产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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:

    具有post_type
  • wp_posts表,如 product product_variation

  • wp_posts table with a post_type like product or product_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-searchexclude-from-catalog
  • 的产品可见性
  • 功能产品featured
  • 库存状态为outofstock
  • 评分系统,其术语从rated-1rated-5
  • The product visibility with the terms exclude-from-search and exclude-from-catalog
  • The feature products with the term featured
  • The stock status with the term outofstock
  • The rating system with terms from rated-1 to rated-5

特殊功能:每个产品属性是自定义分类法...

Particular feature: Each product attribute is a custom taxonomy…

参考:

  • Normal tables: Wordpress database description
  • Specific tables: Woocommerce database description

这篇关于WooCommerce:在数据库中查找产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆