Example #1
0
 function __construct($stats_version, $ebay_profile)
 {
     if (!$ebay_profile) {
         return;
     }
     $this->stats_version = $stats_version;
     $this->id_ebay_profile = (int) $ebay_profile->id;
     $this->data = array('id' => sha1($this->_getDefaultShopUrl()), 'profile' => $ebay_profile->id, 'ebay_username' => sha1(Configuration::get('EBAY_IDENTIFIER')), 'ebay_site' => $ebay_profile->ebay_site_id, 'is_multishop' => version_compare(_PS_VERSION_, '1.5', '>') && Shop::isFeatureActive(), 'install_date' => Configuration::get('EBAY_INSTALL_DATE'), 'nb_listings' => EbayProduct::getNbProducts($ebay_profile->id), 'percent_of_catalog' => EbayProduct::getPercentOfCatalog($ebay_profile), 'nb_prestashop_categories' => EbayCategoryConfiguration::getNbPrestashopCategories($ebay_profile->id), 'nb_ebay_categories' => EbayCategoryConfiguration::getNbEbayCategories($ebay_profile->id), 'nb_optional_item_specifics' => EbayCategorySpecific::getNbOptionalItemSpecifics($ebay_profile->id), 'nb_national_shipping_services' => EbayShipping::getNbNationalShippings($ebay_profile->id), 'nb_international_shipping_services' => EbayShipping::getNbInternationalShippings($ebay_profile->id), 'date_add' => date('Y-m-d H:i:s'), 'Configuration' => EbayConfiguration::getAll($ebay_profile->id, array('EBAY_PAYPAL_EMAIL')), 'impact_price' => EbayCategoryConfiguration::getImpactPrices($ebay_profile->id), 'return_policy' => $ebay_profile->getReturnsPolicyConfiguration()->ebay_returns_description == '' ? 0 : 1, 'ps_version' => _PS_VERSION_);
     $this->date_add = date('Y-m-d H:i:s');
 }