ElieK Posted November 2, 2009 Share Posted November 2, 2009 Bonjour, j'ai mis à jour à la 1.2.5 en ne mettant que les fichiers que j'avais besoins comme dit dans le sujet, j'ai quand même remplacer tout le dossier admin par celui de la maj. (surtout que le fichier AdminProduct.php ne voulait pas s'uploader au début en entier)tout fonctionne bien sauf ma page "Catalogue" dans l'administration, les produits s'affichent mais au milleu j'ai des requêtes sql qui s'affichent.Résolu, les fichiers classes avaient été mal uploadé.Quelqu'un pourrait me dire de quoi cela vient?Aprés "Produits dans cette catégorie", j'ai donc cela : ion addFeaturesToDB($id_feature, $id_value, $cust = 0) { if ($cust) { $row = array('id_feature' => intval($id_feature), 'custom' => 1); $result = Db::getInstance()->autoExecute(_DB_PREFIX_.'feature_value', $row, 'INSERT'); $id_value = Db::getInstance()->Insert_ID(); } $row = array('id_feature' => intval($id_feature), 'id_product' => intval($this->id), 'id_feature_value' => intval($id_value)); $result = Db::getInstance()->autoExecute(_DB_PREFIX_.'feature_product', $row, 'INSERT'); if ($id_value) return ($id_value); } static public function addFeatureProductImport($id_product, $id_feature, $id_feature_value) { return Db::getInstance()->Execute(' INSERT INTO `'._DB_PREFIX_.'feature_product` (`id_feature`, `id_product`, `id_feature_value`) VALUES ('.intval($id_feature).', '.intval($id_product).', '.intval($id_feature_value).') ON DUPLICATE KEY UPDATE `id_feature_value` = '.intval($id_feature_value) ); } /** * Select all features for the object * * @return array Array with feature product's data */ public function getFeatures() { return self::getFeaturesStatic(intval($this->id)); } static public function getFeaturesStatic($id_product) { return Db::getInstance()->ExecuteS(' SELECT id_feature, id_product, id_feature_value FROM `'._DB_PREFIX_.'feature_product` WHERE `id_product` = '.intval($id_product)); } /** * Admin panel product search * * @param integer $id_lang Language id * @param string $query Search query * @return array Matching products */ static public function searchByName($id_lang, $query) { if (!Validate::isCatalogName($query)) die(Tools::displayError()); $result = Db::getInstance()->ExecuteS(' SELECT p.`id_product`, pl.`name`, pl.`link_rewrite`, p.`weight`, p.`active`, p.`ecotax`, i.`id_image`, p.`reference`, il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name FROM `'._DB_PREFIX_.'category_product` cp LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = cp.`id_product` LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.intval($id_lang).') LEFT JOIN `'._DB_PREFIX_.'tax` t ON t.`id_tax` = p.`id_tax` LEFT JOIN `'._DB_PREFIX_.'tax_lang` tl ON (t.`id_tax` = tl.`id_tax` AND tl.`id_lang` = '.intval($id_lang).') LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`) AND i.`cover` = 1 LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.intval($id_lang).') WHERE pl.`name` LIKE \'%'.pSQL($query).'%\' OR p.`reference` LIKE \'%'.pSQL($query).'%\' OR p.`supplier_reference` LIKE \'%'.pSQL($query).'%\' GROUP BY `id_product` ORDER BY pl.`name` ASC'); if (!$result) return false; $resultsArray = array(); foreach ($result AS $k => $row) { $row['price'] = Product::getPriceStatic($row['id_product'], true, NULL, 2); $row['quantity'] = Product::getQuantity($row['id_product']); $resultsArray[] = $row; } return $resultsArray; } /** * Duplicate attributes when duplicating a product * * @param integer $id_product_old Old product id * @param integer $id_product_new New product id */ static public function duplicateAttributes($id_product_old, $id_product_new) { $return = true; $combinationImages = array(); $result = Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'product_attribute` WHERE `id_product` = '.intval($id_product_old)); foreach ($result as $row) { $id_product_attribute_old = intval($row['id_product_attribute']); $result2 = Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'product_attribute_combination` WHERE `id_product_attribute` = '.$id_product_attribute_old); $row['id_product'] = $id_product_new; unset($row['id_product_attribute']); $return &= Db::getInstance()->AutoExecute(_DB_PREFIX_.'product_attribute', $row, 'INSERT'); $id_product_attribute_new = intval(Db::getInstance()->Insert_ID()); if ($resultImages = self::_getAttributeImageAssociations($id_product_attribute_old)) { $combinationImages['old'][$id_product_attribute_old] = $resultImages; $combinationImages['new'][$id_product_attribute_new] = $resultImages; } foreach ($result2 AS $row2) { $row2['id_product_attribute'] = $id_product_attribute_new; $return &= Db::getInstance()->AutoExecute(_DB_PREFIX_.'product_attribute_combination', $row2, 'INSERT'); } } return !$return ? false : $combinationImages; } /** * Get product attribute image associations * @param integer $id_product_attribute * @return boolean */ static public function _getAttributeImageAssociations($id_product_attribute) { $combinationImages = array(); $data = Db::getInstance()->ExecuteS(' SELECT `id_image` FROM `'._DB_PREFIX_.'product_attribute_image` WHERE `id_product_attribute` = '.intval($id_product_attribute)); foreach (etc... j'ai du enlever quelques lignes) Link to comment Share on other sites More sharing options...
alain08270 Posted November 2, 2009 Share Posted November 2, 2009 Tes dossiers ont quelles permissions? Link to comment Share on other sites More sharing options...
ElieK Posted November 2, 2009 Author Share Posted November 2, 2009 705c'est à dire rwx---r-x Link to comment Share on other sites More sharing options...
ElieK Posted November 3, 2009 Author Share Posted November 3, 2009 Quelqu'un pour m'aider svp? Link to comment Share on other sites More sharing options...
ElieK Posted November 3, 2009 Author Share Posted November 3, 2009 quelqu'un pourrait me dire au moins quelles fichiers interviennent dans la page catalogue du back office? que je regarde un peu.Merci Link to comment Share on other sites More sharing options...
alain08270 Posted November 4, 2009 Share Posted November 4, 2009 Pour ma part j'ai remis l'ancienne version je n'ai pas encore trouvé de piste... Link to comment Share on other sites More sharing options...
ElieK Posted November 4, 2009 Author Share Posted November 4, 2009 J'ai résolu, il s'agit simplement de fichier "classes" mal uploadé. 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