Перейти к публикации
Поиск в
  • Дополнительно...
Искать результаты, содержащие...
Искать результаты в...

bark4ss

Пользователи
  
  • Публикаций

    116
  • Зарегистрирован

  • Посещение

Все публикации пользователя bark4ss

  1. Здравствуйте!Помогите разобраться с ошибкой. PHP Notice: Undefined variable: body_class in /home/steepby/public_html/vqmod/vqcache/vq2-catalog_view_theme_OPC070161-2_template_common_header.tpl on line 108 Вот сам код:
  2. У Вас по существу есть что сказать?Дельный совет дать можете?
  3. Получается,что когда мне сделали магазин,там не было H1.Я попросил разработчика,чтобы он добавил h1,title.Он добавил.У меня сейчас стоит сеопак про.Только вот в настройках-сервер нету выбора типа ЧПУ,ЧПУ товаров с категориями,Окончание ЧПУ. Сравнил отличия движков.ocshop.cms впечатляет,но вот перейти на него мне не хватит мозгов.Точнее,я что-нибудь,где-нибудь накосячу.А мне уж совсем не хотелось бы заново заполнять магазин.Нужна грамотная помощь.За благодарность.
  4. в футере и в админке тоже нет информации по движку(
  5. Версию я смотрю в файле index.php.Верно? Вот строчки из файла: // Version define('VERSION', '1.5.6.1'); Я не могу определить по ним версию)Может подскажете где еще можно посмотреть?Но,я думаю,что opencart.
  6. версия движка 1.5.6.1.По поводу заполнения метатегов,у меня вопросов нет.Я их заполнил правильно и с умом.
  7. Не совсем понял.Я сейчас могу заполнить h1.А после установки seopro все пропадет?
  8. Скажите,пожалуйста,что нужно делать.В настройках ничего нет. У меня у всех товаров url: сайт/товар а хотелось бы сайт/категория/подкатегория/товар Мне необходимо поставить seopro?Или может что включить?
  9. День добрый!Помогите разобраться с микроразметкой.У меня в папке vqmod/xml есть файл smart_microdata.xml.По всей видимости он отвечает за микроразметку. <modification> <id>Smart Microdata</id> <version>1.0</version> <vqmver>2.3.0</vqmver> <author>ovife21</author> <file name="/catalog/controller/product/product.php"> <operation> <search position="after"><![CDATA[$this->data['points']]]></search> <add> <![CDATA[ $this->data['mbreadcrumbs'] = array(); $this->data['mbreadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home') ); if ($this->model_catalog_product->getFullPath($this->request->get['product_id'])) { $path = ''; $parts = explode('_', (string)$this->model_catalog_product->getFullPath($this->request->get['product_id'])); $category_id = (int)array_pop($parts); foreach ($parts as $path_id) { if (!$path) { $path = $path_id; } else { $path .= '_' . $path_id; } $category_info = $this->model_catalog_category->getCategory($path_id); if ($category_info) { $this->data['mbreadcrumbs'][] = array( 'text' => $category_info['name'], 'href' => $this->url->link('product/category', 'path=' . $path) ); } } $category_info = $this->model_catalog_category->getCategory($category_id); if ($category_info) { $url = ''; $this->data['mbreadcrumbs'][] = array( 'text' => $category_info['name'], 'href' => $this->url->link('product/category', 'path=' . $this->model_catalog_product->getFullPath($this->request->get['product_id'])) ); } } else { $this->data['mbreadcrumb'] = false; } $this->data['review_no'] = $product_info['reviews']; $this->data['quantity'] = $product_info['quantity']; ]]> </add> </operation> </file> <file name="catalog/view/theme/*/template/product/product.tpl"> <operation> <search position="before"><![CDATA[<h1]]> </search> <add> <![CDATA[ <span xmlns:v="http://rdf.data-vocabulary.org/#"> <?php foreach ($mbreadcrumbs as $mbreadcrumb) { ?> <span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="<?php echo $mbreadcrumb['href']; ?>" alt="<?php echo $mbreadcrumb['text']; ?>"></a></span> <?php } ?> </span> <span itemscope itemtype="http://schema.org/Product"> <meta itemprop="url" content="<?php echo $breadcrumb['href']; ?>" > <meta itemprop="name" content="<?php echo $heading_title; ?>" > <meta itemprop="model" content="<?php echo $model; ?>" > <meta itemprop="manufacturer" content="<?php echo $manufacturer; ?>" > <?php if ($thumb) { ?> <meta itemprop="image" content="<?php echo $thumb; ?>" > <?php } ?> <?php if ($images) { foreach ($images as $image) {?> <meta itemprop="image" content="<?php echo $image['thumb']; ?>" > <?php } } ?> <span itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <meta itemprop="price" content="<?php echo ($special ? $special : $price); ?>" /> <meta itemprop="priceCurrency" content="<?php echo $this->currency->getCode(); ?>" /> <link itemprop="availability" href="http://schema.org/<?php echo (($quantity > 0) ? "InStock" : "OutOfStock") ?>" /> </span> <span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <meta itemprop="reviewCount" content="<?php echo $review_no; ?>"> <meta itemprop="ratingValue" content="<?php echo $rating; ?>"> </span></span> ]]> </add> </operation> </file> <file name="catalog/view/theme/*/template/product/category.tpl"> <operation> <search position="before"><![CDATA[<h1]]> </search> <add> <![CDATA[ <span xmlns:v="http://rdf.data-vocabulary.org/#"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="<?php echo $breadcrumb['href']; ?>" alt="<?php echo $breadcrumb['text']; ?>"></a></span> <?php } ?> </span> ]]> </add> </operation> </file> <file name="catalog/model/catalog/product.php"> <operation> <search position="before" offset="1"><![CDATA[?>]]></search> <add><![CDATA[ public function getFullPath($product_id) { $query = $this->db->query("SELECT COUNT(product_id) AS total, category_id as catid FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . (int)$product_id . "'"); if ($query->row['total'] >= 1) { $path = array(); $path[0] = $query->row['catid']; $query = $this->db->query("SELECT parent_id AS pid FROM " . DB_PREFIX . "category WHERE category_id = '" . (int)$path[0] . "'"); $parent_id = $query->row['pid']; $i = 1; while($parent_id > 0) { $path[$i] = $parent_id; $query = $this->db->query("SELECT parent_id AS pid FROM " . DB_PREFIX . "category WHERE category_id = '" . (int)$parent_id . "'"); $parent_id = $query->row['pid']; $i++; } $path = array_reverse($path); $fullpath = ''; foreach($path as $val){ $fullpath .= '_'.$val; } return ltrim($fullpath, '_'); } else { return false; } }]]></add> </operation> </file> </modification> Когда я проверяю микроразметку с помощью вебмастера yandex,он выдает мне ошибки: resource = http://www.steep.by/%D0%B0%D0%BD%D1%82%D0%B8%D1%81%D0%B5%D0%BF%D1%82%D0%B8%D0%BA%D0%B8/%D0%B0%D0%BD%D1%82%D0%B8%D1%81%D0%B5%D0%BF%D1%82%D0%B8%D0%BA-%D1%8D%D0%BA%D0%BE%D0%B4%D0%BE%D0%BC-%D0%B1%D0%B8%D0%BE%D0%BF%D1%80%D0%BE%D1%84'>http://www.steep.by/%D0%B0%D0%BD%D1%82%D0%B8%D1%81%D0%B5%D0%BF%D1%82%D0%B8%D0%BA%D0%B8/%D0%B0%D0%BD%D1%82%D0%B8%D1%81%D0%B5%D0%BF%D1%82%D0%B8%D0%BA-%D1%8D%D0%BA%D0%BE%D0%B4%D0%BE%D0%BC-%D0%B1%D0%B8%D0%BE%D0%BF%D1%80%D0%BE%D1%84 rdfanode type = http://rdf.data-vocabulary.org/#Breadcrumb http://rdf.data-vocabulary.org/#title text = Главная href = http://www.steep.by/ rdfanode type = http://rdf.data-vocabulary.org/#Breadcrumb http://rdf.data-vocabulary.org/#title text = Антисептики href = http://www.steep.by/антисептики rdfanode type = http://rdf.data-vocabulary.org/#Breadcrumb http://rdf.data-vocabulary.org/#title text = Антисептик Экодом Биопроф href = http://www.steep.by/антисептики/антисептик-экодом-биопроф rdfanode type = http://rdf.data-vocabulary.org/#Breadcrumb http://rdf.data-vocabulary.org/#title = http://www.steep.by/ rdfanode type = http://rdf.data-vocabulary.org/#Breadcrumb http://rdf.data-vocabulary.org/#title = http://www.steep.by/антисептики product ПРЕДУПРЕЖДЕНИЕ: не выполнено обязательное условие для острова "Статья" - обязательное поле description отсутствует itemType = http://schema.org/Product name = Антисептик против плесени,синевы,грибка Экодом БиоПроф product itemType = http://schema.org/Product url = http://www.steep.by/антисептики/антисептик-экодом-биопроф name = Антисептик против плесени,синевы,грибка Экодом БиоПроф model = зеленовато-фисташковый manufacturer = Экодом image = http://www.steep.by/image/cache/data/anticeptik-iekodom-bioprof-82-380x450.png offers offer itemType = http://schema.org/Offer price = 69 000 .- pricecurrency = BYR availability = http://schema.org/InStock aggregaterating aggregaterating itemType = http://schema.org/AggregateRating reviewcount = 0 ratingvalue = 0 aggregaterating ОШИБКА: значение "Отзывов: 0" в поле reviewCount не является корректным значением числа itemType = http://schema.org/AggregateRating ratingvalue href = http://www.steep.by/%D0%B0%D0%BD%D1%82%D0%B8%D1%81%D0%B5%D0%BF%D1%82%D0%B8%D0%BA%D0%B8/catalog/view/theme/OPC070161-2/image/stars-0.png text = Отзывов: 0 reviewcount = Отзывов: 0 Как мне это исправить?Как я понял,то надо добавить description и неправильно обрабатывается rating.Помогите,пожалуйста.
  10. У меня,вроде,правильно указан адрес.Письма обратной связи приходят без ошибок.
  11. Ошибка в журнале не выскакивает,но на почту вместе с письмом-заказом приходит письмо об ошибке с таким вот содержанием: Delivery to the following recipient failed permanently: empty@localhost Technical details of permanent failure: DNS Error: Domain name not found
  12. Помогите убрать такую ошибку.Выскакивает,когда сделан заказ через корзину.На почту приходит письмо без всяких ошибок,но в журнале появляется вот такая ошибка: PHP Notice: Undefined property: Mail::$form in /home/steepby/public_html/system/library/mail.php on line 276 Вот сам код: <?php class Mail { protected $to; protected $from; protected $sender; protected $subject; protected $text; protected $html; protected $attachments = array(); public $protocol = 'mail'; public $hostname; public $username; public $password; public $port = 25; public $timeout = 5; public $newline = "\n"; public $crlf = "\r\n"; public $verp = false; public $parameter = ''; public function setTo($to) { $this->to = $to; } public function setFrom($from) { $this->from = $from; } public function setSender($sender) { $this->sender = $sender; } public function setSubject($subject) { $this->subject = $subject; } public function setText($text) { $this->text = $text; } public function setHtml($html) { $this->html = $html; } public function addAttachment($filename) { $this->attachments[] = $filename; } public function send() { if (!$this->to) { trigger_error('Error: E-Mail to required!'); exit(); } if (!$this->from) { trigger_error('Error: E-Mail from required!'); exit(); } if (!$this->sender) { trigger_error('Error: E-Mail sender required!'); exit(); } if (!$this->subject) { trigger_error('Error: E-Mail subject required!'); exit(); } if ((!$this->text) && (!$this->html)) { trigger_error('Error: E-Mail message required!'); exit(); } if (is_array($this->to)) { $to = implode(',', $this->to); } else { $to = $this->to; } $boundary = '----=_NextPart_' . md5(time()); $header = ''; $header .= 'MIME-Version: 1.0' . $this->newline; if ($this->protocol != 'mail') { $header .= 'To: ' . $to . $this->newline; $header .= 'Subject: ' . $this->subject . $this->newline; } $header .= 'Date: ' . date('D, d M Y H:i:s O') . $this->newline; $header .= 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline; $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline; $header .= 'Return-Path: ' . $this->from . $this->newline; $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline; $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline; if (!$this->html) { $message = '--' . $boundary . $this->newline; $message .= 'Content-Type: text/plain; charset="utf-8"' . $this->newline; $message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline; $message .= $this->text . $this->newline; } else { $message = '--' . $boundary . $this->newline; $message .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '_alt"' . $this->newline . $this->newline; $message .= '--' . $boundary . '_alt' . $this->newline; $message .= 'Content-Type: text/plain; charset="utf-8"' . $this->newline; $message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline; if ($this->text) { $message .= $this->text . $this->newline; } else { $message .= 'This is a HTML email and your email client software does not support HTML email!' . $this->newline; } $message .= '--' . $boundary . '_alt' . $this->newline; $message .= 'Content-Type: text/html; charset="utf-8"' . $this->newline; $message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline; $message .= $this->html . $this->newline; $message .= '--' . $boundary . '_alt--' . $this->newline; } foreach ($this->attachments as $attachment) { if (file_exists($attachment)) { $handle = fopen($attachment, 'r'); $content = fread($handle, filesize($attachment)); fclose($handle); $message .= '--' . $boundary . $this->newline; $message .= 'Content-Type: application/octet-stream; name="' . basename($attachment) . '"' . $this->newline; $message .= 'Content-Transfer-Encoding: base64' . $this->newline; $message .= 'Content-Disposition: attachment; filename="' . basename($attachment) . '"' . $this->newline; $message .= 'Content-ID: <' . basename(urlencode($attachment)) . '>' . $this->newline; $message .= 'X-Attachment-Id: ' . basename(urlencode($attachment)) . $this->newline . $this->newline; $message .= chunk_split(base64_encode($content)); } } $message .= '--' . $boundary . '--' . $this->newline; if ($this->protocol == 'mail') { ini_set('sendmail_from', $this->from); if ($this->parameter) { mail($to, '=?UTF-8?B?' . base64_encode($this->subject) . '?=', $message, $header, $this->parameter); } else { mail($to, '=?UTF-8?B?' . base64_encode($this->subject) . '?=', $message, $header); } } elseif ($this->protocol == 'smtp') { $handle = fsockopen($this->hostname, $this->port, $errno, $errstr, $this->timeout); if (!$handle) { trigger_error('Error: ' . $errstr . ' (' . $errno . ')'); exit(); } else { if (substr(PHP_OS, 0, 3) != 'WIN') { socket_set_timeout($handle, $this->timeout, 0); } while ($line = fgets($handle, 515)) { if (substr($line, 3, 1) == ' ') { break; } } if (substr($this->hostname, 0, 3) == 'tls') { fputs($handle, 'STARTTLS' . $this->crlf); while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 220) { trigger_error('Error: STARTTLS not accepted from server!'); exit(); } } if (!empty($this->username) && !empty($this->password)) { fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 250) { trigger_error('Error: EHLO not accepted from server!'); exit(); } fputs($handle, 'AUTH LOGIN' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 334) { trigger_error('Error: AUTH LOGIN not accepted from server!'); exit(); } fputs($handle, base64_encode($this->username) . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 334) { trigger_error('Error: Username not accepted from server!'); exit(); } fputs($handle, base64_encode($this->password) . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 235) { trigger_error('Error: Password not accepted from server!'); exit(); } } else { fputs($handle, 'HELO ' . getenv('SERVER_NAME') . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 250) { trigger_error('Error: HELO not accepted from server!'); exit(); } } if ($this->verp) { fputs($handle, 'MAIL FROM: <' . $this->form . '>XVERP' . $this->crlf); } else { fputs($handle, 'MAIL FROM: <' . $this->form . '>' . $this->crlf); } $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 250) { trigger_error('Error: MAIL FROM not accepted from server!'); exit(); } if (!is_array($this->to)) { fputs($handle, 'RCPT TO: <' . $this->to . '>' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) { trigger_error('Error: RCPT TO not accepted from server!'); exit(); } } else { foreach ($this->to as $recipient) { fputs($handle, 'RCPT TO: <' . $recipient . '>' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) { trigger_error('Error: RCPT TO not accepted from server!'); exit(); } } } fputs($handle, 'DATA' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 354) { trigger_error('Error: DATA not accepted from server!'); exit(); } // According to rfc 821 we should not send more than 1000 including the CRLF $message = str_replace("\r\n", "\n", $header . $message); $message = str_replace("\r", "\n", $message); $lines = explode("\n", $message); foreach ($lines as $line) { $results = str_split($line, 998); foreach ($results as $result) { if (substr(PHP_OS, 0, 3) != 'WIN') { fputs($handle, $result . $this->crlf); } else { fputs($handle, str_replace("\n", "\r\n", $result) . $this->crlf); } } } fputs($handle, '.' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 250) { trigger_error('Error: DATA not accepted from server!'); exit(); } fputs($handle, 'QUIT' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 221) { trigger_error('Error: QUIT not accepted from server!'); exit(); } fclose($handle); } } } } ?>
  13. Создал опцию для товара,но при выборе цена не меняется
  14. спасибо.все получилось.тема закрыта.
  15. Спасибо за помощь.Тему можно закрывать.Приношу извинения,что есть ответы в поиске.Не мог подобрать правильный запрос для поиска ответа на свои вопросы.
  16. за это спасибо.А с пробелами в цене как быть?
  17. Хочу вместо бел.рублей поставить .-.И как в цене товара вставить пробел(например: 77 000 .-)
  18. как все просто!Спасибо.Тема закрыта.
  19. Помогите.Никак не могу понять где поменять значение фразы out-of-stock на отсутствует на складе.Если товар есть в наличии,то все ок.У меня пишет:есть в наличии
  20. Настроил через smtp.Приходит письмо с заказом.Но в журнале ошибок вот такие строки появляются: 2014-07-08 9:59:50 - PHP Notice: Undefined property: Mail::$form in /home/steepby/public_html/system/library/mail.php on line 276 2014-07-08 9:59:51 - PHP Notice: Undefined property: Mail::$form in /home/steepby/public_html/system/library/mail.php on line 276 а вот эти строки из файла: <?php class Mail { protected $to; protected $from; protected $sender; protected $subject; protected $text; protected $html; protected $attachments = array(); public $protocol = 'mail'; public $hostname; public $username; public $password; public $port = 25; public $timeout = 5; public $newline = "\n"; public $crlf = "\r\n"; public $verp = false; public $parameter = ''; public function setTo($to) { $this->to = $to; } public function setFrom($from) { $this->from = $from; } public function setSender($sender) { $this->sender = $sender; } public function setSubject($subject) { $this->subject = $subject; } public function setText($text) { $this->text = $text; } public function setHtml($html) { $this->html = $html; } public function addAttachment($filename) { $this->attachments[] = $filename; } public function send() { if (!$this->to) { trigger_error('Error: E-Mail to required!'); exit(); } if (!$this->from) { trigger_error('Error: E-Mail from required!'); exit(); } if (!$this->sender) { trigger_error('Error: E-Mail sender required!'); exit(); } if (!$this->subject) { trigger_error('Error: E-Mail subject required!'); exit(); } if ((!$this->text) && (!$this->html)) { trigger_error('Error: E-Mail message required!'); exit(); } if (is_array($this->to)) { $to = implode(',', $this->to); } else { $to = $this->to; } $boundary = '----=_NextPart_' . md5(time()); $header = ''; $header .= 'MIME-Version: 1.0' . $this->newline; if ($this->protocol != 'mail') { $header .= 'To: ' . $to . $this->newline; $header .= 'Subject: ' . $this->subject . $this->newline; } $header .= 'Date: ' . date('D, d M Y H:i:s O') . $this->newline; $header .= 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline; $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline; $header .= 'Return-Path: ' . $this->from . $this->newline; $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline; $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline; if (!$this->html) { $message = '--' . $boundary . $this->newline; $message .= 'Content-Type: text/plain; charset="utf-8"' . $this->newline; $message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline; $message .= $this->text . $this->newline; } else { $message = '--' . $boundary . $this->newline; $message .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '_alt"' . $this->newline . $this->newline; $message .= '--' . $boundary . '_alt' . $this->newline; $message .= 'Content-Type: text/plain; charset="utf-8"' . $this->newline; $message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline; if ($this->text) { $message .= $this->text . $this->newline; } else { $message .= 'This is a HTML email and your email client software does not support HTML email!' . $this->newline; } $message .= '--' . $boundary . '_alt' . $this->newline; $message .= 'Content-Type: text/html; charset="utf-8"' . $this->newline; $message .= 'Content-Transfer-Encoding: 8bit' . $this->newline . $this->newline; $message .= $this->html . $this->newline; $message .= '--' . $boundary . '_alt--' . $this->newline; } foreach ($this->attachments as $attachment) { if (file_exists($attachment)) { $handle = fopen($attachment, 'r'); $content = fread($handle, filesize($attachment)); fclose($handle); $message .= '--' . $boundary . $this->newline; $message .= 'Content-Type: application/octet-stream; name="' . basename($attachment) . '"' . $this->newline; $message .= 'Content-Transfer-Encoding: base64' . $this->newline; $message .= 'Content-Disposition: attachment; filename="' . basename($attachment) . '"' . $this->newline; $message .= 'Content-ID: <' . basename(urlencode($attachment)) . '>' . $this->newline; $message .= 'X-Attachment-Id: ' . basename(urlencode($attachment)) . $this->newline . $this->newline; $message .= chunk_split(base64_encode($content)); } } $message .= '--' . $boundary . '--' . $this->newline; if ($this->protocol == 'mail') { ini_set('sendmail_from', $this->from); if ($this->parameter) { mail($to, '=?UTF-8?B?' . base64_encode($this->subject) . '?=', $message, $header, $this->parameter); } else { mail($to, '=?UTF-8?B?' . base64_encode($this->subject) . '?=', $message, $header); } } elseif ($this->protocol == 'smtp') { $handle = fsockopen($this->hostname, $this->port, $errno, $errstr, $this->timeout); if (!$handle) { trigger_error('Error: ' . $errstr . ' (' . $errno . ')'); exit(); } else { if (substr(PHP_OS, 0, 3) != 'WIN') { socket_set_timeout($handle, $this->timeout, 0); } while ($line = fgets($handle, 515)) { if (substr($line, 3, 1) == ' ') { break; } } if (substr($this->hostname, 0, 3) == 'tls') { fputs($handle, 'STARTTLS' . $this->crlf); while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 220) { trigger_error('Error: STARTTLS not accepted from server!'); exit(); } } if (!empty($this->username) && !empty($this->password)) { fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 250) { trigger_error('Error: EHLO not accepted from server!'); exit(); } fputs($handle, 'AUTH LOGIN' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 334) { trigger_error('Error: AUTH LOGIN not accepted from server!'); exit(); } fputs($handle, base64_encode($this->username) . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 334) { trigger_error('Error: Username not accepted from server!'); exit(); } fputs($handle, base64_encode($this->password) . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 235) { trigger_error('Error: Password not accepted from server!'); exit(); } } else { fputs($handle, 'HELO ' . getenv('SERVER_NAME') . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 250) { trigger_error('Error: HELO not accepted from server!'); exit(); } } if ($this->verp) { fputs($handle, 'MAIL FROM: <' . $this->form . '>XVERP' . $this->crlf); } else { fputs($handle, 'MAIL FROM: <' . $this->form . '>' . $this->crlf); } $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 250) { trigger_error('Error: MAIL FROM not accepted from server!'); exit(); } if (!is_array($this->to)) { fputs($handle, 'RCPT TO: <' . $this->to . '>' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) { trigger_error('Error: RCPT TO not accepted from server!'); exit(); } } else { foreach ($this->to as $recipient) { fputs($handle, 'RCPT TO: <' . $recipient . '>' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if ((substr($reply, 0, 3) != 250) && (substr($reply, 0, 3) != 251)) { trigger_error('Error: RCPT TO not accepted from server!'); exit(); } } } fputs($handle, 'DATA' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 354) { trigger_error('Error: DATA not accepted from server!'); exit(); } // According to rfc 821 we should not send more than 1000 including the CRLF $message = str_replace("\r\n", "\n", $header . $message); $message = str_replace("\r", "\n", $message); $lines = explode("\n", $message); foreach ($lines as $line) { $results = str_split($line, 998); foreach ($results as $result) { if (substr(PHP_OS, 0, 3) != 'WIN') { fputs($handle, $result . $this->crlf); } else { fputs($handle, str_replace("\n", "\r\n", $result) . $this->crlf); } } } fputs($handle, '.' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 250) { trigger_error('Error: DATA not accepted from server!'); exit(); } fputs($handle, 'QUIT' . $this->crlf); $reply = ''; while ($line = fgets($handle, 515)) { $reply .= $line; if (substr($line, 3, 1) == ' ') { break; } } if (substr($reply, 0, 3) != 221) { trigger_error('Error: QUIT not accepted from server!'); exit(); } fclose($handle); } } } } ?> что эта за ошибка?
  21. День добрый!Стоит этот модуль.Письма с заказами не приходят.Что там может быть не так?
  22. Понял.Исправлю. Тему можно закрывать.

×
×
  • Создать...

Важная информация

На нашем сайте используются файлы cookie и происходит обработка некоторых персональных данных пользователей, чтобы улучшить пользовательский интерфейс. Чтобы узнать для чего и какие персональные данные мы обрабатываем перейдите по ссылке. Если Вы нажмете «Я даю согласие», это означает, что Вы понимаете и принимаете все условия, указанные в этом Уведомлении о Конфиденциальности.