Esempio n. 1
0
 public function process()
 {
     parent::process();
     if (Module::isInstalled('agilesellershipping')) {
         include_once _PS_ROOT_DIR_ . "/modules/agilesellershipping/agilesellershipping.php";
         AgileSellerShipping::override_carriers();
     }
 }
 protected function _assignPayment()
 {
     if (Configuration::get('PS_EU_PAYMENT_API')) {
         return ParentOrderController::_assignPayment();
     } else {
         return parent::_assignPayment();
     }
 }
Esempio n. 3
0
 protected function _processAddressFormat()
 {
     if (!$this->isOpcModuleActive()) {
         return parent::_processAddressFormat();
     }
     $selectedCountry = (int) Configuration::get('PS_COUNTRY_DEFAULT');
     $address_delivery = new Address((int) $this->context->cart->id_address_delivery);
     $address_invoice = new Address((int) $this->context->cart->id_address_invoice);
     $inv_adr_fields = AddressFormat::getOrderedAddressFields((int) $address_delivery->id_country, false, true);
     $dlv_adr_fields = AddressFormat::getOrderedAddressFields((int) $address_invoice->id_country, false, true);
     $inv_all_fields = array();
     $dlv_all_fields = array();
     foreach (array('inv', 'dlv') as $adr_type) {
         foreach (${$adr_type . '_adr_fields'} as $fields_line) {
             foreach (explode(' ', $fields_line) as $field_item) {
                 ${$adr_type . '_all_fields'}[] = trim($field_item);
             }
         }
         $this->context->smarty->assign($adr_type . '_adr_fields', ${$adr_type . '_adr_fields'});
         $this->context->smarty->assign($adr_type . '_all_fields', ${$adr_type . '_all_fields'});
     }
 }