public function __construct(array $params = array(), array $listingsProducts)
 {
     $defaultParams = array('status_changer' => Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_UNKNOWN);
     $params = array_merge($defaultParams, $params);
     if (isset($params['logs_action_id'])) {
         $this->logsActionId = (int) $params['logs_action_id'];
         unset($params['logs_action_id']);
     } else {
         $this->logsActionId = Mage::getModel('M2ePro/Listing_Log')->getNextActionId();
     }
     if (count($listingsProducts) == 0) {
         throw new Ess_M2ePro_Model_Exception('Product Connector has received empty array');
     }
     foreach ($listingsProducts as $listingProduct) {
         if (!$listingProduct instanceof Ess_M2ePro_Model_Listing_Product) {
             throw new Ess_M2ePro_Model_Exception('Product Connector has received invalid Product data type');
         }
     }
     $translationData = $listingsProducts[0]->getSetting('additional_data', array('translation_service'), array());
     $tempSourceLanguage = $translationData['from']['language'];
     $tempTargetLanguage = $translationData['to']['language'];
     $tempService = $listingsProducts[0]->getTranslationService();
     $tempListing = $listingsProducts[0]->getListing();
     foreach ($listingsProducts as $listingProduct) {
         if ($tempListing->getId() != $listingProduct->getListing()->getId()) {
             throw new Ess_M2ePro_Model_Exception('Product Connector has received Products from different Listings');
         }
         $translationData = $listingProduct->getSetting('additional_data', array('translation_service'), array());
         if ($tempSourceLanguage != $translationData['from']['language']) {
             throw new Ess_M2ePro_Model_Exception('Product Connector has received Products from different
                 source languages');
         }
         if ($tempTargetLanguage != $translationData['to']['language']) {
             throw new Ess_M2ePro_Model_Exception('Product Connector has received Products from different
                 target languages');
         }
         if ($tempService != $listingProduct->getTranslationService()) {
             throw new Ess_M2ePro_Model_Exception('Product Connector has received Products from different
                 Translation Services');
         }
     }
     parent::__construct($params, $listingsProducts[0]->getListing()->getAccount());
     $this->marketplace = $listingsProducts[0]->getListing()->getMarketplace();
     $listingsProducts = $this->filterLockedListingsProducts($listingsProducts);
     $listingsProducts = $this->prepareListingsProducts($listingsProducts);
     $this->listingsProducts = array_values($listingsProducts);
 }