private function runHelloCashPull(&$messages) { if (!defined('HELLOCASH_SYNC_IN_PROGRESS')) { define('HELLOCASH_SYNC_IN_PROGRESS', true); } $token = trim($this->params->get('api_token', '')); if (empty($token)) { $messages[] = "FEHLER: Kein API-Token konfiguriert."; return; } $db = JFactory::getDbo(); // 1. Auto-Mapping ausführen $this->runBulkAutoMapping($token, $db, $messages); // 2. Alle Mappings aus der DB laden (product_id => hellocash_id) $query = $db->getQuery(true) ->select(array($db->quoteName('product_id'), $db->quoteName('hellocash_id'))) ->from($db->quoteName('#__hikashop_hellocash_map')); $db->setQuery($query); $mappings = $db->loadObjectList(); if (empty($mappings)) { $messages[] = "Keine verknüpften Artikel vorhanden."; return; } $hcToHikaMap = array(); foreach ($mappings as $m) { $hcToHikaMap[(int)$m->hellocash_id] = (int)$m->product_id; } $updatedCount = 0; $headers = array("Authorization: Bearer " . $token, "Accept: application/json"); // 3. Bestände seitenweise von helloCash abrufen (100 Artikel pro Request) for ($page = 1; $page <= 25; $page++) { $url = "https://api.hellocash.business/api/v2/articles?limit=100&page=" . $page; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode == 429) { usleep(1500000); $page--; continue; } if ($httpCode != 200 || empty($response)) { break; } $data = json_decode($response, true); $articles = isset($data['data']) ? $data['data'] : (is_array($data) ? $data : array()); if (empty($articles)) { break; } foreach ($articles as $art) { $hcId = isset($art['id']) ? (int)$art['id'] : 0; if ($hcId <= 0 || !isset($hcToHikaMap[$hcId])) { continue; } $stock = null; if (isset($art['stocks'])) $stock = (int)$art['stocks']; elseif (isset($art['stock'])) $stock = (int)$art['stock']; if ($stock !== null) { $pId = $hcToHikaMap[$hcId]; $updateQuery = $db->getQuery(true) ->update($db->quoteName('#__hikashop_product')) ->set($db->quoteName('product_quantity') . ' = ' . $stock) ->where($db->quoteName('product_id') . ' = ' . $pId); $db->setQuery($updateQuery); try { $db->execute(); $updatedCount++; } catch (Exception $e) {} } } if (count($articles) < 100) { break; } usleep(100000); } // Kompakte Erfolgsmeldung ohne unendliche Einzelausgaben $messages[] = "SYNC FERTIG: Insgesamt " . $updatedCount . " Artikelbestände von helloCash nach HikaShop synchronisiert."; } KOCHMESSER

G-Serie

169,00 € G-667/16 Messertasche für 16 Messer
194,00 € G-69 Schinken- Lachsmesser, 27cm flexibel
89,00 € G-74 Keramikstreicher, 22 cm
139,00 € G-75 Diamantstreicher, 25.5cm
169,00 € G-76 Wiegemesser
145,00 € G-77 (G-61) Kochmesser Kulle, 20 cm
259,00 € G-773889 Messerset, G-77, GS-38, GS-89
135,00 € G-79 (G-63) Kochmesser, Kulle, 16cm
145,00 € G-80 Santokumesser Kulle, 18cm
254,00 € G-80338 Messerset: G-80, GS-3, GS-38 (ehemals G-48338)
145,00 € G-81 Gemüsemesser Kulle, 18cm
145,00 € G-82 (G-67)Tranchiermesser, 21cm Kulle
269,00 € G-8311D Messerblock gepunktet
1.160,00 € G-8311KB/BDR 11-teiliges Messerblockset MIT Punkte
1.160,00 € G-8311KB/PLR 11-teiliges Messerblockset OHNE Punkte
269,00 € G-8311P Messerblock o. Punkte
194,00 € G-835BD Messerblock für 11 Teile
139,00 € G-84 (G-64)Santokumesser Kulle, 16 cm
242,00 € G-888D Messerblock gepunktet f. 8 Messer
945,00 € G-888KB/BDR 9-teiliges Messerblockset MIT Punkte
945,00 € G-888KB/PLR 9-teiliges Messerblockset OHNE Punkte
242,00 € G-888P Messerblock o. Punkte f. 8 Messer
26,00 € G-91/R Ersatzrollen für G-91/SB
69,00 € G-91/SB Wasserschleifer
286,00 € G-9211R Messerset: G-9R, G-2, GS-11
129,00 € G-9R Brotmesser, 22cm
192,00 € GKS-2210 Messerset mit Schere, G2 & GKS2

GF-Serie

109,00 € GF-24 Fleischgabel
154,00 € GF-27 Fleischermesser, 16cm
149,00 € GF-31 Ausbeinmesser steif, 16cm
169,00 € GF-32 Kochmesser, 16cm
189,00 € GF-33 Kochmesser, 21cm
219,00 € GF-34 Kochmesser, 27cm
233,00 € GF-35 Kochmesser, 30cm
189,00 € GF-36 Gemüsemesser, 20cm
177,00 € GF-37 Tranchiermesser, 22cm
149,00 € GF-40 Ausbeinmesser steif, 15cm

GN-Serie

163,00 € GN-001 Kochmesser 16 cm Kullenschliff
167,00 € GN-002 Kochmesser 20 cm Kullenschliff
147,00 € GN-004R Brotmesser 23 cm
147,00 € GN-005 Tranchiermesser 23 cm
167,00 € GN-006 Gemüsemesser 18 cm Kullenschliff
147,00 € GN-007 Santokumesser 18 cm
139,00 € GN-008 Kochmesser 16 cm
143,00 € GN-009 Kochmesser 20 cm
149,00 € GN-010 Kochmesser 26 cm

Ni-Serie

67,00 € GNFS-01 Schälmesser 9 cm
78,00 € GNFS-02 Universalmesser 11 cm
Ergebnisse 145 – 192 von 276