Giugno 19, 2013, 08:56:07 am
Benvenuto,
Visitatore
. Per favore, effettua il
login
o
registrati
.
1 Ora
1 Giorno
1 Settimana
1 Mese
Per Sempre
Login con username, password e lunghezza della sessione
News
: SMF - Just Installed!
Home
Help
Ricerca
Download
Utenti
Login
Registrati
Oscomtemplate
>
Oscomtemplate Pack
>
Contributions
>
Box search AJAX - ricerca per NOME e DESCRIZIONE
Pagine:
1
[
2
]
3
« precedente
successivo »
Stampa
Autore
Topic: Box search AJAX - ricerca per NOME e DESCRIZIONE (Letto 7425 volte)
0 Utenti e 1 Visitatore stanno guardando questo topic.
bazbar
Global Moderator
Membro Master
Offline
Posts: 1964
un maledetto Bastardo
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #15 il:
Agosto 31, 2007, 07:46:22 pm »
grassie
Loggato
FarmaBenessere.com
Prima di porre delle domande leggi le FAQ e utilizza la funzione di ricerca!.......e già che ci sei....mi faresti pure un caffè??
PNX
Visitatore
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #16 il:
Agosto 31, 2007, 08:01:47 pm »
postate il link della contrib e la versione con data..
baz magari ci fa comodo anche per l'altro discorso in moderatori...
Loggato
simo
Membro Junior
Offline
Posts: 90
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #17 il:
Agosto 31, 2007, 08:39:14 pm »
La contrib è questa:
http://www.oscommerce.com/community/contributions,4144/category,all/search,AJAX
L'autore del tread ha installato l'ultima versione (1.6) che utilizza XLS per la formattazione del box, a me non so per quel motivo questa versione funziona solo in locale.
Il linguaggio XML e affini essendo eseguiti lato client non dovrebbero funzionare su qualsiasi server?
Puo essere che il server non riconosca proprio certi tipi di estensioni?
«
Ultima modifica: Agosto 31, 2007, 08:41:00 pm da simo
»
Loggato
bazbar
Global Moderator
Membro Master
Offline
Posts: 1964
un maledetto Bastardo
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #18 il:
Agosto 31, 2007, 10:46:26 pm »
ho provato ad installarla....carina ma la cosa che non mi piace affatto sono i link suggeriti che allungano la pagina a dismisura...preferirei averli in un menù a tendina come in google
Loggato
FarmaBenessere.com
Prima di porre delle domande leggi le FAQ e utilizza la funzione di ricerca!.......e già che ci sei....mi faresti pure un caffè??
simo
Membro Junior
Offline
Posts: 90
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #19 il:
Agosto 31, 2007, 10:59:03 pm »
Quale versione hai installato?
Il box con i link suggeriti deve uscire in primo piano.
Loggato
bazbar
Global Moderator
Membro Master
Offline
Posts: 1964
un maledetto Bastardo
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #20 il:
Agosto 31, 2007, 11:03:55 pm »
1.4 e correzione 1.5
Loggato
FarmaBenessere.com
Prima di porre delle domande leggi le FAQ e utilizza la funzione di ricerca!.......e già che ci sei....mi faresti pure un caffè??
simo
Membro Junior
Offline
Posts: 90
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #21 il:
Agosto 31, 2007, 11:12:52 pm »
Il problema credo sia nel CSS, devi dare il posizionamento assoluto (position:absolute;) al box.
Loggato
bazbar
Global Moderator
Membro Master
Offline
Posts: 1964
un maledetto Bastardo
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #22 il:
Agosto 31, 2007, 11:16:14 pm »
è già così ma il mio css non mi prende un'emerita CIPPA!
Citazione
/*----------------------------Suggest Styles--------------------------*/
.suggest_link {
background-color: #FFFFFF;
padding: 2px 6px 2px 6px;
}
.suggest_link_over {
background-color: #3366CC;
padding: 2px 6px 2px 6px;
}
#search_suggest {
position: absolute;
background-color: #FFFFFF;
text-align: left;
border: 1px solid #000000;
}
/*----------------------------End Suggest Styles------------------------*/
Loggato
FarmaBenessere.com
Prima di porre delle domande leggi le FAQ e utilizza la funzione di ricerca!.......e già che ci sei....mi faresti pure un caffè??
simo
Membro Junior
Offline
Posts: 90
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #23 il:
Agosto 31, 2007, 11:25:21 pm »
Strano hai utilizato la proprietà position per qualcos'altro?
Prova cosi:
Codice:
#search_suggest {
position: absolute;
z-index:1;
background-color: #FFFFFF;
text-align: left;
border: 1px solid #000000;
}
Loggato
bazbar
Global Moderator
Membro Master
Offline
Posts: 1964
un maledetto Bastardo
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #24 il:
Agosto 31, 2007, 11:44:10 pm »
Citato da: simo su Agosto 31, 2007, 11:25:21 pm
Strano hai utilizato la proprietà position per qualcos'altro?
Prova cosi:
Codice:
#search_suggest {
position: absolute;
z-index:1;
background-color: #FFFFFF;
text-align: left;
border: 1px solid #000000;
}
non mi pare proprio.....comunque non funzia....nel menù a tendina mi propone le ultime parole ricercate ma i link li apre sotto, allungando a dismisura la colonna
Loggato
FarmaBenessere.com
Prima di porre delle domande leggi le FAQ e utilizza la funzione di ricerca!.......e già che ci sei....mi faresti pure un caffè??
simo
Membro Junior
Offline
Posts: 90
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #25 il:
Settembre 01, 2007, 12:00:44 am »
Ti passo il mio search.php, altro non saprei:
Codice:
<?php
/*
$Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
?>
<!-- search //-->
<tr>
<td>
<script language="JavaScript" type="text/javascript">
/*----------------------------Suggest Code-------------------------*/
/*
This is the JavaScript file for the osCommerce AJAX Search Suggest
You may use this code in your own projects as long as this
copyright is left
in place. All code is provided AS-IS.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
For the rest of this code visit http://www.osCommerce-SSL.com
For a complete detailed tutorial on how this code works visit:
http://www.dynamicajax.com/fr/AJAX_Suggest_Tutorial-271_290_312.html
For more AJAX code and tutorials visit http://www.DynamicAJAX.com
Copyright 2006 Ryan Smith / 345 Technical / 345 Group.
*/
//Gets the browser specific XmlHttpRequest Object
function getXmlHttpRequestObject() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
} else {
alert("Your Browser Sucks!\nIt's about time to upgrade don't you think?");
}
}
//Our XmlHttpRequest object to get the auto suggest
var searchReq = getXmlHttpRequestObject();
//Called from keyup on the search textbox.
//Starts the AJAX request.
function searchSuggest() {
if (searchReq.readyState == 4 || searchReq.readyState == 0) {
var str = escape(document.getElementById('txtSearch').value);
searchReq.open("GET", 'searchsuggest.php?search=' + str, true);
searchReq.onreadystatechange = handleSearchSuggest;
searchReq.send(null);
}
}
//Called when the AJAX response is returned.
function handleSearchSuggest() {
if (searchReq.readyState == 4) {
var ss = document.getElementById('search_suggest')
ss.innerHTML = '';
var str = searchReq.responseText.split("\n");
for(i=0; i < str.length - 1; i++) {
//Build our element string. This is cleaner using the DOM, but
//IE doesn't support dynamically added attributes.
var suggest = '<div onmouseover="javascript:suggestOver(this);" ';
suggest += 'onmouseout="javascript:suggestOut(this);" ';
suggest += 'onclick="javascript:setSearch(this.innerHTML);" ';
suggest += 'class="suggest_link">' + str[i] + '</div>';
ss.innerHTML += suggest;
}
}
}
//Mouse over function
function suggestOver(div_value) {
div_value.className = 'suggest_link_over';
}
//Mouse out function
function suggestOut(div_value) {
div_value.className = 'suggest_link';
}
//Click function
function setSearch(value) {
document.getElementById('txtSearch').value = value;
document.getElementById('search_suggest').innerHTML = '';
}
/*-------------------------End Suggest Code--------------------------------*/
</script>
<?php
$info_box_contents
= array();
$info_box_contents
[] = array(
'text'
=>
BOX_HEADING_SEARCH
);
new
infoBoxHeading
(
$info_box_contents
,
false
,
false
,
false
,
$column_location
);
$info_box_contents
= array();
$info_box_contents
[] = array(
'form'
=>
tep_draw_form
(
'quick_find'
,
tep_href_link
(
FILENAME_ADVANCED_SEARCH_RESULT
,
''
,
'NONSSL'
,
false
),
'get'
),
'align'
=>
'left'
,
'text'
=>
tep_draw_input_field
(
'keywords'
,
''
,
'id="txtSearch" onkeyup="searchSuggest(); "autocomplete="off" size="10" maxlength="30" style="width: '
. (
BOX_WIDTH
-
50
) .
'px"'
) .
' '
.
tep_hide_session_id
() .
tep_image_submit
(
'button_quick_find.gif'
,
BOX_HEADING_SEARCH
,
'id="bottone_serch"'
) .
'<br><div id="search_suggest"></div>'
.
'<span style=" padding-left:2px;"><a href="'
.
tep_href_link
(
FILENAME_ADVANCED_SEARCH
) .
'"><b>'
.
BOX_SEARCH_ADVANCED_SEARCH
.
'</b></a></span>'
);
new
infoBox
(
$info_box_contents
,
$column_location
);
?>
<!--<div id="search_suggest">
</div>-->
</td>
</tr>
<!-- search_eof //-->
Loggato
bazbar
Global Moderator
Membro Master
Offline
Posts: 1964
un maledetto Bastardo
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #26 il:
Settembre 01, 2007, 12:12:00 am »
grazie ...ma come potrai immaginare non mi funzia
ho capito male o anche tu hai la mia stessa versione?
Loggato
FarmaBenessere.com
Prima di porre delle domande leggi le FAQ e utilizza la funzione di ricerca!.......e già che ci sei....mi faresti pure un caffè??
tano_fast
Membro Regolare
Offline
Posts: 180
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #27 il:
Settembre 01, 2007, 10:45:30 pm »
Quando faccio una ricerca e clicco sul risultato mi va subito alla pagina dove c'è la descrizione del Prodotto (product_info.php) però facendo cosi non so se quell'articolo è disponibile o no. Vorrei se si può modificare il file searchsuggest.php in modo tale che quando faccio una ricerca e poi clicco sul risultato mi porti alla pagina dove mi fa vedere il prodotto con la quantità. In allegato l'immagine di quello che voglio fare apparire quando clicco sul risultato.
«
Ultima modifica: Settembre 01, 2007, 10:47:08 pm da tano_fast
»
Loggato
Ciao
Tano_Fast
diablo82
Newbie
Offline
Posts: 2
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #28 il:
Maggio 21, 2009, 03:10:31 am »
Codice:
Ciao a tutti,colgo l'occasione per presentarmi,piacere alessio 8)
Non riesco a capire perchè quando metto una parola di una descrizione sul box non me la trova....eppure ho fatto tutti i vostri passaggi.
Mentre quando vado su ricerca avanzata e spunto la voce Ricerca nella Descrizione del Prodotto me lo trova....
Premessa...non ci capisco una mazza! ;D
[code
<?php
/**
* osCommerce: Example XML Document for OSCFieldSuggest JS class
*
* File: searchsuggest.php
* Version: 1.0
* Date: 2007-03-28 17:49
* Author: Timo Kiefer - timo.kiefer_(at)_kmcs.de
* Organisation: KMCS - www.kmcs.de
* Licence: General Public Licence 2.0
*/
/*
This is the back-end PHP file for the osCommerce AJAX Search Suggest
You may use this code in your own projects as long as this
copyright is left
in place. All code is provided AS-IS.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The complete tutorial on how this works can be found at:
http://www.dynamicajax.com/fr/AJAX_Suggest_Tutorial-271_290_312.html
For more AJAX code and tutorials visit http://www.DynamicAJAX.com
For more osCommerce related tutorials and code examples visit http://www.osCommerce-SSL.com
Copyright 2006 Ryan Smith / 345 Technical / 345 Group.
*/
include(
'includes/application_top.php'
);
///Make sure that a value was sent.
if (isset(
$_GET
[
'keywords'
]) &&
$_GET
[
'keywords'
] !=
''
) {
//Add slashes to any quotes to avoid SQL problems.
$search
=
addslashes
(
$_GET
[
'keywords'
]);
//Get every page title for the site.
// $sql = "SELECT * FROM products_description join products on products_description.products_id=products.products_id WHERE products.products_status=1 AND products.products_carrot=0 and products.products_id = products_description.products_id and products_description.language_id = '" . (int)$languages_id . "' and products_description.products_name like('%" . tep_db_input($_GET['search']) . "%') LIMIT 15";
$sql
=
"select pd.products_name, p.products_id from "
.
TABLE_PRODUCTS_DESCRIPTION
.
" pd left join "
.
TABLE_PRODUCTS
.
" p on pd.products_id = p.products_id WHERE p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '"
. (int)
$languages_id
.
"' and pd.products_description like('%"
.
tep_db_input
(
$_GET
[
'keywords'
]) .
"%') LIMIT 15"
;
/**
* Set XML HTTP Header for ajax response
*/
header
(
'Content-Type: text/xml;'
);
header
(
'Cache-Control: no-cache;'
);
echo <?
xml version
=
"1.0"
encoding
=
"iso-8859-2"
?>
' . "\n";
echo '<response>' . "\n";
echo ' <suggestlist>' . "\n";
$product_query = tep_db_query($sql);
while($product_array = tep_db_fetch_array($product_query)) {
//$product_array['products_name'] = htmlentities($product_array['products_name']);
//echo '<a href="' . tep_href_link('product_info.php', 'products_id=' . $product_array['products_id']) . '">' . $product_array['products_name'] . '</a>' . "\n";
echo '<item>' . "\n";
echo ' <name><![CDATA[' . $product_array['products_name'] . ']]></name>' . "\n";
echo ' <url><![CDATA[' . tep_href_link('product_info.php', 'products_id=' . $product_array['products_id']) . ']]></url>' . "\n";
echo '</item>' . "\n";
}
}
echo ' </suggestlist>' . "\n";
echo '</response>' . "\n";
include('includes/application_bottom.php');
?>
Ho sbagliato qualcosa?
«
Ultima modifica: Maggio 21, 2009, 03:13:33 am da diablo82
»
Loggato
oolicks_rNb
Newbie
Offline
Posts: 3
Re: Box search AJAX - ricerca per NOME e DESCRIZIONE
«
Risposta #29 il:
Ottobre 16, 2009, 11:06:55 am »
bellisssimo con utente e passaggi per il negozio in una maniera completamente affascinante. ma naturalmente no trovo il link per farti vedere che fa... se cerchi su oscommerce ci sono un bel po di contrib in ajax l'unica che uso io per adesso e una che fa un whoisonline.
____________________
Rete di Telecomunicazioni
Loggato
Pagine:
1
[
2
]
3
Stampa
« precedente
successivo »
Salta a:
Seleziona una destinazione:
-----------------------------
Nuova Versione OsctPro 2.0 (nome in codice RIBE)
-----------------------------
=> Nuove caratteristiche della 2.0
-----------------------------
Oscomtemplate Pack
-----------------------------
=> Generale
=> Contributions
=> Templates e grafica
=> Faq
=> Integrazione con Gestionali
=> Bug
-----------------------------
Paypal Italia
-----------------------------
=> Generale
-----------------------------
L'angolo dei merchant
-----------------------------
=> Generale
-----------------------------
Oscommerce originale
-----------------------------
=> Generale
=> Contributions
-----------------------------
Supporto Contributions italiane
-----------------------------
=> Supporto Contributions Italiane
-----------------------------
Proposte di lavoro
-----------------------------
=> Proposte di Lavoro
-----------------------------
Shop Online
-----------------------------
=> Shop creati con osctpack
-----------------------------
Altro
-----------------------------
=> Discussioni Off Topic
Sto caricando...