在数据库中找到的“设置产品新开始日期”在哪里


Where is the Set product new from date found in database?

我是magento的新手,想知道在databse表和列名称中可以找到每个产品的"设置产品新开始日期"值的位置。我向catalogrule_product核实了一下。有一个名为from_time的列,我不确定这是正确的表,或者是否有任何其他与此相关的表。

>Magento遵循EAV数据库结构。在数据库中,您将找到eav_attribute表。

在那里搜索attribute_code = 'news_from_date' 和 attribute_code = 'news_to_date' 并记下这些属性的 ID。

现在转到catalog_product_entity_datetime表并搜索 attribute_id = 和 entity_id =

我想,您的查询现已解决。如果您有任何困惑,请询问。

属性名称为 : news_from_date

$code = 'news_from_date'

现在使用 $attributeId= getAttributeId($code );

$entity_id= $product->getId();

现在如上所述的查询:从catalog_product_entity_datetime中选择 * attribute_id = $attributeId 和 entity_id = $entity_id