/admin/controller/setting/setting.php

https://gitlab.com/reclamare/mao · PHP · 1184 lines · 990 code · 193 blank · 1 comment · 274 complexity · 64144c2154de588538cf9f75d054c124 MD5 · raw file

  1. <?php
  2. class ControllerSettingSetting extends Controller {
  3. private $error = array();
  4. public function index() {
  5. $this->load->language('setting/setting');
  6. $this->document->setTitle($this->language->get('heading_title'));
  7. $this->load->model('setting/setting');
  8. if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
  9. $this->model_setting_setting->editSetting('config', $this->request->post);
  10. if ($this->config->get('config_currency_auto')) {
  11. $this->load->model('localisation/currency');
  12. $this->model_localisation_currency->refresh();
  13. }
  14. $this->session->data['success'] = $this->language->get('text_success');
  15. $this->response->redirect($this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL'));
  16. }
  17. $data['heading_title'] = $this->language->get('heading_title');
  18. $data['text_edit'] = $this->language->get('text_edit');
  19. $data['text_enabled'] = $this->language->get('text_enabled');
  20. $data['text_disabled'] = $this->language->get('text_disabled');
  21. $data['text_select'] = $this->language->get('text_select');
  22. $data['text_none'] = $this->language->get('text_none');
  23. $data['text_yes'] = $this->language->get('text_yes');
  24. $data['text_no'] = $this->language->get('text_no');
  25. $data['text_product'] = $this->language->get('text_product');
  26. $data['text_review'] = $this->language->get('text_review');
  27. $data['text_voucher'] = $this->language->get('text_voucher');
  28. $data['text_tax'] = $this->language->get('text_tax');
  29. $data['text_account'] = $this->language->get('text_account');
  30. $data['text_checkout'] = $this->language->get('text_checkout');
  31. $data['text_stock'] = $this->language->get('text_stock');
  32. $data['text_affiliate'] = $this->language->get('text_affiliate');
  33. $data['text_return'] = $this->language->get('text_return');
  34. $data['text_captcha'] = $this->language->get('text_captcha');
  35. $data['text_register'] = $this->language->get('text_register');
  36. $data['text_shipping'] = $this->language->get('text_shipping');
  37. $data['text_payment'] = $this->language->get('text_payment');
  38. $data['text_mail'] = $this->language->get('text_mail');
  39. $data['text_smtp'] = $this->language->get('text_smtp');
  40. $data['text_general'] = $this->language->get('text_general');
  41. $data['text_security'] = $this->language->get('text_security');
  42. $data['text_upload'] = $this->language->get('text_upload');
  43. $data['text_error'] = $this->language->get('text_error');
  44. $data['entry_name'] = $this->language->get('entry_name');
  45. $data['entry_owner'] = $this->language->get('entry_owner');
  46. $data['entry_address'] = $this->language->get('entry_address');
  47. $data['entry_geocode'] = $this->language->get('entry_geocode');
  48. $data['entry_email'] = $this->language->get('entry_email');
  49. $data['entry_telephone'] = $this->language->get('entry_telephone');
  50. $data['entry_fax'] = $this->language->get('entry_fax');
  51. $data['entry_image'] = $this->language->get('entry_image');
  52. $data['entry_open'] = $this->language->get('entry_open');
  53. $data['entry_comment'] = $this->language->get('entry_comment');
  54. $data['entry_location'] = $this->language->get('entry_location');
  55. $data['entry_meta_title'] = $this->language->get('entry_meta_title');
  56. $data['entry_meta_description'] = $this->language->get('entry_meta_description');
  57. $data['entry_meta_keyword'] = $this->language->get('entry_meta_keyword');
  58. $data['entry_layout'] = $this->language->get('entry_layout');
  59. $data['entry_template'] = $this->language->get('entry_template');
  60. $data['entry_country'] = $this->language->get('entry_country');
  61. $data['entry_zone'] = $this->language->get('entry_zone');
  62. $data['entry_language'] = $this->language->get('entry_language');
  63. $data['entry_admin_language'] = $this->language->get('entry_admin_language');
  64. $data['entry_currency'] = $this->language->get('entry_currency');
  65. $data['entry_currency_auto'] = $this->language->get('entry_currency_auto');
  66. $data['entry_length_class'] = $this->language->get('entry_length_class');
  67. $data['entry_weight_class'] = $this->language->get('entry_weight_class');
  68. $data['entry_product_limit'] = $this->language->get('entry_product_limit');
  69. $data['entry_product_description_length'] = $this->language->get('entry_product_description_length');
  70. $data['entry_limit_admin'] = $this->language->get('entry_limit_admin');
  71. $data['entry_product_count'] = $this->language->get('entry_product_count');
  72. $data['entry_review'] = $this->language->get('entry_review');
  73. $data['entry_review_guest'] = $this->language->get('entry_review_guest');
  74. $data['entry_review_mail'] = $this->language->get('entry_review_mail');
  75. $data['entry_voucher_min'] = $this->language->get('entry_voucher_min');
  76. $data['entry_voucher_max'] = $this->language->get('entry_voucher_max');
  77. $data['entry_tax'] = $this->language->get('entry_tax');
  78. $data['entry_tax_default'] = $this->language->get('entry_tax_default');
  79. $data['entry_tax_customer'] = $this->language->get('entry_tax_customer');
  80. $data['entry_customer_online'] = $this->language->get('entry_customer_online');
  81. $data['entry_customer_group'] = $this->language->get('entry_customer_group');
  82. $data['entry_customer_group_display'] = $this->language->get('entry_customer_group_display');
  83. $data['entry_customer_price'] = $this->language->get('entry_customer_price');
  84. $data['entry_login_attempts'] = $this->language->get('entry_login_attempts');
  85. $data['entry_account'] = $this->language->get('entry_account');
  86. $data['entry_account_mail'] = $this->language->get('entry_account_mail');
  87. $data['entry_invoice_prefix'] = $this->language->get('entry_invoice_prefix');
  88. $data['entry_cart_weight'] = $this->language->get('entry_cart_weight');
  89. $data['entry_checkout_guest'] = $this->language->get('entry_checkout_guest');
  90. $data['entry_checkout'] = $this->language->get('entry_checkout');
  91. $data['entry_order_status'] = $this->language->get('entry_order_status');
  92. $data['entry_processing_status'] = $this->language->get('entry_processing_status');
  93. $data['entry_complete_status'] = $this->language->get('entry_complete_status');
  94. $data['entry_fraud_status'] = $this->language->get('entry_fraud_status');
  95. $data['entry_order_mail'] = $this->language->get('entry_order_mail');
  96. $data['entry_api'] = $this->language->get('entry_api');
  97. $data['entry_stock_display'] = $this->language->get('entry_stock_display');
  98. $data['entry_stock_warning'] = $this->language->get('entry_stock_warning');
  99. $data['entry_stock_checkout'] = $this->language->get('entry_stock_checkout');
  100. $data['entry_affiliate_approval'] = $this->language->get('entry_affiliate_approval');
  101. $data['entry_affiliate_auto'] = $this->language->get('entry_affiliate_auto');
  102. $data['entry_affiliate_commission'] = $this->language->get('entry_affiliate_commission');
  103. $data['entry_affiliate'] = $this->language->get('entry_affiliate');
  104. $data['entry_affiliate_mail'] = $this->language->get('entry_affiliate_mail');
  105. $data['entry_return'] = $this->language->get('entry_return');
  106. $data['entry_return_status'] = $this->language->get('entry_return_status');
  107. $data['entry_captcha'] = $this->language->get('entry_captcha');
  108. $data['entry_captcha_page'] = $this->language->get('entry_captcha_page');
  109. $data['entry_logo'] = $this->language->get('entry_logo');
  110. $data['entry_icon'] = $this->language->get('entry_icon');
  111. $data['entry_image_category'] = $this->language->get('entry_image_category');
  112. $data['entry_image_thumb'] = $this->language->get('entry_image_thumb');
  113. $data['entry_image_popup'] = $this->language->get('entry_image_popup');
  114. $data['entry_image_product'] = $this->language->get('entry_image_product');
  115. $data['entry_image_additional'] = $this->language->get('entry_image_additional');
  116. $data['entry_image_related'] = $this->language->get('entry_image_related');
  117. $data['entry_image_compare'] = $this->language->get('entry_image_compare');
  118. $data['entry_image_wishlist'] = $this->language->get('entry_image_wishlist');
  119. $data['entry_image_cart'] = $this->language->get('entry_image_cart');
  120. $data['entry_image_location'] = $this->language->get('entry_image_location');
  121. $data['entry_width'] = $this->language->get('entry_width');
  122. $data['entry_height'] = $this->language->get('entry_height');
  123. $data['entry_ftp_hostname'] = $this->language->get('entry_ftp_hostname');
  124. $data['entry_ftp_port'] = $this->language->get('entry_ftp_port');
  125. $data['entry_ftp_username'] = $this->language->get('entry_ftp_username');
  126. $data['entry_ftp_password'] = $this->language->get('entry_ftp_password');
  127. $data['entry_ftp_root'] = $this->language->get('entry_ftp_root');
  128. $data['entry_ftp_status'] = $this->language->get('entry_ftp_status');
  129. $data['entry_mail_protocol'] = $this->language->get('entry_mail_protocol');
  130. $data['entry_mail_parameter'] = $this->language->get('entry_mail_parameter');
  131. $data['entry_mail_smtp_hostname'] = $this->language->get('entry_mail_smtp_hostname');
  132. $data['entry_mail_smtp_username'] = $this->language->get('entry_mail_smtp_username');
  133. $data['entry_mail_smtp_password'] = $this->language->get('entry_mail_smtp_password');
  134. $data['entry_mail_smtp_port'] = $this->language->get('entry_mail_smtp_port');
  135. $data['entry_mail_smtp_timeout'] = $this->language->get('entry_mail_smtp_timeout');
  136. $data['entry_mail_alert'] = $this->language->get('entry_mail_alert');
  137. $data['entry_secure'] = $this->language->get('entry_secure');
  138. $data['entry_shared'] = $this->language->get('entry_shared');
  139. $data['entry_robots'] = $this->language->get('entry_robots');
  140. $data['entry_file_max_size'] = $this->language->get('entry_file_max_size');
  141. $data['entry_file_ext_allowed'] = $this->language->get('entry_file_ext_allowed');
  142. $data['entry_file_mime_allowed'] = $this->language->get('entry_file_mime_allowed');
  143. $data['entry_maintenance'] = $this->language->get('entry_maintenance');
  144. $data['entry_password'] = $this->language->get('entry_password');
  145. $data['entry_encryption'] = $this->language->get('entry_encryption');
  146. $data['entry_seo_url'] = $this->language->get('entry_seo_url');
  147. $data['entry_compression'] = $this->language->get('entry_compression');
  148. $data['entry_error_display'] = $this->language->get('entry_error_display');
  149. $data['entry_error_log'] = $this->language->get('entry_error_log');
  150. $data['entry_error_filename'] = $this->language->get('entry_error_filename');
  151. $data['entry_status'] = $this->language->get('entry_status');
  152. $data['help_geocode'] = $this->language->get('help_geocode');
  153. $data['help_open'] = $this->language->get('help_open');
  154. $data['help_comment'] = $this->language->get('help_comment');
  155. $data['help_location'] = $this->language->get('help_location');
  156. $data['help_currency'] = $this->language->get('help_currency');
  157. $data['help_currency_auto'] = $this->language->get('help_currency_auto');
  158. $data['help_product_limit'] = $this->language->get('help_product_limit');
  159. $data['help_product_description_length'] = $this->language->get('help_product_description_length');
  160. $data['help_limit_admin'] = $this->language->get('help_limit_admin');
  161. $data['help_product_count'] = $this->language->get('help_product_count');
  162. $data['help_review'] = $this->language->get('help_review');
  163. $data['help_review_guest'] = $this->language->get('help_review_guest');
  164. $data['help_review_mail'] = $this->language->get('help_review_mail');
  165. $data['help_voucher_min'] = $this->language->get('help_voucher_min');
  166. $data['help_voucher_max'] = $this->language->get('help_voucher_max');
  167. $data['help_tax_default'] = $this->language->get('help_tax_default');
  168. $data['help_tax_customer'] = $this->language->get('help_tax_customer');
  169. $data['help_customer_online'] = $this->language->get('help_customer_online');
  170. $data['help_customer_group'] = $this->language->get('help_customer_group');
  171. $data['help_customer_group_display'] = $this->language->get('help_customer_group_display');
  172. $data['help_customer_price'] = $this->language->get('help_customer_price');
  173. $data['help_login_attempts'] = $this->language->get('help_login_attempts');
  174. $data['help_account'] = $this->language->get('help_account');
  175. $data['help_account_mail'] = $this->language->get('help_account_mail');
  176. $data['help_cart_weight'] = $this->language->get('help_cart_weight');
  177. $data['help_checkout_guest'] = $this->language->get('help_checkout_guest');
  178. $data['help_checkout'] = $this->language->get('help_checkout');
  179. $data['help_invoice_prefix'] = $this->language->get('help_invoice_prefix');
  180. $data['help_order_status'] = $this->language->get('help_order_status');
  181. $data['help_processing_status'] = $this->language->get('help_processing_status');
  182. $data['help_complete_status'] = $this->language->get('help_complete_status');
  183. $data['help_fraud_status'] = $this->language->get('help_fraud_status');
  184. $data['help_order_mail'] = $this->language->get('help_order_mail');
  185. $data['help_api'] = $this->language->get('help_api');
  186. $data['help_stock_display'] = $this->language->get('help_stock_display');
  187. $data['help_stock_warning'] = $this->language->get('help_stock_warning');
  188. $data['help_stock_checkout'] = $this->language->get('help_stock_checkout');
  189. $data['help_affiliate_approval'] = $this->language->get('help_affiliate_approval');
  190. $data['help_affiliate_auto'] = $this->language->get('help_affiliate_auto');
  191. $data['help_affiliate_commission'] = $this->language->get('help_affiliate_commission');
  192. $data['help_affiliate'] = $this->language->get('help_affiliate');
  193. $data['help_affiliate_mail'] = $this->language->get('help_affiliate_mail');
  194. $data['help_commission'] = $this->language->get('help_commission');
  195. $data['help_return'] = $this->language->get('help_return');
  196. $data['help_return_status'] = $this->language->get('help_return_status');
  197. $data['help_captcha'] = $this->language->get('help_captcha');
  198. $data['help_icon'] = $this->language->get('help_icon');
  199. $data['help_ftp_root'] = $this->language->get('help_ftp_root');
  200. $data['help_mail_protocol'] = $this->language->get('help_mail_protocol');
  201. $data['help_mail_parameter'] = $this->language->get('help_mail_parameter');
  202. $data['help_mail_smtp_hostname'] = $this->language->get('help_mail_smtp_hostname');
  203. $data['help_mail_alert'] = $this->language->get('help_mail_alert');
  204. $data['help_secure'] = $this->language->get('help_secure');
  205. $data['help_shared'] = $this->language->get('help_shared');
  206. $data['help_robots'] = $this->language->get('help_robots');
  207. $data['help_seo_url'] = $this->language->get('help_seo_url');
  208. $data['help_file_max_size'] = $this->language->get('help_file_max_size');
  209. $data['help_file_ext_allowed'] = $this->language->get('help_file_ext_allowed');
  210. $data['help_file_mime_allowed'] = $this->language->get('help_file_mime_allowed');
  211. $data['help_maintenance'] = $this->language->get('help_maintenance');
  212. $data['help_password'] = $this->language->get('help_password');
  213. $data['help_encryption'] = $this->language->get('help_encryption');
  214. $data['help_compression'] = $this->language->get('help_compression');
  215. $data['button_save'] = $this->language->get('button_save');
  216. $data['button_cancel'] = $this->language->get('button_cancel');
  217. $data['tab_general'] = $this->language->get('tab_general');
  218. $data['tab_store'] = $this->language->get('tab_store');
  219. $data['tab_local'] = $this->language->get('tab_local');
  220. $data['tab_option'] = $this->language->get('tab_option');
  221. $data['tab_image'] = $this->language->get('tab_image');
  222. $data['tab_ftp'] = $this->language->get('tab_ftp');
  223. $data['tab_mail'] = $this->language->get('tab_mail');
  224. $data['tab_server'] = $this->language->get('tab_server');
  225. if (isset($this->error['warning'])) {
  226. $data['error_warning'] = $this->error['warning'];
  227. } else {
  228. $data['error_warning'] = '';
  229. }
  230. if (isset($this->error['name'])) {
  231. $data['error_name'] = $this->error['name'];
  232. } else {
  233. $data['error_name'] = '';
  234. }
  235. if (isset($this->error['owner'])) {
  236. $data['error_owner'] = $this->error['owner'];
  237. } else {
  238. $data['error_owner'] = '';
  239. }
  240. if (isset($this->error['address'])) {
  241. $data['error_address'] = $this->error['address'];
  242. } else {
  243. $data['error_address'] = '';
  244. }
  245. if (isset($this->error['email'])) {
  246. $data['error_email'] = $this->error['email'];
  247. } else {
  248. $data['error_email'] = '';
  249. }
  250. if (isset($this->error['telephone'])) {
  251. $data['error_telephone'] = $this->error['telephone'];
  252. } else {
  253. $data['error_telephone'] = '';
  254. }
  255. if (isset($this->error['meta_title'])) {
  256. $data['error_meta_title'] = $this->error['meta_title'];
  257. } else {
  258. $data['error_meta_title'] = '';
  259. }
  260. if (isset($this->error['country'])) {
  261. $data['error_country'] = $this->error['country'];
  262. } else {
  263. $data['error_country'] = '';
  264. }
  265. if (isset($this->error['zone'])) {
  266. $data['error_zone'] = $this->error['zone'];
  267. } else {
  268. $data['error_zone'] = '';
  269. }
  270. if (isset($this->error['customer_group_display'])) {
  271. $data['error_customer_group_display'] = $this->error['customer_group_display'];
  272. } else {
  273. $data['error_customer_group_display'] = '';
  274. }
  275. if (isset($this->error['login_attempts'])) {
  276. $data['error_login_attempts'] = $this->error['login_attempts'];
  277. } else {
  278. $data['error_login_attempts'] = '';
  279. }
  280. if (isset($this->error['voucher_min'])) {
  281. $data['error_voucher_min'] = $this->error['voucher_min'];
  282. } else {
  283. $data['error_voucher_min'] = '';
  284. }
  285. if (isset($this->error['voucher_max'])) {
  286. $data['error_voucher_max'] = $this->error['voucher_max'];
  287. } else {
  288. $data['error_voucher_max'] = '';
  289. }
  290. if (isset($this->error['processing_status'])) {
  291. $data['error_processing_status'] = $this->error['processing_status'];
  292. } else {
  293. $data['error_processing_status'] = '';
  294. }
  295. if (isset($this->error['complete_status'])) {
  296. $data['error_complete_status'] = $this->error['complete_status'];
  297. } else {
  298. $data['error_complete_status'] = '';
  299. }
  300. if (isset($this->error['ftp_hostname'])) {
  301. $data['error_ftp_hostname'] = $this->error['ftp_hostname'];
  302. } else {
  303. $data['error_ftp_hostname'] = '';
  304. }
  305. if (isset($this->error['ftp_port'])) {
  306. $data['error_ftp_port'] = $this->error['ftp_port'];
  307. } else {
  308. $data['error_ftp_port'] = '';
  309. }
  310. if (isset($this->error['ftp_username'])) {
  311. $data['error_ftp_username'] = $this->error['ftp_username'];
  312. } else {
  313. $data['error_ftp_username'] = '';
  314. }
  315. if (isset($this->error['ftp_password'])) {
  316. $data['error_ftp_password'] = $this->error['ftp_password'];
  317. } else {
  318. $data['error_ftp_password'] = '';
  319. }
  320. if (isset($this->error['image_category'])) {
  321. $data['error_image_category'] = $this->error['image_category'];
  322. } else {
  323. $data['error_image_category'] = '';
  324. }
  325. if (isset($this->error['image_thumb'])) {
  326. $data['error_image_thumb'] = $this->error['image_thumb'];
  327. } else {
  328. $data['error_image_thumb'] = '';
  329. }
  330. if (isset($this->error['image_popup'])) {
  331. $data['error_image_popup'] = $this->error['image_popup'];
  332. } else {
  333. $data['error_image_popup'] = '';
  334. }
  335. if (isset($this->error['image_product'])) {
  336. $data['error_image_product'] = $this->error['image_product'];
  337. } else {
  338. $data['error_image_product'] = '';
  339. }
  340. if (isset($this->error['image_additional'])) {
  341. $data['error_image_additional'] = $this->error['image_additional'];
  342. } else {
  343. $data['error_image_additional'] = '';
  344. }
  345. if (isset($this->error['image_related'])) {
  346. $data['error_image_related'] = $this->error['image_related'];
  347. } else {
  348. $data['error_image_related'] = '';
  349. }
  350. if (isset($this->error['image_compare'])) {
  351. $data['error_image_compare'] = $this->error['image_compare'];
  352. } else {
  353. $data['error_image_compare'] = '';
  354. }
  355. if (isset($this->error['image_wishlist'])) {
  356. $data['error_image_wishlist'] = $this->error['image_wishlist'];
  357. } else {
  358. $data['error_image_wishlist'] = '';
  359. }
  360. if (isset($this->error['image_cart'])) {
  361. $data['error_image_cart'] = $this->error['image_cart'];
  362. } else {
  363. $data['error_image_cart'] = '';
  364. }
  365. if (isset($this->error['image_location'])) {
  366. $data['error_image_location'] = $this->error['image_location'];
  367. } else {
  368. $data['error_image_location'] = '';
  369. }
  370. if (isset($this->error['error_filename'])) {
  371. $data['error_error_filename'] = $this->error['error_filename'];
  372. } else {
  373. $data['error_error_filename'] = '';
  374. }
  375. if (isset($this->error['product_limit'])) {
  376. $data['error_product_limit'] = $this->error['product_limit'];
  377. } else {
  378. $data['error_product_limit'] = '';
  379. }
  380. if (isset($this->error['product_description_length'])) {
  381. $data['error_product_description_length'] = $this->error['product_description_length'];
  382. } else {
  383. $data['error_product_description_length'] = '';
  384. }
  385. if (isset($this->error['limit_admin'])) {
  386. $data['error_limit_admin'] = $this->error['limit_admin'];
  387. } else {
  388. $data['error_limit_admin'] = '';
  389. }
  390. if (isset($this->error['encryption'])) {
  391. $data['error_encryption'] = $this->error['encryption'];
  392. } else {
  393. $data['error_encryption'] = '';
  394. }
  395. $data['breadcrumbs'] = array();
  396. $data['breadcrumbs'][] = array(
  397. 'text' => $this->language->get('text_home'),
  398. 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL')
  399. );
  400. $data['breadcrumbs'][] = array(
  401. 'text' => $this->language->get('text_stores'),
  402. 'href' => $this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL')
  403. );
  404. $data['breadcrumbs'][] = array(
  405. 'text' => $this->language->get('heading_title'),
  406. 'href' => $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL')
  407. );
  408. if (isset($this->session->data['success'])) {
  409. $data['success'] = $this->session->data['success'];
  410. unset($this->session->data['success']);
  411. } else {
  412. $data['success'] = '';
  413. }
  414. $data['action'] = $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL');
  415. $data['cancel'] = $this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL');
  416. $data['token'] = $this->session->data['token'];
  417. if (isset($this->request->post['config_name'])) {
  418. $data['config_name'] = $this->request->post['config_name'];
  419. } else {
  420. $data['config_name'] = $this->config->get('config_name');
  421. }
  422. if (isset($this->request->post['config_owner'])) {
  423. $data['config_owner'] = $this->request->post['config_owner'];
  424. } else {
  425. $data['config_owner'] = $this->config->get('config_owner');
  426. }
  427. if (isset($this->request->post['config_address'])) {
  428. $data['config_address'] = $this->request->post['config_address'];
  429. } else {
  430. $data['config_address'] = $this->config->get('config_address');
  431. }
  432. if (isset($this->request->post['config_geocode'])) {
  433. $data['config_geocode'] = $this->request->post['config_geocode'];
  434. } else {
  435. $data['config_geocode'] = $this->config->get('config_geocode');
  436. }
  437. if (isset($this->request->post['config_email'])) {
  438. $data['config_email'] = $this->request->post['config_email'];
  439. } else {
  440. $data['config_email'] = $this->config->get('config_email');
  441. }
  442. if (isset($this->request->post['config_telephone'])) {
  443. $data['config_telephone'] = $this->request->post['config_telephone'];
  444. } else {
  445. $data['config_telephone'] = $this->config->get('config_telephone');
  446. }
  447. if (isset($this->request->post['config_fax'])) {
  448. $data['config_fax'] = $this->request->post['config_fax'];
  449. } else {
  450. $data['config_fax'] = $this->config->get('config_fax');
  451. }
  452. if (isset($this->request->post['config_image'])) {
  453. $data['config_image'] = $this->request->post['config_image'];
  454. } else {
  455. $data['config_image'] = $this->config->get('config_image');
  456. }
  457. $this->load->model('tool/image');
  458. if (isset($this->request->post['config_image']) && is_file(DIR_IMAGE . $this->request->post['config_image'])) {
  459. $data['thumb'] = $this->model_tool_image->resize($this->request->post['config_image'], 100, 100);
  460. } elseif ($this->config->get('config_image') && is_file(DIR_IMAGE . $this->config->get('config_image'))) {
  461. $data['thumb'] = $this->model_tool_image->resize($this->config->get('config_image'), 100, 100);
  462. } else {
  463. $data['thumb'] = $this->model_tool_image->resize('no_image.png', 100, 100);
  464. }
  465. $data['placeholder'] = $this->model_tool_image->resize('no_image.png', 100, 100);
  466. if (isset($this->request->post['config_open'])) {
  467. $data['config_open'] = $this->request->post['config_open'];
  468. } else {
  469. $data['config_open'] = $this->config->get('config_open');
  470. }
  471. if (isset($this->request->post['config_comment'])) {
  472. $data['config_comment'] = $this->request->post['config_comment'];
  473. } else {
  474. $data['config_comment'] = $this->config->get('config_comment');
  475. }
  476. $this->load->model('localisation/location');
  477. $data['locations'] = $this->model_localisation_location->getLocations();
  478. if (isset($this->request->post['config_location'])) {
  479. $data['config_location'] = $this->request->post['config_location'];
  480. } elseif ($this->config->get('config_location')) {
  481. $data['config_location'] = $this->config->get('config_location');
  482. } else {
  483. $data['config_location'] = array();
  484. }
  485. if (isset($this->request->post['config_meta_title'])) {
  486. $data['config_meta_title'] = $this->request->post['config_meta_title'];
  487. } else {
  488. $data['config_meta_title'] = $this->config->get('config_meta_title');
  489. }
  490. if (isset($this->request->post['config_meta_description'])) {
  491. $data['config_meta_description'] = $this->request->post['config_meta_description'];
  492. } else {
  493. $data['config_meta_description'] = $this->config->get('config_meta_description');
  494. }
  495. if (isset($this->request->post['config_meta_keyword'])) {
  496. $data['config_meta_keyword'] = $this->request->post['config_meta_keyword'];
  497. } else {
  498. $data['config_meta_keyword'] = $this->config->get('config_meta_keyword');
  499. }
  500. if (isset($this->request->post['config_layout_id'])) {
  501. $data['config_layout_id'] = $this->request->post['config_layout_id'];
  502. } else {
  503. $data['config_layout_id'] = $this->config->get('config_layout_id');
  504. }
  505. $this->load->model('design/layout');
  506. $data['layouts'] = $this->model_design_layout->getLayouts();
  507. if (isset($this->request->post['config_template'])) {
  508. $data['config_template'] = $this->request->post['config_template'];
  509. } else {
  510. $data['config_template'] = $this->config->get('config_template');
  511. }
  512. $data['templates'] = array();
  513. $directories = glob(DIR_CATALOG . 'view/theme/*', GLOB_ONLYDIR);
  514. foreach ($directories as $directory) {
  515. $data['templates'][] = basename($directory);
  516. }
  517. if (isset($this->request->post['config_country_id'])) {
  518. $data['config_country_id'] = $this->request->post['config_country_id'];
  519. } else {
  520. $data['config_country_id'] = $this->config->get('config_country_id');
  521. }
  522. $this->load->model('localisation/country');
  523. $data['countries'] = $this->model_localisation_country->getCountries();
  524. if (isset($this->request->post['config_zone_id'])) {
  525. $data['config_zone_id'] = $this->request->post['config_zone_id'];
  526. } else {
  527. $data['config_zone_id'] = $this->config->get('config_zone_id');
  528. }
  529. if (isset($this->request->post['config_language'])) {
  530. $data['config_language'] = $this->request->post['config_language'];
  531. } else {
  532. $data['config_language'] = $this->config->get('config_language');
  533. }
  534. $this->load->model('localisation/language');
  535. $data['languages'] = $this->model_localisation_language->getLanguages();
  536. if (isset($this->request->post['config_admin_language'])) {
  537. $data['config_admin_language'] = $this->request->post['config_admin_language'];
  538. } else {
  539. $data['config_admin_language'] = $this->config->get('config_admin_language');
  540. }
  541. if (isset($this->request->post['config_currency'])) {
  542. $data['config_currency'] = $this->request->post['config_currency'];
  543. } else {
  544. $data['config_currency'] = $this->config->get('config_currency');
  545. }
  546. if (isset($this->request->post['config_currency_auto'])) {
  547. $data['config_currency_auto'] = $this->request->post['config_currency_auto'];
  548. } else {
  549. $data['config_currency_auto'] = $this->config->get('config_currency_auto');
  550. }
  551. $this->load->model('localisation/currency');
  552. $data['currencies'] = $this->model_localisation_currency->getCurrencies();
  553. if (isset($this->request->post['config_length_class_id'])) {
  554. $data['config_length_class_id'] = $this->request->post['config_length_class_id'];
  555. } else {
  556. $data['config_length_class_id'] = $this->config->get('config_length_class_id');
  557. }
  558. $this->load->model('localisation/length_class');
  559. $data['length_classes'] = $this->model_localisation_length_class->getLengthClasses();
  560. if (isset($this->request->post['config_weight_class_id'])) {
  561. $data['config_weight_class_id'] = $this->request->post['config_weight_class_id'];
  562. } else {
  563. $data['config_weight_class_id'] = $this->config->get('config_weight_class_id');
  564. }
  565. $this->load->model('localisation/weight_class');
  566. $data['weight_classes'] = $this->model_localisation_weight_class->getWeightClasses();
  567. if (isset($this->request->post['config_product_limit'])) {
  568. $data['config_product_limit'] = $this->request->post['config_product_limit'];
  569. } else {
  570. $data['config_product_limit'] = $this->config->get('config_product_limit');
  571. }
  572. if (isset($this->request->post['config_product_description_length'])) {
  573. $data['config_product_description_length'] = $this->request->post['config_product_description_length'];
  574. } else {
  575. $data['config_product_description_length'] = $this->config->get('config_product_description_length');
  576. }
  577. if (isset($this->request->post['config_limit_admin'])) {
  578. $data['config_limit_admin'] = $this->request->post['config_limit_admin'];
  579. } else {
  580. $data['config_limit_admin'] = $this->config->get('config_limit_admin');
  581. }
  582. if (isset($this->request->post['config_product_count'])) {
  583. $data['config_product_count'] = $this->request->post['config_product_count'];
  584. } else {
  585. $data['config_product_count'] = $this->config->get('config_product_count');
  586. }
  587. if (isset($this->request->post['config_review_status'])) {
  588. $data['config_review_status'] = $this->request->post['config_review_status'];
  589. } else {
  590. $data['config_review_status'] = $this->config->get('config_review_status');
  591. }
  592. if (isset($this->request->post['config_review_guest'])) {
  593. $data['config_review_guest'] = $this->request->post['config_review_guest'];
  594. } else {
  595. $data['config_review_guest'] = $this->config->get('config_review_guest');
  596. }
  597. if (isset($this->request->post['config_review_mail'])) {
  598. $data['config_review_mail'] = $this->request->post['config_review_mail'];
  599. } else {
  600. $data['config_review_mail'] = $this->config->get('config_review_mail');
  601. }
  602. if (isset($this->request->post['config_voucher_min'])) {
  603. $data['config_voucher_min'] = $this->request->post['config_voucher_min'];
  604. } else {
  605. $data['config_voucher_min'] = $this->config->get('config_voucher_min');
  606. }
  607. if (isset($this->request->post['config_voucher_max'])) {
  608. $data['config_voucher_max'] = $this->request->post['config_voucher_max'];
  609. } else {
  610. $data['config_voucher_max'] = $this->config->get('config_voucher_max');
  611. }
  612. if (isset($this->request->post['config_tax'])) {
  613. $data['config_tax'] = $this->request->post['config_tax'];
  614. } else {
  615. $data['config_tax'] = $this->config->get('config_tax');
  616. }
  617. if (isset($this->request->post['config_tax_default'])) {
  618. $data['config_tax_default'] = $this->request->post['config_tax_default'];
  619. } else {
  620. $data['config_tax_default'] = $this->config->get('config_tax_default');
  621. }
  622. if (isset($this->request->post['config_tax_customer'])) {
  623. $data['config_tax_customer'] = $this->request->post['config_tax_customer'];
  624. } else {
  625. $data['config_tax_customer'] = $this->config->get('config_tax_customer');
  626. }
  627. if (isset($this->request->post['config_customer_online'])) {
  628. $data['config_customer_online'] = $this->request->post['config_customer_online'];
  629. } else {
  630. $data['config_customer_online'] = $this->config->get('config_customer_online');
  631. }
  632. if (isset($this->request->post['config_customer_group_id'])) {
  633. $data['config_customer_group_id'] = $this->request->post['config_customer_group_id'];
  634. } else {
  635. $data['config_customer_group_id'] = $this->config->get('config_customer_group_id');
  636. }
  637. $this->load->model('customer/customer_group');
  638. $data['customer_groups'] = $this->model_customer_customer_group->getCustomerGroups();
  639. if (isset($this->request->post['config_customer_group_display'])) {
  640. $data['config_customer_group_display'] = $this->request->post['config_customer_group_display'];
  641. } elseif ($this->config->get('config_customer_group_display')) {
  642. $data['config_customer_group_display'] = $this->config->get('config_customer_group_display');
  643. } else {
  644. $data['config_customer_group_display'] = array();
  645. }
  646. if (isset($this->request->post['config_customer_price'])) {
  647. $data['config_customer_price'] = $this->request->post['config_customer_price'];
  648. } else {
  649. $data['config_customer_price'] = $this->config->get('config_customer_price');
  650. }
  651. if (isset($this->request->post['config_login_attempts'])) {
  652. $data['config_login_attempts'] = $this->request->post['config_login_attempts'];
  653. } elseif ($this->config->has('config_login_attempts')) {
  654. $data['config_login_attempts'] = $this->config->get('config_login_attempts');
  655. } else {
  656. $data['config_login_attempts'] = 5;
  657. }
  658. if (isset($this->request->post['config_account_id'])) {
  659. $data['config_account_id'] = $this->request->post['config_account_id'];
  660. } else {
  661. $data['config_account_id'] = $this->config->get('config_account_id');
  662. }
  663. $this->load->model('catalog/information');
  664. $data['informations'] = $this->model_catalog_information->getInformations();
  665. if (isset($this->request->post['config_account_mail'])) {
  666. $data['config_account_mail'] = $this->request->post['config_account_mail'];
  667. } else {
  668. $data['config_account_mail'] = $this->config->get('config_account_mail');
  669. }
  670. if (isset($this->request->post['config_cart_weight'])) {
  671. $data['config_cart_weight'] = $this->request->post['config_cart_weight'];
  672. } else {
  673. $data['config_cart_weight'] = $this->config->get('config_cart_weight');
  674. }
  675. if (isset($this->request->post['config_checkout_guest'])) {
  676. $data['config_checkout_guest'] = $this->request->post['config_checkout_guest'];
  677. } else {
  678. $data['config_checkout_guest'] = $this->config->get('config_checkout_guest');
  679. }
  680. if (isset($this->request->post['config_checkout_id'])) {
  681. $data['config_checkout_id'] = $this->request->post['config_checkout_id'];
  682. } else {
  683. $data['config_checkout_id'] = $this->config->get('config_checkout_id');
  684. }
  685. if (isset($this->request->post['config_invoice_prefix'])) {
  686. $data['config_invoice_prefix'] = $this->request->post['config_invoice_prefix'];
  687. } elseif ($this->config->get('config_invoice_prefix')) {
  688. $data['config_invoice_prefix'] = $this->config->get('config_invoice_prefix');
  689. } else {
  690. $data['config_invoice_prefix'] = 'INV-' . date('Y') . '-00';
  691. }
  692. if (isset($this->request->post['config_order_status_id'])) {
  693. $data['config_order_status_id'] = $this->request->post['config_order_status_id'];
  694. } else {
  695. $data['config_order_status_id'] = $this->config->get('config_order_status_id');
  696. }
  697. if (isset($this->request->post['config_processing_status'])) {
  698. $data['config_processing_status'] = $this->request->post['config_processing_status'];
  699. } elseif ($this->config->get('config_processing_status')) {
  700. $data['config_processing_status'] = $this->config->get('config_processing_status');
  701. } else {
  702. $data['config_processing_status'] = array();
  703. }
  704. if (isset($this->request->post['config_complete_status'])) {
  705. $data['config_complete_status'] = $this->request->post['config_complete_status'];
  706. } elseif ($this->config->get('config_complete_status')) {
  707. $data['config_complete_status'] = $this->config->get('config_complete_status');
  708. } else {
  709. $data['config_complete_status'] = array();
  710. }
  711. if (isset($this->request->post['config_order_status_id'])) {
  712. $data['config_fraud_status_id'] = $this->request->post['config_fraud_status_id'];
  713. } else {
  714. $data['config_fraud_status_id'] = $this->config->get('config_fraud_status_id');
  715. }
  716. $this->load->model('localisation/order_status');
  717. $data['order_statuses'] = $this->model_localisation_order_status->getOrderStatuses();
  718. if (isset($this->request->post['config_order_mail'])) {
  719. $data['config_order_mail'] = $this->request->post['config_order_mail'];
  720. } else {
  721. $data['config_order_mail'] = $this->config->get('config_order_mail');
  722. }
  723. if (isset($this->request->post['config_api_id'])) {
  724. $data['config_api_id'] = $this->request->post['config_api_id'];
  725. } else {
  726. $data['config_api_id'] = $this->config->get('config_api_id');
  727. }
  728. $this->load->model('user/api');
  729. $data['apis'] = $this->model_user_api->getApis();
  730. if (isset($this->request->post['config_stock_display'])) {
  731. $data['config_stock_display'] = $this->request->post['config_stock_display'];
  732. } else {
  733. $data['config_stock_display'] = $this->config->get('config_stock_display');
  734. }
  735. if (isset($this->request->post['config_stock_warning'])) {
  736. $data['config_stock_warning'] = $this->request->post['config_stock_warning'];
  737. } else {
  738. $data['config_stock_warning'] = $this->config->get('config_stock_warning');
  739. }
  740. if (isset($this->request->post['config_stock_checkout'])) {
  741. $data['config_stock_checkout'] = $this->request->post['config_stock_checkout'];
  742. } else {
  743. $data['config_stock_checkout'] = $this->config->get('config_stock_checkout');
  744. }
  745. if (isset($this->request->post['config_affiliate_auto'])) {
  746. $data['config_affiliate_approval'] = $this->request->post['config_affiliate_approval'];
  747. } elseif ($this->config->has('config_affiliate_commission')) {
  748. $data['config_affiliate_approval'] = $this->config->get('config_affiliate_approval');
  749. } else {
  750. $data['config_affiliate_approval'] = '';
  751. }
  752. if (isset($this->request->post['config_affiliate_auto'])) {
  753. $data['config_affiliate_auto'] = $this->request->post['config_affiliate_auto'];
  754. } elseif ($this->config->has('config_affiliate_auto')) {
  755. $data['config_affiliate_auto'] = $this->config->get('config_affiliate_auto');
  756. } else {
  757. $data['config_affiliate_auto'] = '';
  758. }
  759. if (isset($this->request->post['config_affiliate_commission'])) {
  760. $data['config_affiliate_commission'] = $this->request->post['config_affiliate_commission'];
  761. } elseif ($this->config->has('config_affiliate_commission')) {
  762. $data['config_affiliate_commission'] = $this->config->get('config_affiliate_commission');
  763. } else {
  764. $data['config_affiliate_commission'] = '5.00';
  765. }
  766. if (isset($this->request->post['config_affiliate_mail'])) {
  767. $data['config_affiliate_mail'] = $this->request->post['config_affiliate_mail'];
  768. } elseif ($this->config->has('config_affiliate_mail')) {
  769. $data['config_affiliate_mail'] = $this->config->get('config_affiliate_mail');
  770. } else {
  771. $data['config_affiliate_mail'] = '';
  772. }
  773. if (isset($this->request->post['config_affiliate_id'])) {
  774. $data['config_affiliate_id'] = $this->request->post['config_affiliate_id'];
  775. } else {
  776. $data['config_affiliate_id'] = $this->config->get('config_affiliate_id');
  777. }
  778. if (isset($this->request->post['config_return_id'])) {
  779. $data['config_return_id'] = $this->request->post['config_return_id'];
  780. } else {
  781. $data['config_return_id'] = $this->config->get('config_return_id');
  782. }
  783. if (isset($this->request->post['config_return_status_id'])) {
  784. $data['config_return_status_id'] = $this->request->post['config_return_status_id'];
  785. } else {
  786. $data['config_return_status_id'] = $this->config->get('config_return_status_id');
  787. }
  788. $this->load->model('localisation/return_status');
  789. $data['return_statuses'] = $this->model_localisation_return_status->getReturnStatuses();
  790. if (isset($this->request->post['config_captcha'])) {
  791. $data['config_captcha'] = $this->request->post['config_captcha'];
  792. } else {
  793. $data['config_captcha'] = $this->config->get('config_captcha');
  794. }
  795. $this->load->model('extension/extension');
  796. $data['captchas'] = array();
  797. // Get a list of installed captchas
  798. $extensions = $this->model_extension_extension->getInstalled('captcha');
  799. foreach ($extensions as $code) {
  800. $this->load->language('captcha/' . $code);
  801. if ($this->config->has($code . '_status')) {
  802. $data['captchas'][] = array(
  803. 'text' => $this->language->get('heading_title'),
  804. 'value' => $code
  805. );
  806. }
  807. }
  808. if (isset($this->request->post['config_captcha_page'])) {
  809. $data['config_captcha_page'] = $this->request->post['config_captcha_page'];
  810. } elseif ($this->config->has('config_captcha_page')) {
  811. $data['config_captcha_page'] = $this->config->get('config_captcha_page');
  812. } else {
  813. $data['config_captcha_page'] = array();
  814. }
  815. $data['captcha_pages'] = array();
  816. $data['captcha_pages'][] = array(
  817. 'text' => $this->language->get('text_register'),
  818. 'value' => 'register'
  819. );
  820. $data['captcha_pages'][] = array(
  821. 'text' => $this->language->get('text_review'),
  822. 'value' => 'review'
  823. );
  824. $data['captcha_pages'][] = array(
  825. 'text' => $this->language->get('text_return'),
  826. 'value' => 'return'
  827. );
  828. $data['captcha_pages'][] = array(
  829. 'text' => $this->language->get('text_contact'),
  830. 'value' => 'contact'
  831. );
  832. if (isset($this->request->post['config_logo'])) {
  833. $data['config_logo'] = $this->request->post['config_logo'];
  834. } else {
  835. $data['config_logo'] = $this->config->get('config_logo');
  836. }
  837. if (isset($this->request->post['config_logo']) && is_file(DIR_IMAGE . $this->request->post['config_logo'])) {
  838. $data['logo'] = $this->model_tool_image->resize($this->request->post['config_logo'], 100, 100);
  839. } elseif ($this->config->get('config_logo') && is_file(DIR_IMAGE . $this->config->get('config_logo'))) {
  840. $data['logo'] = $this->model_tool_image->resize($this->config->get('config_logo'), 100, 100);
  841. } else {
  842. $data['logo'] = $this->model_tool_image->resize('no_image.png', 100, 100);
  843. }
  844. if (isset($this->request->post['config_icon'])) {
  845. $data['config_icon'] = $this->request->post['config_icon'];
  846. } else {
  847. $data['config_icon'] = $this->config->get('config_icon');
  848. }
  849. if (isset($this->request->post['config_icon']) && is_file(DIR_IMAGE . $this->request->post['config_icon'])) {
  850. $data['icon'] = $this->model_tool_image->resize($this->request->post['config_logo'], 100, 100);
  851. } elseif ($this->config->get('config_icon') && is_file(DIR_IMAGE . $this->config->get('config_icon'))) {
  852. $data['icon'] = $this->model_tool_image->resize($this->config->get('config_icon'), 100, 100);
  853. } else {
  854. $data['icon'] = $this->model_tool_image->resize('no_image.png', 100, 100);
  855. }
  856. if (isset($this->request->post['config_image_category_width'])) {
  857. $data['config_image_category_width'] = $this->request->post['config_image_category_width'];
  858. } else {
  859. $data['config_image_category_width'] = $this->config->get('config_image_category_width');
  860. }
  861. if (isset($this->request->post['config_image_category_height'])) {
  862. $data['config_image_category_height'] = $this->request->post['config_image_category_height'];
  863. } else {
  864. $data['config_image_category_height'] = $this->config->get('config_image_category_height');
  865. }
  866. if (isset($this->request->post['config_image_thumb_width'])) {
  867. $data['config_image_thumb_width'] = $this->request->post['config_image_thumb_width'];
  868. } else {
  869. $data['config_image_thumb_width'] = $this->config->get('config_image_thumb_width');
  870. }
  871. if (isset($this->request->post['config_image_thumb_height'])) {
  872. $data['config_image_thumb_height'] = $this->request->post['config_image_thumb_height'];
  873. } else {
  874. $data['config_image_thumb_height'] = $this->config->get('config_image_thumb_height');
  875. }
  876. if (isset($this->request->post['config_image_popup_width'])) {
  877. $data['config_image_popup_width'] = $this->request->post['config_image_popup_width'];
  878. } else {
  879. $data['config_image_popup_width'] = $this->config->get('config_image_popup_width');
  880. }
  881. if (isset($this->request->post['config_image_popup_height'])) {
  882. $data['config_image_popup_height'] = $this->request->post['config_image_popup_height'];
  883. } else {
  884. $data['config_image_popup_height'] = $this->config->get('config_image_popup_height');
  885. }
  886. if (isset($this->request->post['config_image_product_width'])) {
  887. $data['config_image_product_width'] = $this->request->post['config_image_product_width'];
  888. } else {
  889. $data['config_image_product_width'] = $this->config->get('config_image_product_width');
  890. }
  891. if (isset($this->request->post['config_image_product_height'])) {
  892. $data['config_image_product_height'] = $this->request->post['config_image_product_height'];
  893. } else {
  894. $data['config_image_product_height'] = $this->config->get('config_image_product_height');
  895. }
  896. if (isset($this->request->post['config_image_additional_width'])) {
  897. $data['config_image_additional_width'] = $this->request->post['config_image_additional_width'];
  898. } else {
  899. $data['config_image_additional_width'] = $this->config->get('config_image_additional_width');
  900. }
  901. if (isset($this->request->post['config_image_additional_height'])) {
  902. $data['config_image_additional_height'] = $this->request->post['config_image_additional_height'];
  903. } else {
  904. $data['config_image_additional_height'] = $this->config->get('config_image_additional_height');
  905. }
  906. if (isset($this->request->post['config_image_related_width'])) {
  907. $data['config_image_related_width'] = $this->request->post['config_image_related_width'];
  908. } else {
  909. $data['config_image_related_width'] = $this->config->get('config_image_related_width');
  910. }
  911. if (isset($this->request->post['config_image_related_height'])) {
  912. $data['config_image_related_height'] = $this->request->post['config_image_related_height'];
  913. } else {
  914. $data['config_image_related_height'] = $this->config->get('config_image_related_height');
  915. }
  916. if (isset($this->request->post['config_image_compare_width'])) {
  917. $data['config_image_compare_width'] = $this->request->post['config_image_compare_width'];
  918. } else {
  919. $data['config_image_compare_width'] = $this->config->get('config_image_compare_width');
  920. }
  921. if (isset($this->request->post['config_image_compare_height'])) {
  922. $data['config_image_compare_height'] = $this->request->post['config_image_compare_height'];
  923. } else {
  924. $data['config_image_compare_height'] = $this->config->get('config_image_compare_height');
  925. }
  926. if (isset($this->request->post['config_image_wishlist_width'])) {
  927. $data['config_image_wishlist_width'] = $this->request->post['config_image_wishlist_width'];
  928. } else {
  929. $data['config_image_wishlist_width'] = $this->config->get('config_image_wishlist_width');
  930. }
  931. if (isset($this->request->post['config_image_wishlist_height'])) {
  932. $data['config_image_wishlist_height'] = $this->request->post['config_image_wishlist_height'];
  933. } else {
  934. $data['config_image_wishlist_height'] = $this->config->get('config_image_wishlist_height');
  935. }
  936. if (isset($this->request->post['config_image_cart_width'])) {
  937. $data['config_image_cart_width'] = $this->request->post['config_image_cart_width'];
  938. } else {
  939. $data['config_image_cart_width'] = $this->config->get('config_image_cart_width');
  940. }
  941. if (isset($this->request->post['config_image_cart_height'])) {
  942. $data['config_image_cart_height'] = $this->request->post['config_image_cart_height'];
  943. } else {
  944. $data['config_image_cart_height'] = $this->config->get('config_image_cart_height');
  945. }
  946. if (isset($this->request->post['config_image_location_width'])) {
  947. $data['config_image_location_width'] = $this->request->post['config_image_location_width'];
  948. } else {
  949. $data['config_image_location_width'] = $this->config->get('config_image_location_width');
  950. }
  951. if (isset($this->request->post['config_image_location_height'])) {
  952. $data['config_image_location_height'] = $this->request->post['config_image_location_height'];
  953. } else {
  954. $data['config_image_location_height'] = $this->config->get('config_image_location_height');
  955. }
  956. if (isset($this->request->post['config_ftp_hostname'])) {
  957. $data['config_ftp_hostname'] = $this->request->post['config_ftp_hostname'];
  958. } elseif ($this->config->get('config_ftp_hostname')) {
  959. $data['config_ftp_hostname'] = $this->config->get('config_ftp_hostname');
  960. } else {
  961. $data['config_ftp_hostname'] = str_replace('www.', '', $this->request->server['HTTP_HOST']);
  962. }
  963. if (isset($this->request->post['config_ftp_port'])) {
  964. $data['config_ftp_port'] = $this->request->post['config_ftp_port'];
  965. } elseif ($this->config->get('config_ftp_port')) {
  966. $data['config_ftp_port'] = $this->config->get('config_ftp_port');
  967. } else {
  968. $data['config_ftp_port'] = 21;
  969. }
  970. if (isset($this->request->post['config_ftp_username'])) {
  971. $data['config_ftp_username'] = $this->request->post['config_ftp_username'];
  972. } else {
  973. $data['config_ftp_username'] = $this->config->get('config_ftp_username');
  974. }
  975. if (isset($this->request->post['config_ftp_password'])) {
  976. $data['config_ftp_password'] = $this->request->post['config_ftp_password'];
  977. } else {
  978. $data['config_ftp_password'] = $this->config->get('config_ftp_password');
  979. }
  980. if (isset($this->request->post['config_ftp_root'])) {
  981. $data['config_ftp_root'] = $this->request->post['config_ftp_root'];
  982. } else {
  983. $data['config_ftp_root'] = $this->config->get('config_ftp_root');
  984. }
  985. if (isset($this->request->post['config_ftp_status'])) {
  986. $data['config_ftp_status'] = $this->request->post['config_ftp_status'];
  987. } else {
  988. $data['config_ftp_status'] = $this->config->get('config_ftp_status');
  989. }
  990. if (isset($this->request->post['config_mail_protocol'])) {
  991. $data['config_mail_protocol'] =