diff --git a/core/classes/Shop.php b/core/classes/Shop.php index fee19b960d2df4b90e80d38dccb897ff380d30de..9efc08f5ca2a3a63d5279f428ebc7070f0135f11 100644 --- a/core/classes/Shop.php +++ b/core/classes/Shop.php @@ -1,10 +1,8 @@ <?php class Shop{ public static function getAllProducts(){ - $itemConfig = Connexion::pdo()->query("SELECT itemConfig FROM qs_shops")->fetchAll(PDO::FETCH_ASSOC); - $items = yaml_parse($itemConfig); - print_r($items); - + $itemsConfig = Connexion::pdo()->query("SELECT itemConfig FROM qs_shops")->fetchAll(PDO::FETCH_ASSOC); + /* item: ==: org.bukkit.inventory.ItemStack @@ -13,7 +11,10 @@ public static function getAllProducts(){ */ $return = array(); - foreach($items as $item){ + foreach($itemsConfig as $itemConfig){ + $item = yaml_parse($itemConfig); + print_r($items); + $itemAleadyEntered = false; foreach($return as $checkItem){ if($item['item']['type'] == $checkItem->getId()){