osCommerce France : Accueil Forum Portail osCommerce France Réponses aux questions Foire aux contributions

Bienvenue invité ( Connexion | Inscription )

> amélioration de la recher dans la partie admin, recherche par modèle et non par nom
Newton curtis
posté 2 Dec 2011, 17:20
Message #1


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 4
Inscrit : 16-August 10
Lieu : 56
Membre no 27908



Bonjour
dans la partie admin comment faire une recherche par modèle?
merci


--------------------
Un homme Azerty en vaut 2 ?
Go to the top of the page
 
 
Start new topic
Réponse(s) (1 - 1)
Newton curtis
posté 2 Dec 2011, 17:35
Message #2


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 4
Inscrit : 16-August 10
Lieu : 56
Membre no 27908



résolu tout seul happy.gif
pour ceux que cela intéresse
dans categories.php
ajouter après ou remplacer:
CODE
$products_query = tep_db_query("select p.products_subimage1, p.products_subimage2, p.products_subimage3, p.products_subimage4, p.products_subimage5, p.products_subimage6, p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");


avec ceci:

CODE
$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and (pd.products_name like '%" . tep_db_input($search) . "%' or p.products_model like '%" . tep_db_input($search) . "%') order by pd.products_name");


--------------------
Un homme Azerty en vaut 2 ?
Go to the top of the page
 

Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



RSS Version bas débit Nous sommes le : 29th March 2024 - 00:42
Ce site est déclaré auprès de la commision Nationale
de l'Informatique et des Libertés (déclaration n°: 1043896)