tr-opencart

     
avatar Şuanki Zaman: 03-29-2024, 07:38 AMHoşgeldin Misafir !
  Şifremi Hatırlat   kayıt ol
opencart temaları

Fatal error: Cannot access protected property Mail

Konuyu görüntüleyenler: 1 Misafir
 
Değerlendir:
  • 0 Oy - 0 Yüzde
  • 1
  • 2
  • 3
  • 4
  • 5
%
Cevapla  Gönder 
v  v
Yazar  krmtrpn - Görüntüleme - Okunma  2114 - Yorum  1

krmtrpnv
Acemi Üye
**
Üye user avatar
Çevrimdışı

Mesajlar: 1
Konular: 1
Katılma Tarihi: Jul 2015
Rep Puanı: 0
Teşekkürler: 0
0 Mesajına, 0 Teşekkür edildi.



Kişisel Bilgileri: v
Konu Tarihi: 07-28-2015 02:42 PM

Merhaba Arkadaşlar,

Bu site başta olmak üzere, İngilizce ve Türkçe her kaynağa baktım ancak şu hataya bir türlü çözüm bulamadım.
Kullanıcı üye kaydı tamamla dedikten sonra bu hata mesajı çıkıyor. üye kaydı sistemde onaylanıyor ancak, karşı tarafa herhangi bir bildirim olmuyor.



Fatal error: Cannot access protected property Mail::$protocol in D:\inetpub\vhosts\*******.com\httpdocs\catalog\model\account\customer.php on line 42



Kullandığım sürüm 1.5.6.4
Yardımcı olursanız sevinirim.

