/* Decoded by unphp.net */ db->query( "SELECT c.category_id, c.image FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.image != '' AND c2s.store_id = '" . (int) $data["store_id"] . "' ORDER BY c.sort_order" ); return $query->rows; } public function getProducts($data = []) { $query = $this->db->query( "SELECT p.product_id, p.image FROM " . DB_PREFIX . "product as p LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.image != '' AND p2s.store_id = '" . (int) $data["store_id"] . "'" ); return $query->rows; } public function getProductImages($product_id) { $query = $this->db->query( "SELECT pi.product_id, pi.image FROM " . DB_PREFIX . "product_image as pi WHERE pi.image != '' AND pi.product_id = '" . (int) $product_id . "' ORDER BY pi.sort_order ASC" ); return $query->rows; } public function getStores($store_id) { $store_data = $this->cache->get( "ekipisi.store" ); if (!$store_data) { $query = $this->db->query( "SELECT * FROM " . DB_PREFIX . "store WHERE store_id = " . (int) $store_id . " ORDER BY url" ); $store_data = $query->row; $this->cache->set( "ekipisi.store", $store_data ); } return $store_data; } } ?>