Jump to content

Joby

Members
  • Content count

    16
  • Joined

  • Last visited

Profile Information

  • Real Name
    Joachim Prestele
  1. This I can't also select the Icons for select tabs and unselect tabs. Think I must again go through the whole installation. Regards Joachim
  2. Have nothing more Added. Is purely a basic installation with accordion_categories_menu_1.2 But a basic installation 2.3.3 It works not with 2.3.3? Regards Joachim
  3. Hello Jim Thanks for the answer. I can not post the URL It is installed on a local server for test. In what file should the wrong code be. I can post the code. otherwise I'll have to make the installation online Regards Joachim
  4. Sorry for my english: o) Have the addon installed. The layout of the menu is not right. See image. Can not find the reason for the incorrect display. Does anyone have a clue for me. Regards Joachim
  5. Hallo Jim, Unfortunately, it still does not work. Now I get the following error. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/xxx/xxx/xxx/preisroboter2.php on line 158 will probably be here while($row = mysql_fetch_array($res)) Here again the entire code. /* Preisroboter v2 PHP Export Script */ /* Artikel-Nr.*|Artikelname*|Preis*|Deeplink*|Bild-URL|Kurzbeschreibung|Versandkosten|Lieferzeit|EAN|PZN|Hst.-Art.-Nr.|Hersteller */ require_once('includes/configure.php'); require('includes/application_top.php'); //Hier NICHTS verändern! $host_osc = DB_SERVER; $db_osc = DB_DATABASE; $usr_osc = DB_SERVER_USERNAME; $pwd_osc = DB_SERVER_PASSWORD; $cat = DIR_WS_HTTP_CATALOG; $server = HTTP_SERVER; $imagepath = $server.$cat.DIR_WS_IMAGES; $detailpage = $server.$cat."product_info.php?products_id="; $prdatei = 'preisroboter.txt'; // Hier bitte Anpassungen vornehmen: $export_typ = 0; // 0 == Aufruf per CronJob (Ausgabe in txt-Datei); 1 == Direkter Aufruf (Ausgabe auf Bildschirm) // Hinweis: Wenn mehr als 5000 Produkte in der Datenbank vohanden sind, sollte der Aufruf per Cronjob (wenn möglich) bevorzugt werden! $lang_id = 2; // SprachID, Standard ist 2 (deutsch) $exclude = 0; // Produkte, die als "nicht vorrätig" eingestellt sind, mit ausgeben?(0 = JA, 1 = NEIN) $lz_na = "nicht Lieferbar"; // Lieferzeit in Tagen, für "nicht vorrätig" Zahlwerte bitte OHNE Hochkomma angeben: z.B. $lz_na = 9; (entspricht 9 Tagen) $lz_normal = "keine Angaben"; // Standard-Lieferzeit; für Text bitte wie folgt ändern: z.B.: $lz_normal = "sofort lieferbar"; Zahlen ohne Hochkomma angeben! $limit = 0; $limit_step = 1000; // Gruppengröße, in der die Produkte gelesen werden /* AB HIER BITTE NICHTS MEHR ÄNDERN */ function clear_descr($descr) //(säubert die beschreibung) { $descr=str_replace("\n"," ",$descr); //Zeilenumbruch entfernen $descr=str_replace("\r","",$descr); //CR entfernen $descr=str_replace('|',' ',$descr); // | entfernen $descr=strip_tags($descr); //HTML entfernen if(strlen($descr) < 500) { $descr = $descr." "; } else if(strlen($descr) > 500) { $descr = substr($descr,0,500); $pos = strrpos($descr," "); $descr = substr($descr,0,$pos)." ..."; } return $descr; } function clear_name($name) //(säubert den namen) { $name=str_replace('|',' ',$name); // | entfernen $name=strip_tags($name); // HTML entfernen $name=htmlspecialchars($name,ENT_QUOTES); return $name; } function calc_price($row) // berechnet den Preis (inkl MwSt) { if ($sonderpr=tep_get_products_special_price($row['products_id'])){ $price=$sonderpr; }else{ $price=$row['products_price']; } $tax=(100+tep_get_tax_rate($row['products_tax_class_id']))/100; $price=number_format($price*$tax,2,".",""); //Preis formatieren und 16% MwSt. draufrechnen return $price; } function make_link($id) // Gibt Link zur Seite des Produktes zurück { global $detailpage; return $detailpage.$id; } function make_imglink($img) // Gibt Bilder-Link des Produktes zurück { global $imagepath; if($img <> "") return $imagepath.$img; else return " "; } function check_lzeit($zeit) { if(is_string($zeit)) { return $zeit; } else if(is_int($zeit)) { if($zeit == 1) { return $zeit." Tag";} else { return $zeit." Tage";} } } function make_lzeit($status) // gibt lieferzeit in Tagen zurück (4 Tage, 12 Tage, etc) { global $lz_na,$lz_normal; if($status == 0) $lz = check_lzeit($lz_na); else if($status == 1) $lz = check_lzeit($lz_normal); return $lz; } function get_ean($ean) // Gibt evtl vorhandene EAN zurück { if($ean <> "") return $ean; else return ""; } function check_val($val) // Prüft ob Wert vorhanden und gibt in dem Fall den Wert zurück { if($val <> "") return $val; } (USE_PCONNECT == true) ? $con = mysql_connect($host_osc, $usr_osc, $pwd_osc) or die("Keine Verbindung zur Datenbank möglich") : $con = mysql_pconnect($host_osc, $usr_osc, $pwd_osc) or die("Keine Verbindung zur Datenbank möglich"); mysql_select_db($db_osc, $con); $sql = "SELECT count(*) FROM products"; $res2 = mysql_query($sql,$con); $cnt = mysql_fetch_row($res2); $count = $cnt[0]; $count2 = $cnt[0]; $x = 0; if($count > $limit_step) { $x = floor($count/$limit_step); } for($i=0;$i<=$x;$i++) { $limit = ($i * $limit_step); if($exclude) { $sql = "SELECT p.products_status, p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, m.manufacturers_name ". "FROM products p ". "LEFT JOIN products_description pd ON p.products_id=pd.products_id ". "LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id ". "left join products_images pi on p.products_id = pi.products_id and pi.category_page = '1',". "WHERE pd.language_id=".$lang_id." AND p.products_status > 0 ". "LIMIT $limit,$limit_step"; } else { $sql = "SELECT p.products_status, p.products_id, p.products_model, pi.image_filename, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, m.manufacturers_name ". "FROM products p ". "LEFT JOIN products_description pd ON p.products_id=pd.products_id ". "LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id ". "LEFT JOIN products_images pi on pi.products_id = pi.products_id and pi.category_page = '1',". "left join products_images pi on p.products_id = pi.products_id and pi.category_page = '1',". "WHERE pd.language_id=".$lang_id." ". "LIMIT $limit, $limit_step"; } $res = mysql_query($sql,$con); if($export_typ == 0) { $fp = fopen ($prdatei, 'w' ); flock($fp,2); } while($row = mysql_fetch_array($res)) { $artikel['nr'] = $row['products_id']; $artikel['name'] = clear_name($row['products_name']); $artikel['preis'] = calc_price($row); $artikel['link'] = make_link($row['products_id']); $artikel['imglink'] = make_imglink($row['image_filename']); $artikel['descr'] = clear_descr($row['products_description']); $artikel['versand'] = ''; // von OSC _NICHT_ unterstützt, deshalb leer! $artikel['lieferzeit'] = make_lzeit($row['products_status']); $artikel['ean'] = get_ean($row['products_ean']); // von OSC _NICHT_ unterstützt, deshalb leer! $artikel['pzn'] = check_val($row['products_pzn']); $artikel['hstartnr'] = check_val($row['products_hst_art_nr']); $artikel['hst'] = check_val($row['manufacturers_name']); $export = $artikel['nr'] ."|". $artikel['name']."|". $artikel['preis'] ."|". $artikel['link'] ."|". $artikel['imglink'] ."|". $artikel['descr'] ."|". $artikel['versand'] ."|". $artikel['lieferzeit'] ."|". $artikel['ean'] ."|". $artikel['pzn'] ."|". $artikel['hstartnr'] ."|". $artikel['hst'] ."\n"; if($export_typ == 1) echo $export; else if($export_typ == 0) fwrite($fp,$export); } if($export_typ == 0) { flock($fp,3); fclose($fp); } }; ?> Would not somewhere in the database query the Tabell prodacts_image and the field image_filename be contained? Regards Jo
  6. Thanks for the support. I made the changes. But now I get the error message Parse error: syntax error, unexpected T_STRING in /var/www/html/XXX/XXX/XXX/preisroboter2.php on line 133 Have your line left join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.category_page = '1', modified with quote "left join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.category_page = '1',". But the syntax does not seem quite right. Su Can you please look at the syntax? I still do not understand enough of it. I need not also the changes in the lines 138 and 141? Regards Jo
  7. This is the script <?PHP /* Preisroboter v2 PHP Export Script */ /* Artikel-Nr.*|Artikelname*|Preis*|Deeplink*|Bild-URL|Kurzbeschreibung|Versandkosten|Lieferzeit|EAN|PZN|Hst.-Art.-Nr.|Hersteller */ require_once('includes/configure.php'); require('includes/application_top.php'); //Hier NICHTS verändern! $host_osc = DB_SERVER; $db_osc = DB_DATABASE; $usr_osc = DB_SERVER_USERNAME; $pwd_osc = DB_SERVER_PASSWORD; $cat = DIR_WS_HTTP_CATALOG; $server = HTTP_SERVER; $imagepath = $server.$cat.DIR_WS_IMAGES; $detailpage = $server.$cat."product_info.php?products_id="; $prdatei = 'preisroboter.txt'; // Hier bitte Anpassungen vornehmen: $export_typ = 0; // 0 == Aufruf per CronJob (Ausgabe in txt-Datei); 1 == Direkter Aufruf (Ausgabe auf Bildschirm) // Hinweis: Wenn mehr als 5000 Produkte in der Datenbank vohanden sind, sollte der Aufruf per Cronjob (wenn möglich) bevorzugt werden! $lang_id = 2; // SprachID, Standard ist 2 (deutsch) $exclude = 0; // Produkte, die als "nicht vorrätig" eingestellt sind, mit ausgeben?(0 = JA, 1 = NEIN) $lz_na = "nicht Lieferbar"; // Lieferzeit in Tagen, für "nicht vorrätig" Zahlwerte bitte OHNE Hochkomma angeben: z.B. $lz_na = 9; (entspricht 9 Tagen) $lz_normal = "keine Angaben"; // Standard-Lieferzeit; für Text bitte wie folgt ändern: z.B.: $lz_normal = "sofort lieferbar"; Zahlen ohne Hochkomma angeben! $limit = 0; $limit_step = 1000; // Gruppengröße, in der die Produkte gelesen werden /* AB HIER BITTE NICHTS MEHR ÄNDERN */ function clear_descr($descr) //(säubert die beschreibung) { $descr=str_replace("\n"," ",$descr); //Zeilenumbruch entfernen $descr=str_replace("\r","",$descr); //CR entfernen $descr=str_replace('|',' ',$descr); // | entfernen $descr=strip_tags($descr); //HTML entfernen if(strlen($descr) < 500) { $descr = $descr." "; } else if(strlen($descr) > 500) { $descr = substr($descr,0,500); $pos = strrpos($descr," "); $descr = substr($descr,0,$pos)." ..."; } return $descr; } function clear_name($name) //(säubert den namen) { $name=str_replace('|',' ',$name); // | entfernen $name=strip_tags($name); // HTML entfernen $name=htmlspecialchars($name,ENT_QUOTES); return $name; } function calc_price($row) // berechnet den Preis (inkl MwSt) { if ($sonderpr=tep_get_products_special_price($row['products_id'])){ $price=$sonderpr; }else{ $price=$row['products_price']; } $tax=(100+tep_get_tax_rate($row['products_tax_class_id']))/100; $price=number_format($price*$tax,2,".",""); //Preis formatieren und 16% MwSt. draufrechnen return $price; } function make_link($id) // Gibt Link zur Seite des Produktes zurück { global $detailpage; return $detailpage.$id; } function make_imglink($img) // Gibt Bilder-Link des Produktes zurück { global $imagepath; if($img <> "") return $imagepath.$img; else return " "; } function check_lzeit($zeit) { if(is_string($zeit)) { return $zeit; } else if(is_int($zeit)) { if($zeit == 1) { return $zeit." Tag";} else { return $zeit." Tage";} } } function make_lzeit($status) // gibt lieferzeit in Tagen zurück (4 Tage, 12 Tage, etc) { global $lz_na,$lz_normal; if($status == 0) $lz = check_lzeit($lz_na); else if($status == 1) $lz = check_lzeit($lz_normal); return $lz; } function get_ean($ean) // Gibt evtl vorhandene EAN zurück { if($ean <> "") return $ean; else return ""; } function check_val($val) // Prüft ob Wert vorhanden und gibt in dem Fall den Wert zurück { if($val <> "") return $val; } (USE_PCONNECT == true) ? $con = mysql_connect($host_osc, $usr_osc, $pwd_osc) or die("Keine Verbindung zur Datenbank möglich") : $con = mysql_pconnect($host_osc, $usr_osc, $pwd_osc) or die("Keine Verbindung zur Datenbank möglich"); mysql_select_db($db_osc, $con); $sql = "SELECT count(*) FROM products"; $res2 = mysql_query($sql,$con); $cnt = mysql_fetch_row($res2); $count = $cnt[0]; $count2 = $cnt[0]; $x = 0; if($count > $limit_step) { $x = floor($count/$limit_step); } for($i=0;$i<=$x;$i++) { $limit = ($i * $limit_step); if($exclude) { $sql = "SELECT p.products_status, p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, m.manufacturers_name ". "FROM products p ". "LEFT JOIN products_description pd ON p.products_id=pd.products_id ". "LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id ". "WHERE pd.language_id=".$lang_id." AND p.products_status > 0 ". "LIMIT $limit,$limit_step"; } else { $sql = "SELECT p.products_status, p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, m.manufacturers_name ". "FROM products p ". "LEFT JOIN products_description pd ON p.products_id=pd.products_id ". "LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id ". "WHERE pd.language_id=".$lang_id." ". "LIMIT $limit, $limit_step"; } $res = mysql_query($sql,$con); if($export_typ == 0) { $fp = fopen ($prdatei, 'w' ); flock($fp,2); } while($row = mysql_fetch_array($res)) { $artikel['nr'] = $row['products_id']; $artikel['name'] = clear_name($row['products_name']); $artikel['preis'] = calc_price($row); $artikel['link'] = make_link($row['products_id']); $artikel['imglink'] = make_imglink($row['products_image']); $artikel['descr'] = clear_descr($row['products_description']); $artikel['versand'] = ''; // von OSC _NICHT_ unterstützt, deshalb leer! $artikel['lieferzeit'] = make_lzeit($row['products_status']); $artikel['ean'] = get_ean($row['products_ean']); // von OSC _NICHT_ unterstützt, deshalb leer! $artikel['pzn'] = check_val($row['products_pzn']); $artikel['hstartnr'] = check_val($row['products_hst_art_nr']); $artikel['hst'] = check_val($row['manufacturers_name']); $export = $artikel['nr'] ."|". $artikel['name']."|". $artikel['preis'] ."|". $artikel['link'] ."|". $artikel['imglink'] ."|". $artikel['descr'] ."|". $artikel['versand'] ."|". $artikel['lieferzeit'] ."|". $artikel['ean'] ."|". $artikel['pzn'] ."|". $artikel['hstartnr'] ."|". $artikel['hst'] ."\n"; if($export_typ == 1) echo $export; else if($export_typ == 0) fwrite($fp,$export); } if($export_typ == 0) { flock($fp,3); fclose($fp); } }; ?> I know with php and mysql is not good enough out to change that. Can you help me? Regards Jo
  8. Sorry if I have not made myself clear. The images in the catalog are visible to all. The problem is the download of product data to external. Their scripts all rely on prodacts_image. Thus they get no more pictures to the new articles. This is bad. Have tried to adapt the scripts. But come there no further. Would not it be possible to save an new image in both of this table fields? Regards Jo
  9. Hello Jim, I installed more_pics_advanced_2.0.6 in a new shop. In the admin / categories.php for the products_image input is the feld removed. Thus, in the products table the column products_image is always empty. You have the pictures now in the table prodacts_images in the column image_filename. With the install.php be accepted while the already existing images. But when I enter new articles products_image is logically empty. Is this accurate? Now to my problem. Now when I export the product data for display, for example Preisroboter.de I get there no more pictures. How can I get into the old table field again the picture? All scripts adapt the query is too costly and difficult. Regarts Jo
  10. Yes. You have once again right. :rolleyes: 5 hours strings cut and assembled and already is. HeaderTags_SEO and More_Pics are not necessarily easy to connect. :blink: At least for laymen like me. Regards Joachim
  11. I think I am now a bit too stupid for that. what do you mean? A change in the database? Or select string in the above? My English is not so good! Did not notice this in the How_to_use or Read_me recognized. Could you tell me precisely what I must edit? Regards Joachim
  12. Hello Jim After installing more_pics_advanced_2.0.6 no product can now be changed. Get the following error in the admin Have more_pics_advanced_2.0.6 installed. phpMyAdmin with the database.sql loaded. install.php called. (Basic store and shop with other addons tested) Is even one mistake. What is wrong? I have found here in Tread on page 48 the following
  13. Thanks Jim So now I must learn a little PHP. How to get involved there for i = 1 to 8 or something similar. :rolleyes: Think it takes a few weeks now. :lol: Regards Joby
  14. Hello Jim Thanks for the quick reply. have changed CSS Format to false But this is not good for the Users. Too confusing. Too many large pictures. And I get in the popup window following error: 1054 - Unknown column 'category_page' in 'where clause' select products_name from products_description where products_id = '68' and category_page = '0' and product_page = '0' and language_id = '2' [TEP STOP] Where can I find the script lines, which creates the single column or a single row for the small images. It would be conceivable an IF statement or similar to integrate, what after (x) images, a new colum or row begins. (a nice look would also around the big picture :rolleyes: :blush: ) Regards Joby
  15. English is not my language. Nevertheless hope that I understood expressions. Have More pics 2.0.3 installed. There have a problem with the sub-images. If I really believe you can in the admin with the recruitment of Number of columns and Number of rows to display images of the sub-set. Is that so? But I had 37 sub-images in a column. Need more columns and rows. see Picture Where can be the problem? Or are the settings not for the sub-images? Where can I change the script then, to get multiple rows and columns to produce? Thanks for help. Joby
×