isValid()==true) { $feedback = Mage::helper('ekomimeetsmage/feedback'); return $feedback->getFeedbacks(Mage::registry('current_product'), $limit); } return new Varien_Data_Collection(); } /** * Returns if the store is configured * * @return boolean */ public function isValid() { $data = Mage::helper('ekomimeetsmage'); $api = Mage::helper('ekomimeetsmage/api_data'); $isValid = false; if ($data->getStoreType() == "singlestore") { $apiData = $api->fetch(); $isValid = ($apiData["api_status"] == 1) ? true : false; } elseif ($data->getStoreType() == "multistore") { $apiData = $api->fetch(Mage::app()->getStore()->getId()); $isValid = ($apiData["api_status"] == 1) ? true : false; } return $isValid; } /** * Is multi store * * @return boolean */ public function isMultiStore() { return Mage::helper('ekomimeetsmage')->isMultistore(); } }