Пример #1
0
 public function __construct()
 {
     parent::__construct();
     $this->config = new DpdGroupConfiguration();
     if ($this->config->dpd_country_select == DpdGroupConfiguration::OTHER_COUNTRY) {
         $url = $this->config->production_mode ? $this->config->ws_production_url : $this->config->ws_test_url;
     } else {
         require_once _DPDGROUP_CONTROLLERS_DIR_ . 'Configuration.controller.php';
         $configuration_controller = new DpdGroupConfigurationController();
         $configuration_controller->setAvailableCountries();
         $mode = $this->config->production_mode ? 'ws_uri_prod' : 'ws_uri_test';
         $url = isset($configuration_controller->countries[$this->config->dpd_country_select][$mode]) ? $configuration_controller->countries[$this->config->dpd_country_select][$mode] : '';
     }
     if (!$url) {
         self::$errors[] = $this->l('Wrong WebServices URL');
         return null;
     }
     $this->params = array('wsUserName' => $this->config->ws_username, 'wsPassword' => $this->config->ws_password, 'wsLang' => $this->context->language->iso_code, 'applicationType' => self::APPLICATION_TYPE);
     try {
         ini_set('soap.wsdl_cache_enabled', '0');
         ini_set('soap.wsdl_cache', '0');
         $opts = array('ssl' => array('verify_peer' => false, 'verify_peer_name' => false));
         $url .= $this->service_name . '?wsdl';
         $this->client = new SoapClient($url, array('stream_context' => stream_context_create($opts), 'connection_timeout' => (int) $this->config->ws_timeout, 'trace' => true));
         return $this->client;
     } catch (Exception $e) {
         self::$errors[] = $e->getMessage();
     }
     return null;
 }
Пример #2
0
 public function __construct()
 {
     parent::__construct();
     $this->cookie = new Cookie(_DPDGROUP_COOKIE_);
 }
Пример #3
0
 public function __construct()
 {
     parent::__construct();
     $this->init();
 }
Пример #4
0
 public function __construct()
 {
     parent::__construct();
     $this->csv_titles = array('country' => $this->l('Country'), 'region' => $this->l('Region / State'), 'zip' => $this->l('Zip / Postal Code'), 'weight_from' => $this->l('Weight / Price (From)'), 'weight_to' => $this->l('Weight / Price (To)'), 'shipping_price' => $this->l('Shipping Price'), 'shipping_price_percentage' => $this->l('Shipping Price Percentage'), 'currency' => $this->l('Currency'), 'method_id' => $this->l('Method ID'), 'cod_surcharge' => $this->l('COD Surcharge'), 'cod_surcharge_percentage' => $this->l('COD Surcharge Percentage'), 'cod_min_surcharge' => $this->l('COD Min. Surcharge'));
 }
Пример #5
0
 public function __construct()
 {
     parent::__construct();
     $this->csv_titles = array('id_postcode' => $this->l('ID'), 'postcode' => $this->l('Postcode'), 'region' => $this->l('Region'), 'city' => $this->l('City'), 'address' => $this->l('Address'));
 }