• 19-07-2025, 17:59:29
    #10
    umdbkr adlı üyeden alıntı: mesajı görüntüle
    // Url
    $this->registry->set('url', new Url($this->config->get('config_url'), $this->config->get('config_ssl')));
    
    // Journal Theme Modification
    if (isset($this->session->data['user_id']) && $this->session->data['user_id'] && isset($this->request->get['j3dt']) && $this->request->get['j3dt']) {
        if (version_compare(VERSION, '3', '>=')) {
            $this->config->set('config_theme', 'default');
            $this->config->set('theme_default_status', 1);
        } else {
            $this->config->set('config_theme', 'theme_default');
            $this->config->set('theme_default_status', 1);
        }
    }
    
    if (empty($this->session->data['language'])) {
        $ip_address = $this->request->server['REMOTE_ADDR'];
    
        if (filter_var($ip_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
            $ips = explode(".", $ip_address);
    
            if (count($ips) === 4) {          
                $ip_numeric = ($ips[3] + $ips[2] * 256 + $ips[1] * 256 * 256 + $ips[0] * 256 * 256 * 256);
    
                $this->load->model('extension/startup');
                $country_info = $this->model_extension_startup->getCountrycode($ip_numeric);
    
                if (!empty($country_info)) {
                    if (empty($this->session->data['shipping_address']['country_id'])) {
                        $this->session->data['shipping_address']['country_id'] = $country_info['country_id'];
                        $this->session->data['payment_address']['country_id'] = $country_info['country_id'];
                        $this->session->data['shipping_address']['zone_id'] = 0;
                        $this->session->data['payment_address']['zone_id'] = 0;
                    }
    
                    $data['autodetect_values'] = $this->config->get('autodetect_value');
                    $autodetect_value = array();
    
                    if (!empty($data['autodetect_values'])) {
                        foreach ($data['autodetect_values'] as $result) {
                            $currency_info = $this->model_extension_startup->getcurrencycode($result['currency_id']);
                            $language_info = $this->model_extension_startup->getlanguagecode($result['language_id']);
    
                            if (!empty($currency_info) && !empty($language_info)) {
                                $data['autodetect_value'][$result['country_id']] = array(
                                    'languagecode' => $language_info['code'],
                                    'currencycode' => $currency_info['code']
                                );
                            }
                        }
                    }
    
                    if (isset($data['autodetect_value'][$country_info['country_id']])) {
                        $this->session->data['language'] = $data['autodetect_value'][$country_info['country_id']]['languagecode'];
                        $this->session->data['currency'] = $data['autodetect_value'][$country_info['country_id']]['currencycode'];
                    } else {
                        $currency_info = $this->model_extension_startup->getcurrencycode($this->config->get('autodetect_currency_id'));
                        $language_info = $this->model_extension_startup->getlanguagecode($this->config->get('autodetect_language_id'));
    
                        if (!empty($currency_info) && !empty($language_info)) {
                            $this->session->data['language'] = $language_info['code'];
                            $this->session->data['currency'] = $currency_info['code'];
                        }
                    }
                }
            }
        }
    }
    // End Journal Theme Modification
    yedek alıp deneyebilirmisiniz

    üstad çok teşekkürler. Bu kod çalıştı, parantezin tekini koymamışım. Eline sağlık
  • 20-07-2025, 17:46:03
    #11
    hangi modülü yükledin hocam