/upload/admin/controller/setting/setting.php

https://bitbucket.org/mjalajel/opencart · PHP · 1080 lines · 903 code · 177 blank · 0 comment · 265 complexity · 797a3817f1a7acc8299831171c057de6 MD5 · raw file

  1. <?php
  2. class ControllerSettingSetting extends Controller {
  3. private $error = array();
  4. public function index() {
  5. $this->language->load('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->updateCurrencies();
  13. }
  14. $this->session->data['success'] = $this->language->get('text_success');
  15. $this->redirect($this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL'));
  16. }
  17. $this->data['heading_title'] = $this->language->get('heading_title');
  18. $this->data['text_select'] = $this->language->get('text_select');
  19. $this->data['text_none'] = $this->language->get('text_none');
  20. $this->data['text_yes'] = $this->language->get('text_yes');
  21. $this->data['text_no'] = $this->language->get('text_no');
  22. $this->data['text_items'] = $this->language->get('text_items');
  23. $this->data['text_product'] = $this->language->get('text_product');
  24. $this->data['text_voucher'] = $this->language->get('text_voucher');
  25. $this->data['text_tax'] = $this->language->get('text_tax');
  26. $this->data['text_account'] = $this->language->get('text_account');
  27. $this->data['text_checkout'] = $this->language->get('text_checkout');
  28. $this->data['text_stock'] = $this->language->get('text_stock');
  29. $this->data['text_affiliate'] = $this->language->get('text_affiliate');
  30. $this->data['text_return'] = $this->language->get('text_return');
  31. $this->data['text_image_manager'] = $this->language->get('text_image_manager');
  32. $this->data['text_shipping'] = $this->language->get('text_shipping');
  33. $this->data['text_payment'] = $this->language->get('text_payment');
  34. $this->data['text_mail'] = $this->language->get('text_mail');
  35. $this->data['text_smtp'] = $this->language->get('text_smtp');
  36. $this->data['entry_name'] = $this->language->get('entry_name');
  37. $this->data['entry_owner'] = $this->language->get('entry_owner');
  38. $this->data['entry_address'] = $this->language->get('entry_address');
  39. $this->data['entry_email'] = $this->language->get('entry_email');
  40. $this->data['entry_telephone'] = $this->language->get('entry_telephone');
  41. $this->data['entry_fax'] = $this->language->get('entry_fax');
  42. $this->data['entry_title'] = $this->language->get('entry_title');
  43. $this->data['entry_meta_description'] = $this->language->get('entry_meta_description');
  44. $this->data['entry_layout'] = $this->language->get('entry_layout');
  45. $this->data['entry_template'] = $this->language->get('entry_template');
  46. $this->data['entry_country'] = $this->language->get('entry_country');
  47. $this->data['entry_zone'] = $this->language->get('entry_zone');
  48. $this->data['entry_language'] = $this->language->get('entry_language');
  49. $this->data['entry_admin_language'] = $this->language->get('entry_admin_language');
  50. $this->data['entry_currency'] = $this->language->get('entry_currency');
  51. $this->data['entry_currency_auto'] = $this->language->get('entry_currency_auto');
  52. $this->data['entry_length_class'] = $this->language->get('entry_length_class');
  53. $this->data['entry_weight_class'] = $this->language->get('entry_weight_class');
  54. $this->data['entry_catalog_limit'] = $this->language->get('entry_catalog_limit');
  55. $this->data['entry_list_description_limit'] = $this->language->get('entry_list_description_limit');
  56. $this->data['entry_admin_limit'] = $this->language->get('entry_admin_limit');
  57. $this->data['entry_product_count'] = $this->language->get('entry_product_count');
  58. $this->data['entry_review'] = $this->language->get('entry_review');
  59. $this->data['entry_guest_review'] = $this->language->get('entry_guest_review');
  60. $this->data['entry_download'] = $this->language->get('entry_download');
  61. $this->data['entry_voucher_min'] = $this->language->get('entry_voucher_min');
  62. $this->data['entry_voucher_max'] = $this->language->get('entry_voucher_max');
  63. $this->data['entry_tax'] = $this->language->get('entry_tax');
  64. $this->data['entry_tax_default'] = $this->language->get('entry_tax_default');
  65. $this->data['entry_tax_customer'] = $this->language->get('entry_tax_customer');
  66. $this->data['entry_customer_online'] = $this->language->get('entry_customer_online');
  67. $this->data['entry_customer_group'] = $this->language->get('entry_customer_group');
  68. $this->data['entry_customer_group_display'] = $this->language->get('entry_customer_group_display');
  69. $this->data['entry_customer_price'] = $this->language->get('entry_customer_price');
  70. $this->data['entry_account'] = $this->language->get('entry_account');
  71. $this->data['entry_cart_weight'] = $this->language->get('entry_cart_weight');
  72. $this->data['entry_guest_checkout'] = $this->language->get('entry_guest_checkout');
  73. $this->data['entry_checkout'] = $this->language->get('entry_checkout');
  74. $this->data['entry_order_edit'] = $this->language->get('entry_order_edit');
  75. $this->data['entry_invoice_prefix'] = $this->language->get('entry_invoice_prefix');
  76. $this->data['entry_order_status'] = $this->language->get('entry_order_status');
  77. $this->data['entry_complete_status'] = $this->language->get('entry_complete_status');
  78. $this->data['entry_stock_display'] = $this->language->get('entry_stock_display');
  79. $this->data['entry_stock_warning'] = $this->language->get('entry_stock_warning');
  80. $this->data['entry_stock_checkout'] = $this->language->get('entry_stock_checkout');
  81. $this->data['entry_stock_status'] = $this->language->get('entry_stock_status');
  82. $this->data['entry_affiliate'] = $this->language->get('entry_affiliate');
  83. $this->data['entry_commission'] = $this->language->get('entry_commission');
  84. $this->data['entry_return'] = $this->language->get('entry_return');
  85. $this->data['entry_return_status'] = $this->language->get('entry_return_status');
  86. $this->data['entry_logo'] = $this->language->get('entry_logo');
  87. $this->data['entry_icon'] = $this->language->get('entry_icon');
  88. $this->data['entry_image_category'] = $this->language->get('entry_image_category');
  89. $this->data['entry_image_thumb'] = $this->language->get('entry_image_thumb');
  90. $this->data['entry_image_popup'] = $this->language->get('entry_image_popup');
  91. $this->data['entry_image_product'] = $this->language->get('entry_image_product');
  92. $this->data['entry_image_additional'] = $this->language->get('entry_image_additional');
  93. $this->data['entry_image_related'] = $this->language->get('entry_image_related');
  94. $this->data['entry_image_compare'] = $this->language->get('entry_image_compare');
  95. $this->data['entry_image_wishlist'] = $this->language->get('entry_image_wishlist');
  96. $this->data['entry_image_cart'] = $this->language->get('entry_image_cart');
  97. $this->data['entry_width'] = $this->language->get('entry_width');
  98. $this->data['entry_height'] = $this->language->get('entry_height');
  99. $this->data['entry_ftp_host'] = $this->language->get('entry_ftp_host');
  100. $this->data['entry_ftp_port'] = $this->language->get('entry_ftp_port');
  101. $this->data['entry_ftp_username'] = $this->language->get('entry_ftp_username');
  102. $this->data['entry_ftp_password'] = $this->language->get('entry_ftp_password');
  103. $this->data['entry_ftp_root'] = $this->language->get('entry_ftp_root');
  104. $this->data['entry_ftp_status'] = $this->language->get('entry_ftp_status');
  105. $this->data['entry_mail_protocol'] = $this->language->get('entry_mail_protocol');
  106. $this->data['entry_mail_parameter'] = $this->language->get('entry_mail_parameter');
  107. $this->data['entry_smtp_host'] = $this->language->get('entry_smtp_host');
  108. $this->data['entry_smtp_username'] = $this->language->get('entry_smtp_username');
  109. $this->data['entry_smtp_password'] = $this->language->get('entry_smtp_password');
  110. $this->data['entry_smtp_port'] = $this->language->get('entry_smtp_port');
  111. $this->data['entry_smtp_timeout'] = $this->language->get('entry_smtp_timeout');
  112. $this->data['entry_alert_mail'] = $this->language->get('entry_alert_mail');
  113. $this->data['entry_account_mail'] = $this->language->get('entry_account_mail');
  114. $this->data['entry_review_mail'] = $this->language->get('entry_review_mail');
  115. $this->data['entry_alert_emails'] = $this->language->get('entry_alert_emails');
  116. $this->data['entry_fraud_detection'] = $this->language->get('entry_fraud_detection');
  117. $this->data['entry_fraud_key'] = $this->language->get('entry_fraud_key');
  118. $this->data['entry_fraud_score'] = $this->language->get('entry_fraud_score');
  119. $this->data['entry_fraud_status'] = $this->language->get('entry_fraud_status');
  120. $this->data['entry_secure'] = $this->language->get('entry_secure');
  121. $this->data['entry_shared'] = $this->language->get('entry_shared');
  122. $this->data['entry_robots'] = $this->language->get('entry_robots');
  123. $this->data['entry_image_file_size'] = $this->language->get('entry_image_file_size');
  124. $this->data['entry_file_extension_allowed'] = $this->language->get('entry_file_extension_allowed');
  125. $this->data['entry_file_mime_allowed'] = $this->language->get('entry_file_mime_allowed');
  126. $this->data['entry_maintenance'] = $this->language->get('entry_maintenance');
  127. $this->data['entry_password'] = $this->language->get('entry_password');
  128. $this->data['entry_encryption'] = $this->language->get('entry_encryption');
  129. $this->data['entry_seo_url'] = $this->language->get('entry_seo_url');
  130. $this->data['entry_compression'] = $this->language->get('entry_compression');
  131. $this->data['entry_error_display'] = $this->language->get('entry_error_display');
  132. $this->data['entry_error_log'] = $this->language->get('entry_error_log');
  133. $this->data['entry_error_filename'] = $this->language->get('entry_error_filename');
  134. $this->data['entry_google_analytics'] = $this->language->get('entry_google_analytics');
  135. $this->data['help_currency'] = $this->language->get('help_currency');
  136. $this->data['help_currency_auto'] = $this->language->get('help_currency_auto');
  137. $this->data['help_catalog_limit'] = $this->language->get('help_catalog_limit');
  138. $this->data['help_list_description_limit'] = $this->language->get('help_list_description_limit');
  139. $this->data['help_admin_limit'] = $this->language->get('help_admin_limit');
  140. $this->data['help_product_count'] = $this->language->get('help_product_count');
  141. $this->data['help_review'] = $this->language->get('help_review');
  142. $this->data['help_guest_review'] = $this->language->get('help_guest_review');
  143. $this->data['help_voucher_min'] = $this->language->get('help_voucher_min');
  144. $this->data['help_voucher_max'] = $this->language->get('help_voucher_max');
  145. $this->data['help_tax_default'] = $this->language->get('help_tax_default');
  146. $this->data['help_tax_customer'] = $this->language->get('help_tax_customer');
  147. $this->data['help_customer_online'] = $this->language->get('help_customer_online');
  148. $this->data['help_customer_group'] = $this->language->get('help_customer_group');
  149. $this->data['help_customer_group_display'] = $this->language->get('help_customer_group_display');
  150. $this->data['help_customer_price'] = $this->language->get('help_customer_price');
  151. $this->data['help_account'] = $this->language->get('help_account');
  152. $this->data['help_cart_weight'] = $this->language->get('help_cart_weight');
  153. $this->data['help_guest_checkout'] = $this->language->get('help_guest_checkout');
  154. $this->data['help_checkout'] = $this->language->get('help_checkout');
  155. $this->data['help_order_edit'] = $this->language->get('help_order_edit');
  156. $this->data['help_invoice_prefix'] = $this->language->get('help_invoice_prefix');
  157. $this->data['help_order_status'] = $this->language->get('help_order_status');
  158. $this->data['help_complete_status'] = $this->language->get('help_complete_status');
  159. $this->data['help_stock_display'] = $this->language->get('help_stock_display');
  160. $this->data['help_stock_warning'] = $this->language->get('help_stock_warning');
  161. $this->data['help_stock_checkout'] = $this->language->get('help_stock_checkout');
  162. $this->data['help_stock_status'] = $this->language->get('help_stock_status');
  163. $this->data['help_affiliate'] = $this->language->get('help_affiliate');
  164. $this->data['help_commission'] = $this->language->get('help_commission');
  165. $this->data['help_return'] = $this->language->get('help_return');
  166. $this->data['help_return_status'] = $this->language->get('help_return_status');
  167. $this->data['help_icon'] = $this->language->get('help_icon');
  168. $this->data['help_ftp_root'] = $this->language->get('help_ftp_root');
  169. $this->data['help_mail_protocol'] = $this->language->get('help_mail_protocol');
  170. $this->data['help_mail_parameter'] = $this->language->get('help_mail_parameter');
  171. $this->data['help_account_mail'] = $this->language->get('help_account_mail');
  172. $this->data['help_alert_mail'] = $this->language->get('help_alert_mail');
  173. $this->data['help_review_mail'] = $this->language->get('help_review_mail');
  174. $this->data['help_alert_emails'] = $this->language->get('help_alert_emails');
  175. $this->data['help_fraud_detection'] = $this->language->get('help_fraud_detection');
  176. $this->data['help_fraud_score'] = $this->language->get('help_fraud_score');
  177. $this->data['help_fraud_status'] = $this->language->get('help_fraud_status');
  178. $this->data['help_secure'] = $this->language->get('help_secure');
  179. $this->data['help_shared'] = $this->language->get('help_shared');
  180. $this->data['help_robots'] = $this->language->get('help_robots');
  181. $this->data['help_seo_url'] = $this->language->get('help_seo_url');
  182. $this->data['help_image_file_size'] = $this->language->get('help_image_file_size');
  183. $this->data['help_file_extension_allowed'] = $this->language->get('help_file_extension_allowed');
  184. $this->data['help_file_mime_allowed'] = $this->language->get('help_file_mime_allowed');
  185. $this->data['help_maintenance'] = $this->language->get('help_maintenance');
  186. $this->data['help_password'] = $this->language->get('help_password');
  187. $this->data['help_encryption'] = $this->language->get('help_encryption');
  188. $this->data['help_compression'] = $this->language->get('help_compression');
  189. $this->data['help_google_analytics'] = $this->language->get('help_google_analytics');
  190. $this->data['button_save'] = $this->language->get('button_save');
  191. $this->data['button_cancel'] = $this->language->get('button_cancel');
  192. $this->data['button_edit'] = $this->language->get('button_edit');
  193. $this->data['button_clear'] = $this->language->get('button_clear');
  194. $this->data['tab_general'] = $this->language->get('tab_general');
  195. $this->data['tab_store'] = $this->language->get('tab_store');
  196. $this->data['tab_local'] = $this->language->get('tab_local');
  197. $this->data['tab_option'] = $this->language->get('tab_option');
  198. $this->data['tab_image'] = $this->language->get('tab_image');
  199. $this->data['tab_ftp'] = $this->language->get('tab_ftp');
  200. $this->data['tab_mail'] = $this->language->get('tab_mail');
  201. $this->data['tab_fraud'] = $this->language->get('tab_fraud');
  202. $this->data['tab_server'] = $this->language->get('tab_server');
  203. if (isset($this->error['warning'])) {
  204. $this->data['error_warning'] = $this->error['warning'];
  205. } else {
  206. $this->data['error_warning'] = '';
  207. }
  208. if (isset($this->error['name'])) {
  209. $this->data['error_name'] = $this->error['name'];
  210. } else {
  211. $this->data['error_name'] = '';
  212. }
  213. if (isset($this->error['owner'])) {
  214. $this->data['error_owner'] = $this->error['owner'];
  215. } else {
  216. $this->data['error_owner'] = '';
  217. }
  218. if (isset($this->error['address'])) {
  219. $this->data['error_address'] = $this->error['address'];
  220. } else {
  221. $this->data['error_address'] = '';
  222. }
  223. if (isset($this->error['email'])) {
  224. $this->data['error_email'] = $this->error['email'];
  225. } else {
  226. $this->data['error_email'] = '';
  227. }
  228. if (isset($this->error['telephone'])) {
  229. $this->data['error_telephone'] = $this->error['telephone'];
  230. } else {
  231. $this->data['error_telephone'] = '';
  232. }
  233. if (isset($this->error['title'])) {
  234. $this->data['error_title'] = $this->error['title'];
  235. } else {
  236. $this->data['error_title'] = '';
  237. }
  238. if (isset($this->error['customer_group_display'])) {
  239. $this->data['error_customer_group_display'] = $this->error['customer_group_display'];
  240. } else {
  241. $this->data['error_customer_group_display'] = '';
  242. }
  243. if (isset($this->error['voucher_min'])) {
  244. $this->data['error_voucher_min'] = $this->error['voucher_min'];
  245. } else {
  246. $this->data['error_voucher_min'] = '';
  247. }
  248. if (isset($this->error['voucher_max'])) {
  249. $this->data['error_voucher_max'] = $this->error['voucher_max'];
  250. } else {
  251. $this->data['error_voucher_max'] = '';
  252. }
  253. if (isset($this->error['ftp_host'])) {
  254. $this->data['error_ftp_host'] = $this->error['ftp_host'];
  255. } else {
  256. $this->data['error_ftp_host'] = '';
  257. }
  258. if (isset($this->error['ftp_port'])) {
  259. $this->data['error_ftp_port'] = $this->error['ftp_port'];
  260. } else {
  261. $this->data['error_ftp_port'] = '';
  262. }
  263. if (isset($this->error['ftp_username'])) {
  264. $this->data['error_ftp_username'] = $this->error['ftp_username'];
  265. } else {
  266. $this->data['error_ftp_username'] = '';
  267. }
  268. if (isset($this->error['ftp_password'])) {
  269. $this->data['error_ftp_password'] = $this->error['ftp_password'];
  270. } else {
  271. $this->data['error_ftp_password'] = '';
  272. }
  273. if (isset($this->error['image_category'])) {
  274. $this->data['error_image_category'] = $this->error['image_category'];
  275. } else {
  276. $this->data['error_image_category'] = '';
  277. }
  278. if (isset($this->error['image_thumb'])) {
  279. $this->data['error_image_thumb'] = $this->error['image_thumb'];
  280. } else {
  281. $this->data['error_image_thumb'] = '';
  282. }
  283. if (isset($this->error['image_popup'])) {
  284. $this->data['error_image_popup'] = $this->error['image_popup'];
  285. } else {
  286. $this->data['error_image_popup'] = '';
  287. }
  288. if (isset($this->error['image_product'])) {
  289. $this->data['error_image_product'] = $this->error['image_product'];
  290. } else {
  291. $this->data['error_image_product'] = '';
  292. }
  293. if (isset($this->error['image_additional'])) {
  294. $this->data['error_image_additional'] = $this->error['image_additional'];
  295. } else {
  296. $this->data['error_image_additional'] = '';
  297. }
  298. if (isset($this->error['image_related'])) {
  299. $this->data['error_image_related'] = $this->error['image_related'];
  300. } else {
  301. $this->data['error_image_related'] = '';
  302. }
  303. if (isset($this->error['image_compare'])) {
  304. $this->data['error_image_compare'] = $this->error['image_compare'];
  305. } else {
  306. $this->data['error_image_compare'] = '';
  307. }
  308. if (isset($this->error['image_wishlist'])) {
  309. $this->data['error_image_wishlist'] = $this->error['image_wishlist'];
  310. } else {
  311. $this->data['error_image_wishlist'] = '';
  312. }
  313. if (isset($this->error['image_cart'])) {
  314. $this->data['error_image_cart'] = $this->error['image_cart'];
  315. } else {
  316. $this->data['error_image_cart'] = '';
  317. }
  318. if (isset($this->error['error_filename'])) {
  319. $this->data['error_error_filename'] = $this->error['error_filename'];
  320. } else {
  321. $this->data['error_error_filename'] = '';
  322. }
  323. if (isset($this->error['catalog_limit'])) {
  324. $this->data['error_catalog_limit'] = $this->error['catalog_limit'];
  325. } else {
  326. $this->data['error_catalog_limit'] = '';
  327. }
  328. if (isset($this->error['list_description_limit'])) {
  329. $this->data['error_list_description_limit'] = $this->error['list_description_limit'];
  330. } else {
  331. $this->data['error_list_description_limit'] = '';
  332. }
  333. if (isset($this->error['admin_limit'])) {
  334. $this->data['error_admin_limit'] = $this->error['admin_limit'];
  335. } else {
  336. $this->data['error_admin_limit'] = '';
  337. }
  338. if (isset($this->error['encryption'])) {
  339. $this->data['error_encryption'] = $this->error['encryption'];
  340. } else {
  341. $this->data['error_encryption'] = '';
  342. }
  343. $this->data['breadcrumbs'] = array();
  344. $this->data['breadcrumbs'][] = array(
  345. 'text' => $this->language->get('text_home'),
  346. 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL')
  347. );
  348. $this->data['breadcrumbs'][] = array(
  349. 'text' => $this->language->get('heading_title'),
  350. 'href' => $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL')
  351. );
  352. if (isset($this->session->data['success'])) {
  353. $this->data['success'] = $this->session->data['success'];
  354. unset($this->session->data['success']);
  355. } else {
  356. $this->data['success'] = '';
  357. }
  358. $this->data['action'] = $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL');
  359. $this->data['cancel'] = $this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL');
  360. $this->data['token'] = $this->session->data['token'];
  361. if (isset($this->request->post['config_name'])) {
  362. $this->data['config_name'] = $this->request->post['config_name'];
  363. } else {
  364. $this->data['config_name'] = $this->config->get('config_name');
  365. }
  366. if (isset($this->request->post['config_owner'])) {
  367. $this->data['config_owner'] = $this->request->post['config_owner'];
  368. } else {
  369. $this->data['config_owner'] = $this->config->get('config_owner');
  370. }
  371. if (isset($this->request->post['config_address'])) {
  372. $this->data['config_address'] = $this->request->post['config_address'];
  373. } else {
  374. $this->data['config_address'] = $this->config->get('config_address');
  375. }
  376. if (isset($this->request->post['config_email'])) {
  377. $this->data['config_email'] = $this->request->post['config_email'];
  378. } else {
  379. $this->data['config_email'] = $this->config->get('config_email');
  380. }
  381. if (isset($this->request->post['config_telephone'])) {
  382. $this->data['config_telephone'] = $this->request->post['config_telephone'];
  383. } else {
  384. $this->data['config_telephone'] = $this->config->get('config_telephone');
  385. }
  386. if (isset($this->request->post['config_fax'])) {
  387. $this->data['config_fax'] = $this->request->post['config_fax'];
  388. } else {
  389. $this->data['config_fax'] = $this->config->get('config_fax');
  390. }
  391. if (isset($this->request->post['config_title'])) {
  392. $this->data['config_title'] = $this->request->post['config_title'];
  393. } else {
  394. $this->data['config_title'] = $this->config->get('config_title');
  395. }
  396. if (isset($this->request->post['config_meta_description'])) {
  397. $this->data['config_meta_description'] = $this->request->post['config_meta_description'];
  398. } else {
  399. $this->data['config_meta_description'] = $this->config->get('config_meta_description');
  400. }
  401. if (isset($this->request->post['config_layout_id'])) {
  402. $this->data['config_layout_id'] = $this->request->post['config_layout_id'];
  403. } else {
  404. $this->data['config_layout_id'] = $this->config->get('config_layout_id');
  405. }
  406. $this->load->model('design/layout');
  407. $this->data['layouts'] = $this->model_design_layout->getLayouts();
  408. if (isset($this->request->post['config_template'])) {
  409. $this->data['config_template'] = $this->request->post['config_template'];
  410. } else {
  411. $this->data['config_template'] = $this->config->get('config_template');
  412. }
  413. $this->data['templates'] = array();
  414. $directories = glob(DIR_CATALOG . 'view/theme/*', GLOB_ONLYDIR);
  415. foreach ($directories as $directory) {
  416. $this->data['templates'][] = basename($directory);
  417. }
  418. if (isset($this->request->post['config_country_id'])) {
  419. $this->data['config_country_id'] = $this->request->post['config_country_id'];
  420. } else {
  421. $this->data['config_country_id'] = $this->config->get('config_country_id');
  422. }
  423. $this->load->model('localisation/country');
  424. $this->data['countries'] = $this->model_localisation_country->getCountries();
  425. if (isset($this->request->post['config_zone_id'])) {
  426. $this->data['config_zone_id'] = $this->request->post['config_zone_id'];
  427. } else {
  428. $this->data['config_zone_id'] = $this->config->get('config_zone_id');
  429. }
  430. if (isset($this->request->post['config_language'])) {
  431. $this->data['config_language'] = $this->request->post['config_language'];
  432. } else {
  433. $this->data['config_language'] = $this->config->get('config_language');
  434. }
  435. $this->load->model('localisation/language');
  436. $this->data['languages'] = $this->model_localisation_language->getLanguages();
  437. if (isset($this->request->post['config_admin_language'])) {
  438. $this->data['config_admin_language'] = $this->request->post['config_admin_language'];
  439. } else {
  440. $this->data['config_admin_language'] = $this->config->get('config_admin_language');
  441. }
  442. if (isset($this->request->post['config_currency'])) {
  443. $this->data['config_currency'] = $this->request->post['config_currency'];
  444. } else {
  445. $this->data['config_currency'] = $this->config->get('config_currency');
  446. }
  447. if (isset($this->request->post['config_currency_auto'])) {
  448. $this->data['config_currency_auto'] = $this->request->post['config_currency_auto'];
  449. } else {
  450. $this->data['config_currency_auto'] = $this->config->get('config_currency_auto');
  451. }
  452. $this->load->model('localisation/currency');
  453. $this->data['currencies'] = $this->model_localisation_currency->getCurrencies();
  454. if (isset($this->request->post['config_length_class_id'])) {
  455. $this->data['config_length_class_id'] = $this->request->post['config_length_class_id'];
  456. } else {
  457. $this->data['config_length_class_id'] = $this->config->get('config_length_class_id');
  458. }
  459. $this->load->model('localisation/length_class');
  460. $this->data['length_classes'] = $this->model_localisation_length_class->getLengthClasses();
  461. if (isset($this->request->post['config_weight_class_id'])) {
  462. $this->data['config_weight_class_id'] = $this->request->post['config_weight_class_id'];
  463. } else {
  464. $this->data['config_weight_class_id'] = $this->config->get('config_weight_class_id');
  465. }
  466. $this->load->model('localisation/weight_class');
  467. $this->data['weight_classes'] = $this->model_localisation_weight_class->getWeightClasses();
  468. if (isset($this->request->post['config_catalog_limit'])) {
  469. $this->data['config_catalog_limit'] = $this->request->post['config_catalog_limit'];
  470. } else {
  471. $this->data['config_catalog_limit'] = $this->config->get('config_catalog_limit');
  472. }
  473. if (isset($this->request->post['config_list_description_limit'])) {
  474. $this->data['config_list_description_limit'] = $this->request->post['config_list_description_limit'];
  475. } else {
  476. $this->data['config_list_description_limit'] = $this->config->get('config_list_description_limit');
  477. }
  478. if (isset($this->request->post['config_admin_limit'])) {
  479. $this->data['config_admin_limit'] = $this->request->post['config_admin_limit'];
  480. } else {
  481. $this->data['config_admin_limit'] = $this->config->get('config_admin_limit');
  482. }
  483. if (isset($this->request->post['config_product_count'])) {
  484. $this->data['config_product_count'] = $this->request->post['config_product_count'];
  485. } else {
  486. $this->data['config_product_count'] = $this->config->get('config_product_count');
  487. }
  488. if (isset($this->request->post['config_review_status'])) {
  489. $this->data['config_review_status'] = $this->request->post['config_review_status'];
  490. } else {
  491. $this->data['config_review_status'] = $this->config->get('config_review_status');
  492. }
  493. if (isset($this->request->post['config_guest_review'])) {
  494. $this->data['config_guest_review'] = $this->request->post['config_guest_review'];
  495. } else {
  496. $this->data['config_guest_review'] = $this->config->get('config_guest_review');
  497. }
  498. if (isset($this->request->post['config_download'])) {
  499. $this->data['config_download'] = $this->request->post['config_download'];
  500. } else {
  501. $this->data['config_download'] = $this->config->get('config_download');
  502. }
  503. if (isset($this->request->post['config_voucher_min'])) {
  504. $this->data['config_voucher_min'] = $this->request->post['config_voucher_min'];
  505. } else {
  506. $this->data['config_voucher_min'] = $this->config->get('config_voucher_min');
  507. }
  508. if (isset($this->request->post['config_voucher_max'])) {
  509. $this->data['config_voucher_max'] = $this->request->post['config_voucher_max'];
  510. } else {
  511. $this->data['config_voucher_max'] = $this->config->get('config_voucher_max');
  512. }
  513. if (isset($this->request->post['config_tax'])) {
  514. $this->data['config_tax'] = $this->request->post['config_tax'];
  515. } else {
  516. $this->data['config_tax'] = $this->config->get('config_tax');
  517. }
  518. if (isset($this->request->post['config_vat'])) {
  519. $this->data['config_vat'] = $this->request->post['config_vat'];
  520. } else {
  521. $this->data['config_vat'] = $this->config->get('config_vat');
  522. }
  523. if (isset($this->request->post['config_tax_default'])) {
  524. $this->data['config_tax_default'] = $this->request->post['config_tax_default'];
  525. } else {
  526. $this->data['config_tax_default'] = $this->config->get('config_tax_default');
  527. }
  528. if (isset($this->request->post['config_tax_customer'])) {
  529. $this->data['config_tax_customer'] = $this->request->post['config_tax_customer'];
  530. } else {
  531. $this->data['config_tax_customer'] = $this->config->get('config_tax_customer');
  532. }
  533. if (isset($this->request->post['config_customer_online'])) {
  534. $this->data['config_customer_online'] = $this->request->post['config_customer_online'];
  535. } else {
  536. $this->data['config_customer_online'] = $this->config->get('config_customer_online');
  537. }
  538. if (isset($this->request->post['config_customer_group_id'])) {
  539. $this->data['config_customer_group_id'] = $this->request->post['config_customer_group_id'];
  540. } else {
  541. $this->data['config_customer_group_id'] = $this->config->get('config_customer_group_id');
  542. }
  543. $this->load->model('sale/customer_group');
  544. $this->data['customer_groups'] = $this->model_sale_customer_group->getCustomerGroups();
  545. if (isset($this->request->post['config_customer_group_display'])) {
  546. $this->data['config_customer_group_display'] = $this->request->post['config_customer_group_display'];
  547. } elseif ($this->config->get('config_customer_group_display')) {
  548. $this->data['config_customer_group_display'] = $this->config->get('config_customer_group_display');
  549. } else {
  550. $this->data['config_customer_group_display'] = array();
  551. }
  552. if (isset($this->request->post['config_customer_price'])) {
  553. $this->data['config_customer_price'] = $this->request->post['config_customer_price'];
  554. } else {
  555. $this->data['config_customer_price'] = $this->config->get('config_customer_price');
  556. }
  557. if (isset($this->request->post['config_account_id'])) {
  558. $this->data['config_account_id'] = $this->request->post['config_account_id'];
  559. } else {
  560. $this->data['config_account_id'] = $this->config->get('config_account_id');
  561. }
  562. $this->load->model('catalog/information');
  563. $this->data['informations'] = $this->model_catalog_information->getInformations();
  564. if (isset($this->request->post['config_cart_weight'])) {
  565. $this->data['config_cart_weight'] = $this->request->post['config_cart_weight'];
  566. } else {
  567. $this->data['config_cart_weight'] = $this->config->get('config_cart_weight');
  568. }
  569. if (isset($this->request->post['config_guest_checkout'])) {
  570. $this->data['config_guest_checkout'] = $this->request->post['config_guest_checkout'];
  571. } else {
  572. $this->data['config_guest_checkout'] = $this->config->get('config_guest_checkout');
  573. }
  574. if (isset($this->request->post['config_checkout_id'])) {
  575. $this->data['config_checkout_id'] = $this->request->post['config_checkout_id'];
  576. } else {
  577. $this->data['config_checkout_id'] = $this->config->get('config_checkout_id');
  578. }
  579. if (isset($this->request->post['config_order_edit'])) {
  580. $this->data['config_order_edit'] = $this->request->post['config_order_edit'];
  581. } elseif ($this->config->get('config_order_edit')) {
  582. $this->data['config_order_edit'] = $this->config->get('config_order_edit');
  583. } else {
  584. $this->data['config_order_edit'] = 7;
  585. }
  586. if (isset($this->request->post['config_invoice_prefix'])) {
  587. $this->data['config_invoice_prefix'] = $this->request->post['config_invoice_prefix'];
  588. } elseif ($this->config->get('config_invoice_prefix')) {
  589. $this->data['config_invoice_prefix'] = $this->config->get('config_invoice_prefix');
  590. } else {
  591. $this->data['config_invoice_prefix'] = 'INV-' . date('Y') . '-00';
  592. }
  593. if (isset($this->request->post['config_order_status_id'])) {
  594. $this->data['config_order_status_id'] = $this->request->post['config_order_status_id'];
  595. } else {
  596. $this->data['config_order_status_id'] = $this->config->get('config_order_status_id');
  597. }
  598. if (isset($this->request->post['config_complete_status_id'])) {
  599. $this->data['config_complete_status_id'] = $this->request->post['config_complete_status_id'];
  600. } else {
  601. $this->data['config_complete_status_id'] = $this->config->get('config_complete_status_id');
  602. }
  603. $this->load->model('localisation/order_status');
  604. $this->data['order_statuses'] = $this->model_localisation_order_status->getOrderStatuses();
  605. if (isset($this->request->post['config_stock_display'])) {
  606. $this->data['config_stock_display'] = $this->request->post['config_stock_display'];
  607. } else {
  608. $this->data['config_stock_display'] = $this->config->get('config_stock_display');
  609. }
  610. if (isset($this->request->post['config_stock_warning'])) {
  611. $this->data['config_stock_warning'] = $this->request->post['config_stock_warning'];
  612. } else {
  613. $this->data['config_stock_warning'] = $this->config->get('config_stock_warning');
  614. }
  615. if (isset($this->request->post['config_stock_checkout'])) {
  616. $this->data['config_stock_checkout'] = $this->request->post['config_stock_checkout'];
  617. } else {
  618. $this->data['config_stock_checkout'] = $this->config->get('config_stock_checkout');
  619. }
  620. if (isset($this->request->post['config_stock_status_id'])) {
  621. $this->data['config_stock_status_id'] = $this->request->post['config_stock_status_id'];
  622. } else {
  623. $this->data['config_stock_status_id'] = $this->config->get('config_stock_status_id');
  624. }
  625. $this->load->model('localisation/stock_status');
  626. $this->data['stock_statuses'] = $this->model_localisation_stock_status->getStockStatuses();
  627. if (isset($this->request->post['config_affiliate_id'])) {
  628. $this->data['config_affiliate_id'] = $this->request->post['config_affiliate_id'];
  629. } else {
  630. $this->data['config_affiliate_id'] = $this->config->get('config_affiliate_id');
  631. }
  632. if (isset($this->request->post['config_commission'])) {
  633. $this->data['config_commission'] = $this->request->post['config_commission'];
  634. } elseif ($this->config->has('config_commission')) {
  635. $this->data['config_commission'] = $this->config->get('config_commission');
  636. } else {
  637. $this->data['config_commission'] = '5.00';
  638. }
  639. if (isset($this->request->post['config_return_id'])) {
  640. $this->data['config_return_id'] = $this->request->post['config_return_id'];
  641. } else {
  642. $this->data['config_return_id'] = $this->config->get('config_return_id');
  643. }
  644. if (isset($this->request->post['config_return_status_id'])) {
  645. $this->data['config_return_status_id'] = $this->request->post['config_return_status_id'];
  646. } else {
  647. $this->data['config_return_status_id'] = $this->config->get('config_return_status_id');
  648. }
  649. $this->load->model('localisation/return_status');
  650. $this->data['return_statuses'] = $this->model_localisation_return_status->getReturnStatuses();
  651. $this->load->model('tool/image');
  652. if (isset($this->request->post['config_logo'])) {
  653. $this->data['config_logo'] = $this->request->post['config_logo'];
  654. } else {
  655. $this->data['config_logo'] = $this->config->get('config_logo');
  656. }
  657. if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo')) && is_file(DIR_IMAGE . $this->config->get('config_logo'))) {
  658. $this->data['logo'] = $this->model_tool_image->resize($this->config->get('config_logo'), 100, 100);
  659. } else {
  660. $this->data['logo'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
  661. }
  662. if (isset($this->request->post['config_icon'])) {
  663. $this->data['config_icon'] = $this->request->post['config_icon'];
  664. } else {
  665. $this->data['config_icon'] = $this->config->get('config_icon');
  666. }
  667. if ($this->config->get('config_icon') && file_exists(DIR_IMAGE . $this->config->get('config_icon')) && is_file(DIR_IMAGE . $this->config->get('config_icon'))) {
  668. $this->data['icon'] = $this->model_tool_image->resize($this->config->get('config_icon'), 100, 100);
  669. } else {
  670. $this->data['icon'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
  671. }
  672. $this->data['no_image'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
  673. if (isset($this->request->post['config_image_category_width'])) {
  674. $this->data['config_image_category_width'] = $this->request->post['config_image_category_width'];
  675. } else {
  676. $this->data['config_image_category_width'] = $this->config->get('config_image_category_width');
  677. }
  678. if (isset($this->request->post['config_image_category_height'])) {
  679. $this->data['config_image_category_height'] = $this->request->post['config_image_category_height'];
  680. } else {
  681. $this->data['config_image_category_height'] = $this->config->get('config_image_category_height');
  682. }
  683. if (isset($this->request->post['config_image_thumb_width'])) {
  684. $this->data['config_image_thumb_width'] = $this->request->post['config_image_thumb_width'];
  685. } else {
  686. $this->data['config_image_thumb_width'] = $this->config->get('config_image_thumb_width');
  687. }
  688. if (isset($this->request->post['config_image_thumb_height'])) {
  689. $this->data['config_image_thumb_height'] = $this->request->post['config_image_thumb_height'];
  690. } else {
  691. $this->data['config_image_thumb_height'] = $this->config->get('config_image_thumb_height');
  692. }
  693. if (isset($this->request->post['config_image_popup_width'])) {
  694. $this->data['config_image_popup_width'] = $this->request->post['config_image_popup_width'];
  695. } else {
  696. $this->data['config_image_popup_width'] = $this->config->get('config_image_popup_width');
  697. }
  698. if (isset($this->request->post['config_image_popup_height'])) {
  699. $this->data['config_image_popup_height'] = $this->request->post['config_image_popup_height'];
  700. } else {
  701. $this->data['config_image_popup_height'] = $this->config->get('config_image_popup_height');
  702. }
  703. if (isset($this->request->post['config_image_product_width'])) {
  704. $this->data['config_image_product_width'] = $this->request->post['config_image_product_width'];
  705. } else {
  706. $this->data['config_image_product_width'] = $this->config->get('config_image_product_width');
  707. }
  708. if (isset($this->request->post['config_image_product_height'])) {
  709. $this->data['config_image_product_height'] = $this->request->post['config_image_product_height'];
  710. } else {
  711. $this->data['config_image_product_height'] = $this->config->get('config_image_product_height');
  712. }
  713. if (isset($this->request->post['config_image_additional_width'])) {
  714. $this->data['config_image_additional_width'] = $this->request->post['config_image_additional_width'];
  715. } else {
  716. $this->data['config_image_additional_width'] = $this->config->get('config_image_additional_width');
  717. }
  718. if (isset($this->request->post['config_image_additional_height'])) {
  719. $this->data['config_image_additional_height'] = $this->request->post['config_image_additional_height'];
  720. } else {
  721. $this->data['config_image_additional_height'] = $this->config->get('config_image_additional_height');
  722. }
  723. if (isset($this->request->post['config_image_related_width'])) {
  724. $this->data['config_image_related_width'] = $this->request->post['config_image_related_width'];
  725. } else {
  726. $this->data['config_image_related_width'] = $this->config->get('config_image_related_width');
  727. }
  728. if (isset($this->request->post['config_image_related_height'])) {
  729. $this->data['config_image_related_height'] = $this->request->post['config_image_related_height'];
  730. } else {
  731. $this->data['config_image_related_height'] = $this->config->get('config_image_related_height');
  732. }
  733. if (isset($this->request->post['config_image_compare_width'])) {
  734. $this->data['config_image_compare_width'] = $this->request->post['config_image_compare_width'];
  735. } else {
  736. $this->data['config_image_compare_width'] = $this->config->get('config_image_compare_width');
  737. }
  738. if (isset($this->request->post['config_image_compare_height'])) {
  739. $this->data['config_image_compare_height'] = $this->request->post['config_image_compare_height'];
  740. } else {
  741. $this->data['config_image_compare_height'] = $this->config->get('config_image_compare_height');
  742. }
  743. if (isset($this->request->post['config_image_wishlist_width'])) {
  744. $this->data['config_image_wishlist_width'] = $this->request->post['config_image_wishlist_width'];
  745. } else {
  746. $this->data['config_image_wishlist_width'] = $this->config->get('config_image_wishlist_width');
  747. }
  748. if (isset($this->request->post['config_image_wishlist_height'])) {
  749. $this->data['config_image_wishlist_height'] = $this->request->post['config_image_wishlist_height'];
  750. } else {
  751. $this->data['config_image_wishlist_height'] = $this->config->get('config_image_wishlist_height');
  752. }
  753. if (isset($this->request->post['config_image_cart_width'])) {
  754. $this->data['config_image_cart_width'] = $this->request->post['config_image_cart_width'];
  755. } else {
  756. $this->data['config_image_cart_width'] = $this->config->get('config_image_cart_width');
  757. }
  758. if (isset($this->request->post['config_image_cart_height'])) {
  759. $this->data['config_image_cart_height'] = $this->request->post['config_image_cart_height'];
  760. } else {
  761. $this->data['config_image_cart_height'] = $this->config->get('config_image_cart_height');
  762. }
  763. if (isset($this->request->post['config_ftp_host'])) {
  764. $this->data['config_ftp_host'] = $this->request->post['config_ftp_host'];
  765. } elseif ($this->config->get('config_ftp_host')) {
  766. $this->data['config_ftp_host'] = $this->config->get('config_ftp_host');
  767. } else {
  768. $this->data['config_ftp_host'] = str_replace('www.', '', $this->request->server['HTTP_HOST']);
  769. }
  770. if (isset($this->request->post['config_ftp_port'])) {
  771. $this->data['config_ftp_port'] = $this->request->post['config_ftp_port'];
  772. } elseif ($this->config->get('config_ftp_port')) {
  773. $this->data['config_ftp_port'] = $this->config->get('config_ftp_port');
  774. } else {
  775. $this->data['config_ftp_port'] = 21;
  776. }
  777. if (isset($this->request->post['config_ftp_username'])) {
  778. $this->data['config_ftp_username'] = $this->request->post['config_ftp_username'];
  779. } else {
  780. $this->data['config_ftp_username'] = $this->config->get('config_ftp_username');
  781. }
  782. if (isset($this->request->post['config_ftp_password'])) {
  783. $this->data['config_ftp_password'] = $this->request->post['config_ftp_password'];
  784. } else {
  785. $this->data['config_ftp_password'] = $this->config->get('config_ftp_password');
  786. }
  787. if (isset($this->request->post['config_ftp_root'])) {
  788. $this->data['config_ftp_root'] = $this->request->post['config_ftp_root'];
  789. } else {
  790. $this->data['config_ftp_root'] = $this->config->get('config_ftp_root');
  791. }
  792. if (isset($this->request->post['config_ftp_status'])) {
  793. $this->data['config_ftp_status'] = $this->request->post['config_ftp_status'];
  794. } else {
  795. $this->data['config_ftp_status'] = $this->config->get('config_ftp_status');
  796. }
  797. if (isset($this->request->post['config_mail_protocol'])) {
  798. $this->data['config_mail_protocol'] = $this->request->post['config_mail_protocol'];
  799. } else {
  800. $this->data['config_mail_protocol'] = $this->config->get('config_mail_protocol');
  801. }
  802. if (isset($this->request->post['config_mail_parameter'])) {
  803. $this->data['config_mail_parameter'] = $this->request->post['config_mail_parameter'];
  804. } else {
  805. $this->data['config_mail_parameter'] = $this->config->get('config_mail_parameter');
  806. }
  807. if (isset($this->request->post['config_smtp_host'])) {
  808. $this->data['config_smtp_host'] = $this->request->post['config_smtp_host'];
  809. } else {
  810. $this->data['config_smtp_host'] = $this->config->get('config_smtp_host');
  811. }
  812. if (isset($this->request->post['config_smtp_username'])) {
  813. $this->data['config_smtp_username'] = $this->request->post['config_smtp_username'];
  814. } else {
  815. $this->data['config_smtp_username'] = $this->config->get('config_smtp_username');
  816. }
  817. if (isset($this->request->post['config_smtp_password'])) {
  818. $this->data['config_smtp_password'] = $this->request->post['config_smtp_password'];
  819. } else {
  820. $this->data['config_smtp_password'] = $this->config->get('config_smtp_password');
  821. }
  822. if (isset($this->request->post['config_smtp_port'])) {
  823. $this->data['config_smtp_port'] = $this->request->post['config_smtp_port'];
  824. } elseif ($this->config->get('config_smtp_port')) {
  825. $this->data['config_smtp_port'] = $this->config->get('config_smtp_port');
  826. } else {
  827. $this->data['config_smtp_port'] = 25;
  828. }
  829. if (isset($this->request->post['config_smtp_timeout'])) {
  830. $this->data['config_smtp_timeout'] = $this->request->post['config_smtp_timeout'];
  831. } elseif ($this->config->get('config_smtp_timeout')) {
  832. $this->data['config_smtp_timeout'] = $this->config->get('config_smtp_timeout');
  833. } else {
  834. $this->data['config_smtp_timeout'] = 5;
  835. }
  836. if (isset($this->request->post['config_alert_mail'])) {
  837. $this->data['config_alert_mail'] = $this->request->post['config_alert_mail'];
  838. } else {
  839. $this->data['config_alert_mail'] = $this->config->get('config_alert_mail');
  840. }
  841. if (isset($this->request->post['config_account_mail'])) {
  842. $this->data['config_account_mail'] = $this->request->post['config_account_mail'];
  843. } else {
  844. $this->data['config_account_mail'] = $this->config->get('config_account_mail');
  845. }
  846. if (isset($this->request->post['config_review_mail'])) {
  847. $this->data['config_review_mail'] = $this->request->post['config_review_mail'];
  848. } else {
  849. $this->data['config_review_mail'] = $this->config->get('config_review_mail');
  850. }
  851. if (isset($this->request->post['config_alert_emails'])) {
  852. $this->data['config_alert_emails'] = $this->request->post['config_alert_emails'];
  853. } else {
  854. $this->data['config_alert_emails'] = $this->config->get('config_alert_emails');
  855. }
  856. if (isset($this->request->post['config_fraud_detection'])) {
  857. $this->data['config_fraud_detection'] = $this->request->post['config_fraud_detection'];
  858. } else {
  859. $this->data['config_fraud_detection'] = $this->config->get('config_fraud_detection');
  860. }
  861. if (isset($this->request->post['config_fraud_key'])) {
  862. $this->data['config_fraud_key'] = $this->request->post['config_fraud_key'];
  863. } else {
  864. $this->data['config_fraud_key'] = $this->config->get('config_fraud_key');
  865. }
  866. if (isset($this->request->post['config_fraud_score'])) {
  867. $this->data['config_fraud_score'] = $this->request->post['config_fraud_score'];
  868. } else {
  869. $this->data['config_fraud_score'] = $this->config->get('config_fraud_score');
  870. }
  871. if (isset($this->request->post['config_fraud_status_id'])) {
  872. $this->data['config_fraud_status_id'] = $this->request->post['config_fraud_status_id'];
  873. } else {
  874. $this->data['config_fraud_status_id'] = $this->config->get('config_fraud_status_id');
  875. }
  876. if (isset($this->request->post['config_secure'])) {
  877. $this->data['config_secure'] = $this->request->post['config_secure'];
  878. } else {
  879. $this->data['config_secure'] = $this->config->get('config_secure');
  880. }
  881. if (isset($this->request->post['config_shared'])) {
  882. $this->data['config_shared'] = $this->request->post['config_shared'];
  883. } else {
  884. $this->data['config_shared'] = $this->config->get('config_shared');
  885. }
  886. if (isset($this->request->post['config_robots'])) {
  887. $this->data['config_robots'] = $this->request->post['config_robots'];
  888. } else {
  889. $this->data['config_robots'] = $this->config->get('config_robots');
  890. }
  891. if (isset($this->request->post['config_seo_url'])) {
  892. $this->data['config_seo_url'] = $this->request->post['config_seo_url'];
  893. } else {
  894. $this->data['config_seo_url'] = $this->config->get('config_seo_url');
  895. }
  896. if (isset($this->request->post['config_image_file_size'])) {
  897. $this->data['config_image_file_size'] = $this->request->post['config_image_file_size'];
  898. } elseif ($this->config->get('config_image_file_size')) {
  899. $this->data['config_image_file_size'] = $this->config->get('config_image_file_size');
  900. } else {
  901. $this->data['config_image_file_size'] = 300000;
  902. }
  903. if (isset($this->request->post['config_