Jump to content
xt:Commerce Community Forum

[SOLVED] external_id an Afterbuy


ripley_one

Recommended Posts

  • 3 weeks later...

klappt leider nicht.

folgender Fehler:

Fehler bei Übermittelung an Afterbuy:

<?xml version="1.0" encoding="iso-8859-1" ?><result> <success>0</success> <errorlist><error>Bitte geben Sie einen Wert im Feld Artikelnr_1 an.</error><error>Bitte geben Sie einen Wert im Feld Artikelnr_2 an.</error> </errorlist></result>

vielleicht wird die external_id gar nicht übergeben?!

Link to comment
Share on other sites

In der class.xt_afterbuy.php

folgende Zeile

/* Get ordered products */
$result_products = $this->db->Execute("SELECT op.*, p.`products_weight` FROM `".TABLE_ORDERS_PRODUCTS."` as op LEFT JOIN `".TABLE_PRODUCTS."` as p ON (op.`products_id`=p.`products_id`) WHERE op.`orders_id`='".intval($this->order_id)."'");[/PHP]

ändern in

[PHP]/* Get ordered products */
$result_products = $this->db->Execute("SELECT op.*, p.`products_weight`, p.`external_id` FROM `".TABLE_ORDERS_PRODUCTS."` as op LEFT JOIN `".TABLE_PRODUCTS."` as p ON (op.`products_id`=p.`products_id`) WHERE op.`orders_id`='".intval($this->order_id)."'");[/PHP]

Link to comment
Share on other sites

Einwandfrei!!! SUPER! Tausend Dank an die Helferlein! :D :D :D :D

Hier nochmal zum Mitschreiben:

In der Datei class.xt_afterbuy.php (zu finden in plugins/xt_afterbuy/classes)

Suchen:

/* Get ordered products */
$result_products = $this->db->Execute("SELECT op.*, p.`products_weight` FROM `".TABLE_ORDERS_PRODUCTS."` as op LEFT JOIN `".TABLE_PRODUCTS."` as p ON (op.`products_id`=p.`products_id`) WHERE op.`orders_id`='".intval($this->order_id)."'");[/PHP]

und ersetzen durch:

[PHP]/* Get ordered products */
$result_products = $this->db->Execute("SELECT op.*, p.`products_weight`, p.`external_id` FROM `".TABLE_ORDERS_PRODUCTS."` as op LEFT JOIN `".TABLE_PRODUCTS."` as p ON (op.`products_id`=p.`products_id`) WHERE op.`orders_id`='".intval($this->order_id)."'"); [/PHP]

suchen:

[PHP]$this->data['Artikelnr_'.$number] = $products_data['products_id'];[/PHP]

ersetzen durch:

[PHP]$this->data['Artikelnr_'.$number] = $products_data['external_id'];[/PHP]

FERTIG.

Link to comment
Share on other sites

Archived

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

×
  • Create New...