Magento备忘-EAV商品表直接取某一字段值
比通过模型LOAD商品模型后再用getData取值快
G::
getResourceModel
(
'catalog/product'
)
->
getAttributeRawValue
(
$entityId
,
$attribute
,
$store
)
getAttributeRawValue函数参考
/**
* Retrieve attribute's raw value from DB.
*
* @param int $entityId
* @param int|string|array $attribute atrribute's ids or codes
* @param int|G_Core_Model_Store $store
* @return bool|string|array
*/
public
function
getAttributeRawValue(
$entityId
,
$attribute
,
$store
)
本文介绍在Magento中如何通过EAV模型直接从商品表获取字段值的方法,对比通过模型LOAD后的getData方式,此方法能有效提升数据读取效率。
693

被折叠的 条评论
为什么被折叠?



