Pagina 1 di 1

Alla Disperazione più totale

Inviato: 25/03/2007, 8:43
da jaki
Ciao Ragazzi, complimenti per il forum, è una manna dal cielo, ho un problema:
ho tavasato un oscommerce da un server ad un'altro, database e cartelle complete di contributions etc etc, tutto bene, mi fa interaggire con il database, ma al momento di aggiungere categorie o prodotti ricevo questo errore:

0 -

insert into categories_description (categories_name, categories_id, language_id) values ('Categoria nuova', '0', '4')

[TEP STOP]


qualcuno sa dove intervenire, può dipendere del file categories.php?
in giro per mille forums non ho trovato niente che mi possa aiutare


Dati server:

Server Web Apache
Sql 4.1
Os Linux

Inviato: 25/03/2007, 11:44
da jaki
segue sotto

Inviato: 25/03/2007, 11:46
da jaki
Smanettando, ho scoperto che il problema arriva quando cerco d'0integrare fckeditor nella descrizione del prodotto.
senza fckeditor funziona benissimo, nel senso che aggiunge e modifica tutto quello che carico, ma avevo bisogno di integrare fckeditor, e da lì arrivano i guai.

Cercando nei forum ho editato 2 files

amin/categories.php:
e
admin/functions/html_output.php

Ho fatto così:

######## OPEN ########
/admin/categories.php
######################

######## FIND (LINE 538) ########

<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

#################################

######## REPLACE WITH ########
######## You may edit the 500 and the 300 in ########
######## this line to change the height and ########
######## width of the editor ########

<td class="main"><?php tep_draw_fckeditor('products_description[' . $languages[$i]['id'] . ']','500','300',(isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

##############################



######## OPEN ########
/admin/functions/html_output.php
######################

######## FIND (LINE 13-14) ########

////
// The HTML href link wrapper function

###################################

######## BEFORE ADD ########

require("../../FCKeditor/fckeditor.php");

############################

######## FIND (LINE 235-253) ########

////
// Output a form textarea field
function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
$field .= stripslashes($GLOBALS[$name]);
} elseif (tep_not_null($text)) {
$field .= $text;
}

$field .= '</textarea>';

return $field;
}

####################################

######## AFTER ADD ########

////
// Output a form textarea field w/ fckeditor
function tep_draw_fckeditor($name, $width, $height, $text) {

$oFCKeditor = new FCKeditor($name);
$oFCKeditor -> Width = $width;
$oFCKeditor -> Height = $height;
$oFCKeditor -> BasePath = 'http://www.yoursite.com/FCKeditor/';
$oFCKeditor -> Value = $text;

$field = $oFCKeditor->Create($name);

return $field;
}

###########################



così vedo fckeditor nella descrizione del prodotto, ma al momento di inserire il prodotto, mi da l'0errore sopra indicato nel post precedente
, mi aggiunge il prodotto che vedo solo nella vetrina ma non nella categorìa dove l'ho inserito.

Qualcuno è in grado di darmi una mano?
Grazie mille