PHP Kod:
<?php
class ModelAccountCustomer extends Model {
    public function 
addCustomer($data) {
        if (isset(
$data['customer_group_id']) && is_array($this->config->get('config_customer_group_display')) && in_array($data['customer_group_id'], $this->config->get('config_customer_group_display'))) {
            
$customer_group_id $data['customer_group_id'];
        } else {
            
$customer_group_id $this->config->get('config_customer_group_id');
        }

        
$this->load->model('account/customer_group');

        
$customer_group_info $this->model_account_customer_group->getCustomerGroup($customer_group_id);

        
$this->db->query("INSERT INTO " DB_PREFIX "customer SET store_id = '" . (int)$this->config->get('config_store_id') . "', firstname = '" $this->db->escape($data['firstname']) . "', lastname = '" $this->db->escape($data['lastname']) . "', email = '" $this->db->escape($data['email']) . "', telephone = '" $this->db->escape($data['telephone']) . "', fax = '" $this->db->escape($data['fax']) . "', salt = '" $this->db->escape($salt substr(md5(uniqid(rand(), true)), 09)) . "', password = '" $this->db->escape(sha1($salt sha1($salt sha1($data['password'])))) . "', newsletter = '" . (isset($data['newsletter']) ? (int)$data['newsletter'] : 0) . "', customer_group_id = '" . (int)$customer_group_id "', ip = '" $this->db->escape($this->request->server['REMOTE_ADDR']) . "', status = '1', approved = '" . (int)!$customer_group_info['approval'] . "', date_added = NOW()");

        
$customer_id $this->db->getLastId();

        
$this->db->query("INSERT INTO " DB_PREFIX "address SET customer_id = '" . (int)$customer_id "', firstname = '" $this->db->escape($data['firstname']) . "', lastname = '" $this->db->escape($data['lastname']) . "', company = '" $this->db->escape($data['company']) . "', company_id = '" $this->db->escape($data['company_id']) . "', tax_id = '" $this->db->escape($data['tax_id']) . "', address_1 = '" $this->db->escape($data['address_1']) . "', address_2 = '" $this->db->escape($data['address_2']) . "', city = '" $this->db->escape($data['city']) . "', postcode = '" $this->db->escape($data['postcode']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "'");

        
$address_id $this->db->getLastId();

        
$this->db->query("UPDATE " DB_PREFIX "customer SET address_id = '" . (int)$address_id "' WHERE customer_id = '" . (int)$customer_id "'");

        
$this->language->load('mail/customer');

        
$subject sprintf($this->language->get('text_subject'), $this->config->get('config_name'));

        
$message sprintf($this->language->get('text_welcome'), $this->config->get('config_name')) . "\n\n";

        if (!
$customer_group_info['approval']) {
            
$message .= $this->language->get('text_login') . "\n";
        } else {
            
$message .= $this->language->get('text_approval') . "\n";
        }

        
$message .= $this->url->link('account/login''''SSL') . "\n\n";
        
$message .= $this->language->get('text_services') . "\n\n";
        
$message .= $this->language->get('text_thanks') . "\n";
        
$message .= $this->config->get('config_name');

        
$mail = new Mail();
        
$mail->protocol $this->config->get('config_mail_protocol');
        
$mail->parameter $this->config->get('config_mail_parameter');
        
$mail->hostname $this->config->get('config_smtp_host');
        
$mail->username $this->config->get('config_smtp_username');
        
$mail->password $this->config->get('config_smtp_password');
        
$mail->port $this->config->get('config_smtp_port');
        
$mail->timeout $this->config->get('config_smtp_timeout');                
        
$mail->setTo($data['email']);
        
$mail->setFrom($this->config->get('config_email'));
        
$mail->setSender($this->config->get('config_name'));
        
$mail->setSubject(html_entity_decode($subjectENT_QUOTES'UTF-8'));
        
$mail->setText(html_entity_decode($messageENT_QUOTES'UTF-8'));
        
$mail->send();

        
// Send to main admin email if new account email is enabled
        
if ($this->config->get('config_account_mail')) {
            
$message  $this->language->get('text_signup') . "\n\n";
            
$message .= $this->language->get('text_website') . ' ' $this->config->get('config_name') . "\n";
            
$message .= $this->language->get('text_firstname') . ' ' $data['firstname'] . "\n";
            
$message .= $this->language->get('text_lastname') . ' ' $data['lastname'] . "\n";
            
$message .= $this->language->get('text_customer_group') . ' ' $customer_group_info['name'] . "\n";

            if (
$data['company']) {
                
$message .= $this->language->get('text_company') . ' '  $data['company'] . "\n";
            }

            
$message .= $this->language->get('text_email') . ' '  .  $data['email'] . "\n";
            
$message .= $this->language->get('text_telephone') . ' ' $data['telephone'] . "\n";

            
$mail->setTo($this->config->get('config_email'));
            
$mail->setSubject(html_entity_decode($this->language->get('text_new_customer'), ENT_QUOTES'UTF-8'));
            
$mail->setText(html_entity_decode($messageENT_QUOTES'UTF-8'));
            
$mail->send();

            
// Send to additional alert emails if new account email is enabled
            
$emails explode(','$this->config->get('config_alert_emails'));

            foreach (
$emails as $email) {
                if (
strlen($email) > && preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i'$email)) {
                    
$mail->setTo($email);
                    
$mail->send();
                }
            }
        }
    }

    public function 
editCustomer($data) {
        
$this->db->query("UPDATE " DB_PREFIX "customer SET firstname = '" $this->db->escape($data['firstname']) . "', lastname = '" $this->db->escape($data['lastname']) . "', email = '" $this->db->escape($data['email']) . "', telephone = '" $this->db->escape($data['telephone']) . "', fax = '" $this->db->escape($data['fax']) . "' WHERE customer_id = '" . (int)$this->customer->getId() . "'");
    }

    public function 
editPassword($email$password) {
        
$this->db->query("UPDATE " DB_PREFIX "customer SET salt = '" $this->db->escape($salt substr(md5(uniqid(rand(), true)), 09)) . "', password = '" $this->db->escape(sha1($salt sha1($salt sha1($password)))) . "' WHERE LOWER(email) = '" $this->db->escape(utf8_strtolower($email)) . "'");
    }

    public function 
editNewsletter($newsletter) {
        
$this->db->query("UPDATE " DB_PREFIX "customer SET newsletter = '" . (int)$newsletter "' WHERE customer_id = '" . (int)$this->customer->getId() . "'");
    }

    public function 
getCustomer($customer_id) {
        
$query $this->db->query("SELECT * FROM " DB_PREFIX "customer WHERE customer_id = '" . (int)$customer_id "'");

        return 
$query->row;
    }

    public function 
getCustomerByEmail($email) {
        
$query $this->db->query("SELECT * FROM " DB_PREFIX "customer WHERE LOWER(email) = '" $this->db->escape(utf8_strtolower($email)) . "'");

        return 
$query->row;
    }

    public function 
getCustomerByToken($token) {
        
$query $this->db->query("SELECT * FROM " DB_PREFIX "customer WHERE token = '" $this->db->escape($token) . "' AND token != ''");

        
$this->db->query("UPDATE " DB_PREFIX "customer SET token = ''");

        return 
$query->row;
    }

    public function 
getCustomers($data = array()) {
        
$sql "SELECT *, CONCAT(c.firstname, ' ', c.lastname) AS name, cg.name AS customer_group FROM " DB_PREFIX "customer c LEFT JOIN " DB_PREFIX "customer_group cg ON (c.customer_group_id = cg.customer_group_id) ";

        
$implode = array();

        if (isset(
$data['filter_name']) && !is_null($data['filter_name'])) {
            
$implode[] = "LCASE(CONCAT(c.firstname, ' ', c.lastname)) LIKE '" $this->db->escape(utf8_strtolower($data['filter_name'])) . "%'";
        }

        if (isset(
$data['filter_email']) && !is_null($data['filter_email'])) {
            
$implode[] = "LCASE(c.email) = '" $this->db->escape(utf8_strtolower($data['filter_email'])) . "'";
        }

        if (isset(
$data['filter_customer_group_id']) && !is_null($data['filter_customer_group_id'])) {
            
$implode[] = "cg.customer_group_id = '" $this->db->escape($data['filter_customer_group_id']) . "'";
        }    

        if (isset(
$data['filter_status']) && !is_null($data['filter_status'])) {
            
$implode[] = "c.status = '" . (int)$data['filter_status'] . "'";
        }    

        if (isset(
$data['filter_approved']) && !is_null($data['filter_approved'])) {
            
$implode[] = "c.approved = '" . (int)$data['filter_approved'] . "'";
        }    

        if (isset(
$data['filter_ip']) && !is_null($data['filter_ip'])) {
            
$implode[] = "c.customer_id IN (SELECT customer_id FROM " DB_PREFIX "customer_ip WHERE ip = '" $this->db->escape($data['filter_ip']) . "')";
        }    

        if (isset(
$data['filter_date_added']) && !is_null($data['filter_date_added'])) {
            
$implode[] = "DATE(c.date_added) = DATE('" $this->db->escape($data['filter_date_added']) . "')";
        }

        if (
$implode) {
            
$sql .= " WHERE " implode(" AND "$implode);
        }

        
$sort_data = array(
            
'name',
            
'c.email',
            
'customer_group',
            
'c.status',
            
'c.ip',
            
'c.date_added'
        
);    

        if (isset(
$data['sort']) && in_array($data['sort'], $sort_data)) {
            
$sql .= " ORDER BY " $data['sort'];    
        } else {
            
$sql .= " ORDER BY name";    
        }

        if (isset(
$data['order']) && ($data['order'] == 'DESC')) {
            
$sql .= " DESC";
        } else {
            
$sql .= " ASC";
        }

        if (isset(
$data['start']) || isset($data['limit'])) {
            if (
$data['start'] < 0) {
                
$data['start'] = 0;
            }            

            if (
$data['limit'] < 1) {
                
$data['limit'] = 20;
            }    

            
$sql .= " LIMIT " . (int)$data['start'] . "," . (int)$data['limit'];
        }        

        
$query $this->db->query($sql);

        return 
$query->rows;    
    }

    public function 
getTotalCustomersByEmail($email) {
        
$query $this->db->query("SELECT COUNT(*) AS total FROM " DB_PREFIX "customer WHERE LOWER(email) = '" $this->db->escape(utf8_strtolower($email)) . "'");

        return 
$query->row['total'];
    }

    public function 
getIps($customer_id) {
        
$query $this->db->query("SELECT * FROM `" DB_PREFIX "customer_ip` WHERE customer_id = '" . (int)$customer_id "'");

        return 
$query->rows;
    }    

    public function 
isBanIp($ip) {
        
$query $this->db->query("SELECT * FROM `" DB_PREFIX "customer_ban_ip` WHERE ip = '" $this->db->escape($ip) . "'");

        return 
$query->num_rows;
    }    
}
?>
Alıntı Yaparak Cevapla
Paylaş!
eka7av
openix.io
******
Süper Moderator user avatar
Çevrimdışı

Mesajlar: 240
Konular: 12
Katılma Tarihi: Apr 2013
Rep Puanı: 5
Teşekkürler: 33
97 Mesajına, 156 Teşekkür edildi.



Kişisel Bilgileri: v
Konu Tarihi: 07-31-2015 03:31 PM
Sunucunuz phpmail fonksiyonu kapatılmış olabilir. SMTP mail seçeneğini kullanmayı deneyiniz.
eka7a
RapidSSL $9.90 | PositiveSSL $6.90
Alıntı Yaparak Cevapla
Paylaş!

« Önceki | Sonraki »
Cevapla  Gönder 

Fatal error: Cannot access protected property Mail Konusunun Linki Direk Link
Fatal error: Cannot access protected property Mail Konusunun HTML Kodu HTML Link
Fatal error: Cannot access protected property Mail Konusu BBCode Linki BBCode Link
Fatal error: Cannot access protected property Mail Konusunu Paylaş Sosyal Paylaş

Benzeyen Konular
Konu: Yazar Cevaplar: Gösterim: Son Mesaj
  mail.php sorunu H737 17 13,350 08-26-2021 02:42 AM
Son Mesaj: umut4ykut
  Sipariş Güncelleme durumu mail sorunu mustykte 0 675 12-14-2020 06:48 PM
Son Mesaj: mustykte
  Toplu mail butonu çalışmıyor seko 3 2,876 07-01-2020 01:32 AM
Son Mesaj: admira
  Parse error: syntax error, unexpected 'SSL' (T_STRING) blue021433 1 907 09-02-2019 04:42 PM
Son Mesaj: blue021433
  Smtp mail göndermek e-ticaretdersleri 30 59,524 07-07-2018 12:42 AM
Son Mesaj: e-ticaretdersleri
  OC 1.5.6.4 Mail hatası enfalor 1 1,238 06-10-2018 07:08 PM
Son Mesaj: osdem66
  [Mod] mail sorunu 1564 atesanit 1 1,254 03-05-2018 06:52 PM
Son Mesaj: osdem66
  2x Sipariş düzenle order.php hatası : syntax error:unexpected end of JSON input askinjohn 3 2,697 02-22-2018 01:16 AM
Son Mesaj: askinjohn
  Sipariş alındı mailinin farklı mail adresine gelmesi? sariaslan 0 1,192 02-08-2018 11:29 PM
Son Mesaj: sariaslan
  Natro ve Isim tescil sunucularinda smtp Mail Problemi cozumu digi-dukkan 14 17,098 11-24-2017 01:15 AM
Son Mesaj: yilmaz70

Fatal error: Cannot access protected property Mail indir, Fatal error: Cannot access protected property Mail Videosu, Fatal error: Cannot access protected property Mail online izle, Fatal error: Cannot access protected property Mail Bedava indir, Fatal error: Cannot access protected property Mail Yükle, Fatal error: Cannot access protected property Mail Hakkında, Fatal error: Cannot access protected property Mail nedir, Fatal error: Cannot access protected property Mail Free indir, Fatal error: Cannot access protected property Mail oyunu, Fatal error: Cannot access protected property Mail download


Forum Atla: