我需要在 prestashop 1.5 中获得产品功能,但问题是我使用了一个修改,使我能够为每个产品的一个功能赋予多个价值
例子:
兼容的存储卡: - Carte Mémoire xD - Memory Stick - Memory Stick PRO - MultimediaCard (MMC) - Carte Secure Digital (SD)
我得到了这个查询:
Select fl.name, fvl.value, f.id_feature
From ps_feature_lang fl Left Join
ps_feature_product fp On fl.id_feature = fp.id_feature And fp.id_product = 291
Left Join
ps_feature_value_lang fvl On fp.id_feature_value = fvl.id_feature_value And
fvl.id_lang = 5 Left Join
ps_feature f On f.id_feature = fl.id_feature
Where fl.id_feature In (Select ps__fc_categories_features.feature_id
From ps__fc_categories_features)
Group By fl.name, fvl.value, f.id_feature, fl.id_feature
Order By f.position
但是如果给定产品的某个特征具有多个值,它将为该特征提供多个原始值 最好的查询是将每个具有多个值的特征的值连接起来
提前谢谢。