Hotfirenet Posted January 13, 2017 Share Posted January 13, 2017 Bonjour tout le monde, il y a un truc que j'ai du mal à cerner avec les caractèristiques d'un produit sous prestashop. j'ai des caractéristiques dans mon backend qui sont ordonnées comme je souhaites. Sauf que lorsque je me rend sur le front l'ordre ne correspond plus. Pourtant en regardant dans le controllerProduct, celui-ci fait appel à la méthode getFrontFeatures de la classe product soit: */ public static function getFrontFeaturesStatic($id_lang, $id_product) { if (!Feature::isFeatureActive()) { return array(); } if (!array_key_exists($id_product.'-'.$id_lang, self::$_frontFeaturesCache)) { self::$_frontFeaturesCache[$id_product.'-'.$id_lang] = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT name, value, pf.id_feature FROM '._DB_PREFIX_.'feature_product pf LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.(int)$id_lang.') LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.(int)$id_lang.') LEFT JOIN '._DB_PREFIX_.'feature f ON (f.id_feature = pf.id_feature AND fl.id_lang = '.(int)$id_lang.') '.Shop::addSqlAssociation('feature', 'f').' WHERE pf.id_product = '.(int)$id_product.' ORDER BY f.position ASC' ); } return self::$_frontFeaturesCache[$id_product.'-'.$id_lang]; } public function getFrontFeatures($id_lang) { return Product::getFrontFeaturesStatic($id_lang, $this->id); } le tri se fait bien sur la position. J'ai vidé un éventuel cache. Je ne sais plus ou chercher .. Merci Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now