Module Prestashop:按功能获取产品

Module Prestashop:按功能获取产品,module,prestashop,product,Module,Prestashop,Product,在Prestashop上的模块中,我需要显示产品列表,但我需要按功能获取它们,例如:我需要获取id功能1的id值为2的所有产品 Prestashop中是否存在此功能?这可能是您的解决方案: $featuresObj = new Product($product['id_product']); $features = $featuresObj->getFrontFeatures($this->context->language->id); foreach($feature

在Prestashop上的模块中,我需要显示产品列表,但我需要按功能获取它们,例如:我需要获取id功能1的id值为2的所有产品


Prestashop中是否存在此功能?

这可能是您的解决方案:

$featuresObj = new Product($product['id_product']);
$features = $featuresObj->getFrontFeatures($this->context->language->id);

foreach($features as $feature)
{
    var_dump($feature);
}