Hallo zusammen,
ich bin gerade dabei auf die Shop-API umzustellen (würde ich gern!!!).
Ich teste den Zugriff mit Postman. Allerdings liefert mir nur die function
"function": "getManufacturers",
ein Ergebnis. Die "function": "getCategories", und "function": "getArticles", liefern bei mir ein leeres Result - empty.
Version 6.1.1 - Multishop, aktuelle xtcAPI.
{
"function": "getManufacturers",
"paras": {
"user": "*****",
"pass": "*****",
"start":0,
"size":50,
"extNumberRange":0
}
}
funktioniert.
{
"function": "getCategories",
"paras": {
"user": "*****",
"pass": "*****",
"start":"1",
"blocksize":"10"
}
}
gibt nichts zurück.
?????
Vielen Dank im Voraus.
Michael
Ich hab jetzt folgendes ermittelt.
Es liegt an dem Aufruf von
// Infos über alle stores holen
$stores = $store_handler->getStores();
in getArticles.php...
Ich nehme mal an, dass das die Funktion in class.multistore.php ist.
function getStores()
{
global $db, $xtPlugin;
$where = '';
($plugin_code = $xtPlugin->PluginCode(__CLASS__ . ':getStores_top')) ? eval($plugin_code) : false;
static $cache = array();
$hash = $where; //crc32($where);
if(!array_key_exists($hash, $cache))
{
$rs = $db->CacheExecute("SELECT * FROM " . TABLE_MANDANT_CONFIG . " " . $where . " ORDER BY shop_id ASC");
$data = array();
while (!$rs->EOF)
{
$data[] = array(
'id' => $rs->fields['shop_id'],
'text' => $rs->fields['shop_ssl_domain'],
'status' => $rs->fields['shop_status']
);
$rs->MoveNext();
}
$rs->Close();
$cache[$hash] = $data;
}
$data = $cache[$hash]; // to be compatible for old code using the next hook
($plugin_code = $xtPlugin->PluginCode(__CLASS__ . ':getStores_bottom')) ? eval($plugin_code) : false;
return $data;
}
to be continue.....