public function _construct()
 {
     parent::_construct();
     $this->_init('webpos/posorder');
     $this->_resource = Mage::getResourceSingleton('core/resource');
     $magentoVersion = Mage::getVersion();
     //vietdq fix checkout 1.5
     if (version_compare($magentoVersion, '1.5', '>=') && version_compare($magentoVersion, '1.6', '<')) {
         $this->_adapter = Mage::getSingleton('core/resource')->getConnection('core_read');
     } else {
         $this->_adapter = $this->_resource->getReadConnection();
     }
 }
 /**
  * DB1_AnyMarket_Helper_CustomerGenerator constructor.
  */
 public function __construct()
 {
     $this->_resource = Mage::getResourceSingleton('core/resource');
     $this->_adapter = $this->_resource->getReadConnection();
 }
 /**
  * Generate supported commands and its class methods
  * Sort supported commands by their priority to order them for execution
  *
  * Instantiate core resource model and get read connection
  * Determine Magento version and check if it is supported by system report tool
  */
 public function __construct()
 {
     $this->_magentoVersion = Mage::getVersion();
     if (version_compare($this->_magentoVersion, self::REPORT_EARLIEST_SUPPORTED_MAGENTO_VERSION, '<')) {
         Mage::throwException(Mage::helper('enterprise_support')->__('You are running the sysreport tool on Magento Enterprise Edition %s. This version of Magento is currently not compatible with the tool.', $this->_magentoVersion));
     }
     foreach ($this->_supportedCommands as $key => $info) {
         // Set default priority for command
         if (!array_key_exists($key, $this->_commandPriorities)) {
             $this->_supportedCommands[$key]['priority'] = self::REPORT_COMMAND_DEFAULT_PRIORITY;
         } else {
             $this->_supportedCommands[$key]['priority'] = $this->_commandPriorities[$key];
         }
     }
     uasort($this->_supportedCommands, array(__CLASS__, 'commandPriorityCompare'));
     $this->_resourceModel = Mage::getResourceSingleton('enterprise_support/sysreport');
     $this->_readConnection = $this->_resourceModel->getReadConnection();
 }