15 define(
'LOAD_NO_OPTIONAL_MODULE',
true);
16 include(
'../../configuration.inc.php');
30 if (
vb($_POST[
'type']) ==
"update_session_add") {
31 $_SESSION[
'session_search_product_list'][$_POST[
'id']] = $_POST[
'quantite'];
32 }
elseif (
vb($_POST[
'type']) ==
"update_session_delete") {
33 unset(
$_SESSION[
'session_search_product_list'][$_POST[
'id']]);
35 $form_add_search_product_list =
vb($_POST[
'type']) ==
"search_product_list";
42 $search_array = explode(
$GLOBALS[
'site_parameters'][
'product_reference_prefix'],
$search);
43 $result_array=array();
44 foreach($search_array as $this_result) {
45 if (!empty($this_result)) {
46 $result_array[] =
$GLOBALS[
'site_parameters'][
'product_reference_prefix'].$this_result;
52 if(!empty($queries_results_array)) {
53 $cat_search_sql =
"SELECT pc.produit_id, c.id as categorie_id, c.nom_" .
$_SESSION[
'session_langue'] .
" as categorie
54 FROM peel_produits_categories pc
55 LEFT JOIN peel_categories c ON c.id = pc.categorie_id AND " .
get_filter_site_cond(
'categories',
'c') .
"
56 WHERE pc.produit_id IN (" . implode(
', ', array_keys($queries_results_array)) .
")";
59 $queries_results_array[
$result[
'produit_id']]->categorie_id =
$result[
'categorie_id'];
60 $queries_results_array[
$result[
'produit_id']]->categorie =
$result[
'categorie'];
62 foreach($queries_results_array as
$result) {
66 if ($display_picture) {
67 $product_picture =
$GLOBALS[
'repertoire_upload'] .
'/thumbs/' .
thumbs($display_picture, 75, 75,
'fit');
69 $product_picture =
$GLOBALS[
'repertoire_upload'] .
'/thumbs/' .
thumbs(
$GLOBALS[
'site_parameters'][
'default_picture'], 75, 75,
'fit');
71 $product_picture = null;
77 'reference' => $result->reference,
78 'urlprod' => get_product_url($result->id, $result->nom, $result->categorie_id, $result->categorie),
79 'label' => $this_label,
80 'name' => $result->nom,
86 'photo_src' =>
vb($product_picture),
100 $sql = get_ad_search_select($_POST, 10);
103 $ad_object =
new Annonce($result[
'ref'], $result);
104 $product_picture = $ad_object->get_annonce_picture(
true, 75, 75);
105 $this_title = $ad_object->get_titre();
108 'id' => $ad_object->ref,
109 'reference' =>
vb($ad_object->reference),
110 'urlprod' => $ad_object->get_annonce_url(),
111 'label' => $this_label,
112 'name' => $this_title
117 if (!empty($_POST[
'return_json_array_with_raw_information'])) {
120 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/search_produit.tpl');
121 $tpl->assign(
'STR_AUCUN_RESULTAT',
$GLOBALS[
'STR_AUCUN_RESULTAT']);
122 $tpl->assign(
'display_barcode', !empty(
$GLOBALS[
'site_parameters'][
'display_ean_code_on_product_list']));
124 $tpl->assign(
'form_add_search_product_list', $form_add_search_product_list);
get_quick_search_results($search, $maxRows, $active_only=false, $search_category=null, $mode= 'products')
get_quick_search_results()
static convert_encoding($string, $new_encoding, $original_encoding=null)
Converts the character encoding of string $string to $new_encoding from optionally $original_encoding...
static strpos($haystack, $needle, $offset=0)
Returns the numeric position of the first occurrence of needle in the haystack string.
output_general_http_header($page_encoding=null, $cache_duration_in_seconds=null)
Envoie les headers avant l'envoi du HTML.
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
static strlen($string)
Returns the length of the given string.
if(!empty($_GET['id'])) if(isset($_POST['form_name'], $_POST['form_subject'], $_POST['form_text'], $_POST['form_lang'])&&empty($_GET['id'])) if(empty($_GET['id'])) $tpl
if(empty($_GET['id'])) if(!empty($GLOBALS['site_parameters']['allow_multiple_product_url_with_category'])) $product_object
if(!defined('IN_PEEL')) thumbs($source_filename, $width, $height, $method= 'fit', $source_folder=null, $thumb_folder=null, $thumb_rename=true, $return_absolute_path=false)
Charge l'image dont le nom est $source_filename dans le répertoire d'upload, et crée une vignette pou...
get_filter_site_cond($table_technical_code, $table_alias=null, $use_strict_rights_if_in_admin=false, $specific_site_id=null, $exclude_public_items=false, $admin_force_multisite_if_allowed=false)
Retourne la condition SQL permettant de filtrer les données pour une table.
if(!defined('IN_PEEL')) display_prices_with_taxes_active()
display_prices_with_taxes_active()
query($query, $die_if_error=false, $database_object=null, $silent_if_error=false, $security_sql_filter=true)
The query() function is meant to be called anywhere you want to make a query.
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
fetch_assoc($query_result)
fetch_assoc()
$GLOBALS['page_columns_count']
if(!check_if_module_active('search')) $page_encoding
static html_entity_decode($string, $quote_style=ENT_COMPAT, $charset=GENERAL_ENCODING)
String::html_entity_decode()
check_if_module_active($module_name, $specific_file_name=null)
Renvoie si un module est présent et activé ou non - Peut être appelé avant ou après le chargement d'u...
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']