Jump to content
xt:Commerce Community Forum

Problem: Artikel-Import per SQL


Recommended Posts

Hallo,

ich versuche zurzeit Artikel mittels SQL-Befehl einzupflegen. Mein Ziel wäre z.B. täglich Daten von einer Warenwitschaft in den Shop zu importieren.

Dafür habe ich den SQL-Befehl bereits fertig und abgeschickt. Ich sehe nun die Daten auch im Backend, mit allen Details (Preis, Artikelnummer, Status = 1, Bezeichnung, Zuordnung zu Kategorie, usw.).

Und trotzdem werden mir Daten im Shop selber nicht angezeigt.

-> Bearbeite ich nun den Artikel im Backend und speichere ihn (selbst wenn ich eigentlich nichts ändere), ist der Artikel auch im Shop zu finden.

Wo liegt hier der Fehler? :confused:

Hier ist der SQL-Befehl:

-----------------------------------------------------

// Eintrag in Artikel-Tabelle

INSERT INTO xt_products

(products_id, external_id, permission_id,

products_owner, products_ean, products_quantity,

products_average_quantity, products_shippingtime,

products_model, products_master_model, products_master_flag,

products_option_template, products_option_list_template, price_flag_graduated_all,

price_flag_graduated_1, price_flag_graduated_2, price_flag_graduated_3,

products_sort, products_image, products_price, date_added,

last_modified, date_available, products_weight,

products_status, products_tax_class_id, product_template,

product_list_template, manufacturers_id, products_ordered,

products_fsk18, products_vpe, products_vpe_status,

products_vpe_value, products_startpage, products_startpage_sort,

products_average_rating, products_rating_count, products_digital,

flag_has_specials, products_serials)

VALUES

(0, NULL, 3, 1, '', 1000.00, 100, 0, 'XT0003', NULL, 0, NULL, NULL, 0, 0, 0, 0, 0, '', 833.3333, '0000-00-00 00:00:00', '2010-01-01 00:00:00', NULL, 1.500, 1, 1, '', '', 5, 0, 0, 0, 0, 0.0000, 0, 0, 0.0000, 0, 0, 0, 0);

// Eintrag für Beschreibung in 'de' un 'en'

INSERT INTO xt_products_description

(products_id,language_code,products_name, products_description, products_short_description, products_keywords, products_url)

VALUES( (SELECT MAX(products_id) from xt_products),'de','LCD-TV 15 Zoll','sehr kleiner, kompakter und tragbarer TV','','','');

INSERT INTO xt_products_description

(products_id,language_code,products_name, products_description, products_short_description, products_keywords, products_url)

VALUES( (SELECT max(products_id) from xt_products),'en','LCD-TV 15 Zoll','very small, compact an portable TV','','','');

// Eintrag Zuweisung Artikel - Kategorie

INSERT INTO xt_products_to_categories

(products_id, categories_id, master_link)

VALUES ( (SELECT max(products_id) from xt_products), 3,0);

Vielleicht kann mir jemand helfen.

LG

Link to comment
Share on other sites

  • 9 months later...

Hallo! Ich stehe im Moment vor dem selben Problem, hast du hier eventuell schon eine Lösung gefunden?

Leider nein. :( Ich habe es im Endeffekt über die Standardimport-Schnittstelle gelöst.

D.h. eine CSV-Datei mit den entsprechenden Feldern unter /export abgelegt und mittels dem Befehl cronjob.php?api=csv_import&id=_DEINE_ID_ importiert.

Für eine passende Importdatei kannst du dir vorher eine export-datei erstellen lassen.

LG

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...