Hallo erstmal, ich weis ja nicht ob Ihrs schon wusstet... (Rüdiger Hoffmann)
ich hab mich wie so viele über Kelkoo gewundert, Trotz anmeldung keine Artikel bei der Suche auf Kelkoo.
Jetzt schreiben die mir(ich zitiere)
"Der Status Ihrer Dateien weist immer noch Fehler auf:
In der Kopfzeile
Warnung in Zeile 1 : Der Kopfsatz enthält "country" ungültige
Zeichen/Werte
Bitte überprüfen Sie die Liste erlaubter Zeichen/Werte und korrigieren
dies.
Vielen Dank"
Das sieht dann in der Kelkoo.txt so aus:
#country=de
#type=basic
#currency=EUR
url title description price offerid category image availability deliverycost
http://www.meinedomein.de/product_info.php...nditioned-.html (http://anonym.to/?http://www.meinedomein.de/product_info.php?info=p488_Glasvase--Conditioned-.html) Glasvase "Conditioned" Schöne, bauchige Vase aus Glas, ca. 11cm Durchmesser, ca.11cm hoch... 4.90 488 Vasen http://www.meine (http://anonym.to/?http://www.meine) domein.de/images/product_images/thumbnail_images/1006907452.jpg 001 EUR 4,00
was soll da jetzt falsch sein?
außerdem sind hier 4,00 Euro Versandkosten aufgeführt, ich habe aber Tabelarische Versandkosten bis 31KG = 5,95 Euro!
Woher kommen die 4,00 Euro? -> ist hier evtl. die Nachnahmegebühr aufgeführt? Un d wie kann ich das ändern?
Am einfachsten wäre es wenn mir jemand eine funktionierende Kelkoo - Export Datei schicken könnte! :)
Danke
voliere.net
15.09.2006, 15:20
der fehler liegt an den noch alten angaben für die erste zeile. ich habe meine kelkoo.php umgeschrieben, sie funktioniert tadellos. hier ist sie:
<?php
/ -----------------------------------------------------------------------------------------
** $Id: kelkoo.php 1188 2005-08-28 14:24:34Z matthias $
** XT-Commerce - community made shopping
** http://www.xt-commerce.com
** Copyright (c) 2003 XT-Commerce
** -----------------------------------------------------------------------------------------
** based on:
** (c) 2000-2001 The Exchange Project**(earlier name of osCommerce)
** (c) 2002-2003 osCommerce(cod.php,v 1.28 2003/02/14); www.oscommerce.com
** (c) 2003******** nextcommerce (invoice.php,v 1.6 2003/08/24); www.nextcommerce.org
** Released under the GNU General Public License
** --------------------------------------------------------------------------------------- /
defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
define('MODULE_KELKOO_TEXT_DESCRIPTION', 'Export - Kelkoo im txt Format');
define('MODULE_KELKOO_TEXT_TITLE', 'Kelkoo - txt');
define('MODULE_KELKOO_FILE_TITLE' , '<hr noshade>Dateiname');
define('MODULE_KELKOO_FILE_DESC' , 'Geben Sie einen Dateinamen ein, falls die Exportadatei am Server gespeichert werden soll.
(Verzeichnis export/)');
define('MODULE_KELKOO_STATUS_DESC','Modulstatus');
define('MODULE_KELKOO_STATUS_TITLE','Status');
define('MODULE_KELKOO_CURRENCY_TITLE','Währung');
define('MODULE_KELKOO_CURRENCY_DESC','Welche Währung soll exportiert werden?');
define('EXPORT_YES','Nur Herunterladen');
define('EXPORT_NO','Am Server Speichern');
define('CURRENCY','<hr noshade>Währung:');
define('CURRENCY_DESC','Währung in der Exportdatei');
define('EXPORT','Bitte den Sicherungsprozess AUF KEINEN FALL unterbrechen. Dieser kann einige Minuten in Anspruch nehmen.');
define('EXPORT_TYPE','<hr noshade>Speicherart:');
define('EXPORT_STATUS_TYPE','<hr noshade>Kundengruppe:');
define('EXPORT_STATUS','Bitte wählen Sie die Kundengruppe, die Basis für den Exportierten Preis bildet. (Falls Sie keine Kundengruppenpreise haben, wählen Sie Gast):[/b]');
define('CHARSET','iso-8859-1');
define('PROGRAMM_TYPE','<hr noshade>Programmart:');
define('CAMPAIGNS','<hr noshade>Kampagnen:');
define('CAMPAIGNS_DESC','Mit Kampagne zur Nachverfolgung verbinden.');
// include needed functions
**class kelkoo {
****var $code, $title, $description, $enabled;
****function kelkoo() {
******global $order;
******$this->code = 'kelkoo';
******$this->title = MODULE_KELKOO_TEXT_TITLE;
******$this->description = MODULE_KELKOO_TEXT_DESCRIPTION;
******$this->sort_order = MODULE_KELKOO_SORT_ORDER;
******$this->enabled = ((MODULE_KELKOO_STATUS == 'True') ? true : false);
****}
****function process($file) {
********@xtc_set_time_limit(0);
********require(DIR_FS_CATALOG.DIR_WS_CLASSES . 'xtcPrice.php');
********$xtPrice = new xtcPrice($_POST['currencies'],$_POST['status']);
********$schema ='#country=de' . "\n".
****************** '#type=basic' . "\n".
****************** '#currency='.$_POST['currencies'] . "\n";
********$schema .= 'url'."\t".'title'."\t".'description'."\t".'price'."\t".'offerid'."\t".'category'."\t".'image'."\t".'availability'."\t".'deliverycost'."\n";
********$export_query =xtc_db_query("SELECT
**************************** p.products_id,
**************************** pd.products_name,
**************************** pd.products_description,
**************************** p.products_model,
**************************** p.products_shippingtime,
**************************** p.products_image,
**************************** p.products_price,
**************************** p.products_status,
**************************** p.products_discount_allowed,
**************************** p.products_tax_class_id,
**************************** p.products_date_added,
**************************** m.manufacturers_name
************************ FROM
**************************** " . TABLE_PRODUCTS . " p LEFT JOIN
**************************** " . TABLE_MANUFACTURERS . " m
************************** ON p.manufacturers_id = m.manufacturers_id LEFT JOIN
**************************** " . TABLE_PRODUCTS_DESCRIPTION . " pd
************************** ON p.products_id = pd.products_id AND
****************************pd.language_id = '".$_SESSION['languages_id']."' LEFT JOIN
**************************** " . TABLE_SPECIALS . " s
************************** ON p.products_id = s.products_id
************************ WHERE
************************** p.products_status = 1
************************ ORDER BY
****************************p.products_date_added DESC,
****************************pd.products_name");
********while ($products = xtc_db_fetch_array($export_query)) {
************ $products_price = $xtPrice->xtcGetPrice($products['products_id'],
****************************************$format=fa lse,
****************************************1,
****************************************$products['products_tax_class_id'],
****************************************'');
************// remove trash
$products_description = str_replace("
"," ",$products_description);
************$products_description = strip_tags($products['products_description']);
************$products_description = str_replace("\n"," ",$products_description);
************$products_description = str_replace("\r"," ",$products_description);
************$products_description = str_replace("\t"," ",$products_description);
************$products_description = str_replace("\v"," ",$products_description);
************$products_description = str_replace(""", "\"", $products_description);
************$products_description = str_replace("&qout;"," \"", $products_description);
************$products_description = str_replace ("ä", "ä", $products_description);
************$products_description = str_replace ("³", "³", $products_description);
************$products_description = str_replace ("²", "²", $products_description);
************$products_description = str_replace ("°", "°", $products_description);
************$products_description = str_replace ("&", "&", $products_description);
************$products_description = str_replace ("ö", "ö", $products_description);
************$products_description = str_replace ("ü", "ü", $products_description);
************$products_description = str_replace ("Ä", "Ä", $products_description);
************$products_description = str_replace ("Ö", "Ö", $products_description);
************$products_description = str_replace ("Ü", "Ü", $products_description);
************$products_description = str_replace ("ß", "ß", $products_description);
************$products_description = str_replace ("§", "§", $products_description);
************$length=160;
************if ($_POST['account']!='normal') $length=400;
************$products_description = substr($products_description, 0, $length-4) . '...';
************// get product categorie
************$categorie_query=xtc_db_query("SELECT
********************************************catego ries_id
********************************************FROM ".TABLE_PRODUCTS_TO_CATEGORIES."
********************************************WHERE products_id='".$products['products_id']."'");
************ while ($categorie_data=xtc_db_fetch_array($categorie_que ry)) {
********************$categories=$categorie_data['categories_id'];
************ }
************ $categorie_query=xtc_db_query("SELECT
********************************************catego ries_name
********************************************FROM ".TABLE_CATEGORIES_DESCRIPTION."
********************************************WHERE categories_id='".$categories."'
********************************************and language_id='".$_SESSION['languages_id']."'");
************ $categorie_data=xtc_db_fetch_array($categorie_quer y);
************//create content
************//create content
if($products['products_image']==''){
$kelkoo_image="";
} else {
$kelkoo_image=HTTP_CATALOG_SERVER . DIR_WS_CATALOG_THUMBNAIL_IMAGES . $products['products_image'];
}
******************** $schema .=
********************** HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'product_info.php?'.$_POST['campaign'].xtc_product_link($products['products_id'], $products['products_name'])."\t".
********************** $products['products_name'] . "\t".
********************** $products_description ."\t".
********************** number_format($products_price,2,'.',''). "\t" .
********************** $products['products_id'] . "\t" .
********************** $categorie_data['categories_name'] . "\t".
********************** // '001'."\t".
********************** // 'included'. "\n";
********************** $kelkoo_image . "\t".
************************'001'. "\t".
************************'nach Gesamtgewnicht'. "\n";
********}
********// create File
**********$fp = fopen(DIR_FS_DOCUMENT_ROOT.'export/' . $file, "w+");
**********fputs($fp, $schema);
**********fclose($fp);
******switch ($_POST['export']) {
********case 'yes':
************// send File to Browser
************$extension = substr($file, -3);
************$fp = fopen(DIR_FS_DOCUMENT_ROOT.'export/' . $file,"rb");
************$buffer = fread($fp, filesize(DIR_FS_DOCUMENT_ROOT.'export/' . $file));
************fclose($fp);
************header('Content-type: application/x-octet-stream');
************header('Content-dispoistion: attachment; filename=' . $file);
************echo $buffer;
************exit;
********break;
********}
****}
****function display() {
****$customers_statuses_array = xtc_get_customers_statuses();
****// build Currency Select
****$curr='';
****$currencies=xtc_db_query("SELECT code FROM ".TABLE_CURRENCIES);
****while ($currencies_data=xtc_db_fetch_array($currencies)) {
**** $curr.=xtc_draw_radio_field('currencies', $currencies_data['code'],true).$currencies_data['code'].'
';
****}
****$campaign_array = array(array('id' => '', 'text' => TEXT_NONE));
********$campaign_query = xtc_db_query("select campaigns_name, campaigns_refID from ".TABLE_CAMPAIGNS." order by campaigns_id");
********while ($campaign = xtc_db_fetch_array($campaign_query)) {
********$campaign_array[] = array ('id' => 'refID='.$campaign['campaigns_refID'].'&', 'text' => $campaign['campaigns_name'],);
********}
****return array('text' =>**EXPORT_STATUS_TYPE.'
'.
**********************************EXPORT_STATUS.'
'.
**********************************xtc_draw_pull_do wn_menu('status',$customers_statuses_array, '1').'
'.
****************************CURRENCY.'
'.
****************************CURRENCY_DESC.'
'.
****************************$curr.
****************************CAMPAIGNS.'
'.
****************************CAMPAIGNS_DESC.'
'.
**********************************xtc_draw_pull_do wn_menu('campaign',$campaign_array).'
'.
****************************PROGRAMM_TYPE.'
'.
****************************xtc_draw_radio_field(' account', 'premium',false).'premium (400 zeichen)
'.
****************************xtc_draw_radio_field(' account', 'normal',true).'normal (160 zeichen)
'.
****************************EXPORT_TYPE.'
'.
****************************EXPORT.'
'.
****************************xtc_draw_radio_field(' export', 'no',false).EXPORT_NO.'
'.
****************************xtc_draw_radio_field(' export', 'yes',true).EXPORT_YES.'
'.
****************************'
' . xtc_button(BUTTON_EXPORT) .
****************************xtc_button_link(BUTTON _CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=kelkoo')));
****}
****function check() {
******if (!isset($this->_check)) {
********$check_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_KELKOO_STATUS'");
********$this->_check = xtc_db_num_rows($check_query);
******}
******return $this->_check;
****}
****function install() {
******xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value,**configuration_group_id, sort_order, set_function, date_added) values ('MODULE_KELKOO_FILE', 'kelkoo.txt',**'6', '1', '', now())");
******xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value,**configuration_group_id, sort_order, set_function, date_added) values ('MODULE_KELKOO_STATUS', 'True',**'6', '1', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
}
****function remove() {
******xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
****}
****function keys() {
******return array('MODULE_KELKOO_STATUS','MODULE_KELKOO_FILE') ;
****}
**}
?>
Vielen Dank für die schnelle Antwort,
leider erscheint folgende Fehlermeldung beim Aufruf der XT-Module im Adminbereich:
Fatal error: Cannot redeclare class kelkoo in /srv/www/htdocs/web250/html/admin/includes/modules/export/kelkoo.php on line 41
Das erschien aber auch schon dann wenn ich an der ursprünglichen Kelkoo.php irgendeine Änderung versucht hatte!
by the way: von wo an zählt man die "Line" und zählt man die Leerzeilen mit?
Hallo voliere.net
nochmal Danke, das wars.
Ich benenne zur Sicherheit die zu ändernde Datei immer in alt...php oder so ähnlich um, damit ich im worst case Fall das original noch auf dem Server hab.
Jetzt gehts. :D
Schöne Grüße
Frank
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.