Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

wowez

Користувачі
  
  • Публікації

    108
  • З нами

  • Відвідування

Усі публікації користувача wowez

  1. Где это и в чём проблема может быть? SeoPro есть, в инструкциях там урл без чпу.
  2. Здравствуйте, настраиваю партнёрскую программу и столкнулся с тем, что в ЛК партнера(покупателя), в разделе "Код отслеживания партнеров", где "Генератор реферальных ссылок", мы выбираем товар, и ниже textarea где должен появиться url с реферальным кодом, а там появляется только урл выбранного товара, вот скрин. Подскажите пожалуйста кто сталкивался может с таким, почему это, интернет сломал пока искал, ничего не нашёл по теме толкового.
  3. В общем всё. ) . всё тут в модели, аналогичный массив, аналогичные добавления, добавил ссылку и изображение, всё приходит, полёт нормальный. catalog\model\extension\module\bocorder.php
  4. Здравствуйте, вот ocsctore 3.7. сделать ссылку на товар из пиьсма админу, добавляем в котроллер catalog/controller/mail/order.php в массивы $data['products'][] = array( это $this->load->model('catalog/product'); $product_info = $this->model_catalog_product->getProduct($order_product['product_id']); и это 'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id']), для order_add и order_alert и в эти шаблоны это <a href="{{ product.href }}"> , и ок всё работает, письмо админу идёт из order_alert. Но ест модуль XD buyoneclick 4,0,4 версию использую, и от отправляет письмо админу из order_add.twig И там есть ссылка, когда заказ с корзины, всё приходит ок, и пользователю и админу, а XD buyoneclick ни как не хочет понимать 'href', есть его контроллер, catalog/controller/extension/module/buyoneclick/checkout/buyoneclick.php <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); class ControllerExtensionModuleBuyoneclickCheckoutBuyoneclick extends Controller { private function replace_shablon($string,$shop_name,$product,$name,$phone,$email,$order_number){ $patterns[0] = "/\{shop_name\}/"; $patterns[1] = "/\{product\}/"; $patterns[2] = "/\{name\}/"; $patterns[3] = "/\{phone\}/"; $patterns[4] = "/\{email\}/"; $patterns[5] = "/\{order_number\}/"; $replacements[0] = $shop_name; $replacements[1] = $product; $replacements[2] = $name; $replacements[3] = $phone; $replacements[4] = $email; $replacements[5] = $order_number; return preg_replace($patterns, $replacements, $string); } public function send_smsc($login, $password, $number, $message, $sender, $query = ''){ $res = $this->_read_url('https://smsc.ua/sys/send.php?login='.urlencode($login).'&psw='.urlencode(html_entity_decode($password)). '&phones='.urlencode($number).'&mes='.urlencode(html_entity_decode(str_replace('\n', "\n", $message), ENT_QUOTES, 'UTF-8')). ($sender ? '&sender='.urlencode($sender) : '').'&maxsms='.$this->config->get('oc_smsc_maxsms'). '&cost=3&fmt=1&charset=utf-8&userip='.$_SERVER['REMOTE_ADDR'].($query ? '&'.$query : '')); } // Функция чтения URL. Для работы должно быть доступно: // curl или fsockopen (только http) или включена опция allow_url_fopen для file_get_contents private function _read_url($url){ $ret = ""; if (function_exists("curl_init")) { static $c = 0; // keepalive if (!$c) { $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($c, CURLOPT_TIMEOUT, 10); curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0); } curl_setopt($c, CURLOPT_URL, $url); $ret = curl_exec($c); } elseif (function_exists("fsockopen") && strncmp($url, 'http:', 5) == 0) // not https { $m = parse_url($url); $fp = fsockopen($m["host"], 80, $errno, $errstr, 10); if ($fp) { fwrite($fp, "GET $m[path]?$m[query] HTTP/1.1\r\nHost: smsc.ua\r\nUser-Agent: PHP\r\nConnection: Close\r\n\r\n"); while (!feof($fp)) $ret = fgets($fp, 1024); fclose($fp); } } else $ret = file_get_contents($url); return $ret; } private function send_sms($product, $name, $phone, $email, $order_number) { $shop_name = $this->config->get('config_name'); $buyoneclick = $this->config->get('buyoneclick'); // SMSC.ua $smscua_admin_status = $buyoneclick['smscua_admin_status']; $smscua_client_status = $buyoneclick['smscua_client_status']; $smscua_login = $buyoneclick['smscua_login']; $smscua_password = $buyoneclick['smscua_password']; $smscua_number = $buyoneclick['smscua_number']; $smscua_name = $buyoneclick['smscua_name']; $smscua_admin_sms = $buyoneclick['smscua_admin_sms']; $smscua_client_sms = $buyoneclick['smscua_client_sms']; //SMS.ru $smsru_admin_status = $buyoneclick['smsru_admin_status']; $smsru_client_status = $buyoneclick['smsru_client_status']; $smsru_api = $buyoneclick['smsru_api']; $smsru_login = $buyoneclick['smsru_login']; $smsru_password = $buyoneclick['smsru_password']; $smsru_number = $buyoneclick['smsru_number']; $smsru_name = $buyoneclick['smsru_name']; $smsru_admin_sms = $buyoneclick['smsru_admin_sms']; $smsru_client_sms = $buyoneclick['smsru_client_sms']; $shop_name = mb_convert_encoding($shop_name, 'UTF-8', mb_detect_encoding($shop_name)); /*********** SMS клиенту **************/ $client_sms = "Thank you for your order in our online store '$shop_name'! Your order number: $order_number. We will contact you to confirm the order!"; /*********** SMS админу **************/ $admin_sms = "Order $order_number: $product. Customer: $name $phone $email"; // SMSC.ua if ($smscua_admin_status == '1' || $smscua_client_status == '1') { /*********** SMSC.ua клиенту **************/ if ($smscua_client_sms != '') { $client_sms = $this->replace_shablon($smscua_client_sms,$shop_name,$product,$name,$phone,$email,$order_number); } /*********** SMSC.ua админу **************/ if ($smscua_admin_sms != '') { $admin_sms = $this->replace_shablon($smscua_admin_sms,$shop_name,$product,$name,$phone,$email,$order_number); } try { //отправка SMS админу if ($smscua_admin_status == '1') { $smscua_sender = mb_convert_encoding($smscua_name, 'UTF-8', mb_detect_encoding($smscua_name)); $smsc_result = $this->send_smsc($smscua_login, $smscua_password, $smscua_number, $admin_sms, $smscua_sender); // var_dump($smsc_result); } //отправка SMS покупателю if ($smscua_client_status == '1') { $client_number = '+'; $client_number .= preg_replace('/[^0-9]+/', '', $phone); $smscua_sender = mb_convert_encoding($smscua_name, 'UTF-8', mb_detect_encoding($smscua_name)); $smsc_result = $this->send_smsc($smscua_login, $smscua_password, $client_number, $client_sms, $smscua_sender); // var_dump($smsc_result); } } catch(Exception $e) { /* $message_to_myemail .= 'Ошибка: ' . $e->getMessage() . '<br />'; */ } } if ($smsru_admin_status == '1' || $smsru_client_status == '1') { /*********** SMS.ru клиенту **************/ if ($smsru_client_sms != '') { $client_sms = $this->replace_shablon($smsru_client_sms,$shop_name,$product,$name,$phone,$email,$order_number); } /*********** SMS.ru админу **************/ if ($smsru_admin_sms != '') { $admin_sms = $this->replace_shablon($smsru_admin_sms,$shop_name,$product,$name,$phone,$email,$order_number); } $smsru_number = preg_replace('/[^0-9]+/', '', $smsru_number); $admin_sms = mb_convert_encoding($admin_sms, 'UTF-8', mb_detect_encoding($admin_sms)); if ($smsru_name != '') { $sms_sender = $smsru_name; $sms_sender = mb_convert_encoding($sms_sender, 'UTF-8', mb_detect_encoding($sms_sender)); $sending_string1 = 'https://sms.ru/sms/send?api_id=' . $smsru_api . '&to=' . $smsru_number . '&text=' . urlencode($admin_sms) . '&from=' . $sms_sender . '&partner_id=188307'; } else { $sending_string1 = 'https://sms.ru/sms/send?api_id=' . $smsru_api . '&to=' . $smsru_number . '&text=' . urlencode($admin_sms) . '&partner_id=188307'; } $body=file_get_contents($sending_string1); list($code,$text) = explode("\n", $body); //отправка SMS покупателю if ($smsru_client_status == '1') { $client_number = preg_replace('/[^0-9]+/', '', $phone); $client_sms = mb_convert_encoding($client_sms, 'UTF-8', mb_detect_encoding($client_sms)); if (isset($smsru_name)) { $sms_sender = $smsru_name; $sms_sender = mb_convert_encoding($sms_sender, 'UTF-8', mb_detect_encoding($sms_sender)); $sending_string2 = 'https://sms.ru/sms/send?api_id=' . $smsru_api . '&to=' . $client_number . '&text=' . urlencode($client_sms) . '&from=' . $sms_sender . '&partner_id=188307'; } else { $sending_string2 = 'https://sms.ru/sms/send?api_id=' . $smsru_api . '&to=' . $client_number . '&text=' . urlencode($client_sms) . '&partner_id=188307'; } $body=file_get_contents($sending_string2); list($code,$text) = explode("\n", $body); } } } public function submit() { $buyoneclick = $this->config->get('buyoneclick'); $buyoneclick_exan_status = $buyoneclick['exan_status']; $buyoneclick_success_type = $buyoneclick['success_type']; $data['logged'] = $this->customer->isLogged(); // var_dump($data['logged']); if ($data['logged']) { $this->load->model('account/customer'); $customer_info = $this->model_account_customer->getCustomer($this->customer->getId()); } $this->load->language('extension/module/buyoneclick'); $json = array(); if (!empty($this->session->data['boc_product_id'])) { $product_id = (int)$this->session->data['boc_product_id']; } else if (isset($this->request->post['boc_product_id'])) { $product_id = (int)$this->request->post['boc_product_id']; } else { $product_id = 0; } $boc_title = $this->language->get('buyoneclick_title'); if ($data['logged']) { if (isset($this->request->post['boc_name']) && $this->request->post['boc_name'] != '') { $fullname = $this->request->post['boc_name']; $data = preg_split('/\s+/', $fullname); if (count($data) > 1){ $firstname = $data[0]; $lastname = $data[1]; } else { $firstname = $data[0]; $lastname = '(' . $boc_title . ')'; } } else { $firstname = $customer_info['firstname']; $lastname = $customer_info['lastname']; } if (isset($this->request->post['boc_email']) && $this->request->post['boc_email'] !='') { $email = $this->request->post['boc_email']; } else { $email = $customer_info['email']; } if (isset($this->request->post['boc_phone'])) { $phone = $this->request->post['boc_phone']; } else { $phone = $customer_info['telephone']; } if (isset($customer_info['fax'])) { $fax = $customer_info['fax']; } else { $fax = ''; } // Customer ID if (isset($customer_info['customer_id'])) { $customer_id = $customer_info['customer_id']; } else { $customer_id = ''; } // Customer Group if (isset($this->request->post['customer_group_id']) && is_array($this->config->get('config_customer_group_display')) && in_array($this->request->post['customer_group_id'], $this->config->get('config_customer_group_display'))) { $customer_group_id = $this->request->post['customer_group_id']; } elseif (isset($customer_info['customer_group_id']) && $customer_info['customer_group_id'] !='') { $customer_group_id = $customer_info['customer_group_id']; } else { $customer_group_id = $this->config->get('config_customer_group_id'); } } else { if (isset($this->request->post['boc_name']) && $this->request->post['boc_name'] != '') { $fullname = $this->request->post['boc_name']; $data = preg_split('/\s+/', $fullname); if (count($data) > 1){ $firstname = $data[0]; $lastname = $data[1]; } else { $firstname = $data[0]; $lastname = '(' . $boc_title . ')'; } } else { $firstname = $boc_title; $lastname = ''; } if (isset($this->request->post['boc_email']) && $this->request->post['boc_email'] !='') { $email = $this->request->post['boc_email']; } else { $email = ''; } if (isset($this->request->post['boc_phone'])) { $phone = $this->request->post['boc_phone']; } else { $phone = ''; } $fax = ''; // Customer ID $customer_id = ''; // Customer Group if (isset($this->request->post['customer_group_id']) && is_array($this->config->get('config_customer_group_display')) && in_array($this->request->post['customer_group_id'], $this->config->get('config_customer_group_display'))) { $customer_group_id = $this->request->post['customer_group_id']; } else { $customer_group_id = $this->config->get('config_customer_group_id'); } $this->session->data['guest']['customer_group_id'] = $customer_group_id; $this->session->data['guest']['firstname'] = $firstname; $this->session->data['guest']['lastname'] = $lastname; $this->session->data['guest']['email'] = $email; $this->session->data['guest']['telephone'] = $phone; $this->session->data['guest']['fax'] = ''; } if (isset($this->request->post['boc_message'])) { $comment = $this->request->post['boc_message']; } else { $comment = ''; } $this->load->model('catalog/product'); $product_info = $this->model_catalog_product->getProduct($product_id); if ($product_info) { if (!empty($this->session->data['boc_product_quantity'])) { $product_quantity = (int)$this->session->data['boc_product_quantity']; } else { $product_quantity = $product_info['minimum'] ? $product_info['minimum'] : 1; } if (!empty($this->session->data['boc_product_option'])) { $product_option = $this->session->data['boc_product_option']; } else { $product_option = array(); } if (!$json) { // Display prices $boc_price = (float)$product_info['price']; if ((float)$product_info['special']) { $boc_price = (float)$product_info['special']; } $discounts = $this->model_catalog_product->getProductDiscounts($product_id); if ($discounts) { foreach ($discounts as $discount) { if ($discount['quantity'] <= $product_quantity) { $boc_price = (float)$discount['price']; } } } // Calculate total if (!$product_option) { $boc_unit_price = $boc_price; $boc_total = $boc_price * $product_quantity; $boc_unit_tax = $this->tax->getTax($boc_price, $product_info['tax_class_id']); } else { $option_total = 0; foreach ($product_option as $option) { if ($option['value_price_prefix'] == '+') { $option_total += (float)$option['value_price_value']; } else if ($option['value_price_prefix'] == '-') { $option_total -= (float)$option['value_price_value']; } } $boc_unit_price = $boc_price + $option_total; $boc_total = ($boc_price + $option_total) * $product_quantity; $boc_unit_tax = $this->tax->getTax(($boc_price + $option_total), $product_info['tax_class_id']); } $boc_tax_total = $boc_unit_tax * $product_quantity; $boc_order_total = $boc_total + $boc_tax_total; // $order_data['products'] = array(); $order_data['products'][] = array ( 'product_id' => $product_info['product_id'], 'name' => $product_info['name'], 'model' => $product_info['model'], 'option' => $product_option, 'download' => '', 'quantity' => $product_quantity, 'subtract' => $product_info['subtract'], 'price' => $boc_unit_price, 'total' => $boc_total, 'tax' => $boc_unit_tax, 'reward' => $product_info['reward'] ); $order_data['totals'] = array(); $this->load->language('checkout/checkout'); $order_data['invoice_prefix'] = $this->config->get('config_invoice_prefix'); $order_data['store_id'] = $this->config->get('config_store_id'); $order_data['store_name'] = $this->config->get('config_name'); if ($order_data['store_id']) { $order_data['store_url'] = $this->config->get('config_url'); } else { $order_data['store_url'] = HTTP_SERVER; } $exan = ''; if ($buyoneclick_exan_status) { // Source first visit $exan = $this->language->get('buyoneclick_exan_title'); $exan .= $this->language->get('sb_first_visit_title') . "<br />"; if (isset($this->request->post['sb_first_typ']) && $this->request->post['sb_first_typ'] != '') { $sb_first_typ = $this->request->post['sb_first_typ']; $exan .= $this->language->get('sb_first_typ') . $sb_first_typ . "<br />"; } if (isset($this->request->post['sb_first_src']) && $this->request->post['sb_first_src'] != '') { $sb_first_src = $this->request->post['sb_first_src']; $exan .= $this->language->get('sb_first_src') . $sb_first_src . "<br />"; } if (isset($this->request->post['sb_first_mdm']) && $this->request->post['sb_first_mdm'] != '') { $sb_first_mdm = $this->request->post['sb_first_mdm']; $exan .= $this->language->get('sb_first_mdm') . $sb_first_mdm . "<br />"; } if (isset($this->request->post['sb_first_cmp']) && $this->request->post['sb_first_cmp'] != '') { $sb_first_cmp = $this->request->post['sb_first_cmp']; $exan .= $this->language->get('sb_first_cmp') . $sb_first_cmp . "<br />"; } if (isset($this->request->post['sb_first_cnt']) && $this->request->post['sb_first_cnt'] != '') { $sb_first_cnt = $this->request->post['sb_first_cnt']; $exan .= $this->language->get('sb_first_cnt') . $sb_first_cnt . "<br />"; } if (isset($this->request->post['sb_first_trm']) && $this->request->post['sb_first_trm'] != '') { $sb_first_trm = $this->request->post['sb_first_trm']; $exan .= $this->language->get('sb_first_trm') . $sb_first_trm . "<br />"; } if (isset($this->request->post['sb_first_add_fd']) && $this->request->post['sb_first_add_fd'] != '') { $sb_first_add_fd = $this->request->post['sb_first_add_fd']; $exan .= $this->language->get('sb_first_add_fd') . $sb_first_add_fd . "<br />"; } if (isset($this->request->post['sb_first_add_ep']) && $this->request->post['sb_first_add_ep'] != '') { $sb_first_add_ep = $this->request->post['sb_first_add_ep']; $exan .= $this->language->get('sb_first_add_ep') . $sb_first_add_ep . "<br />"; } if (isset($this->request->post['sb_first_add_rf']) && $this->request->post['sb_first_add_rf'] != '') { $sb_first_add_rf = $this->request->post['sb_first_add_rf']; $exan .= $this->language->get('sb_first_add_rf') . $sb_first_add_rf . "<br />"; } // Source first visit end // Source current visit $exan .= "<br />" . $this->language->get('sb_current_visit_title') . "<br />"; if (isset($this->request->post['sb_current_typ']) && $this->request->post['sb_current_typ'] != '') { $sb_current_typ = $this->request->post['sb_current_typ']; $exan .= $this->language->get('sb_current_typ') . $sb_current_typ . "<br />"; } if (isset($this->request->post['sb_current_src']) && $this->request->post['sb_current_src'] != '') { $sb_current_src = $this->request->post['sb_current_src']; $exan .= $this->language->get('sb_current_src') . $sb_current_src . "<br />"; } if (isset($this->request->post['sb_current_mdm']) && $this->request->post['sb_current_mdm'] != '') { $sb_current_mdm = $this->request->post['sb_current_mdm']; $exan .= $this->language->get('sb_current_mdm') . $sb_current_mdm . "<br />"; } if (isset($this->request->post['sb_current_cmp']) && $this->request->post['sb_current_cmp'] != '') { $sb_current_cmp = $this->request->post['sb_current_cmp']; $exan .= $this->language->get('sb_current_cmp') . $sb_current_cmp . "<br />"; } if (isset($this->request->post['sb_current_cnt']) && $this->request->post['sb_current_cnt'] != '') { $sb_current_cnt = $this->request->post['sb_current_cnt']; $exan .= $this->language->get('sb_current_cnt') . $sb_current_cnt . "<br />"; } if (isset($this->request->post['sb_current_trm']) && $this->request->post['sb_current_trm'] != '') { $sb_current_trm = $this->request->post['sb_current_trm']; $exan .= $this->language->get('sb_current_trm') . $sb_current_trm . "<br />"; } if (isset($this->request->post['sb_current_add_fd']) && $this->request->post['sb_current_add_fd'] != '') { $sb_current_add_fd = $this->request->post['sb_current_add_fd']; $exan .= $this->language->get('sb_current_add_fd') . $sb_current_add_fd . "<br />"; } if (isset($this->request->post['sb_current_add_ep']) && $this->request->post['sb_current_add_ep'] != '') { $sb_current_add_ep = $this->request->post['sb_current_add_ep']; $exan .= $this->language->get('sb_current_add_ep') . $sb_current_add_ep . "<br />"; } if (isset($this->request->post['sb_current_add_rf']) && $this->request->post['sb_current_add_rf'] != '') { $sb_current_add_rf = $this->request->post['sb_current_add_rf']; $exan .= $this->language->get('sb_current_add_rf') . $sb_current_add_rf . "<br />"; } // Source current visit end // Current session $exan .= "<br />" . $this->language->get('sb_session_title') . "<br />"; if (isset($this->request->post['sb_session_pgs']) && $this->request->post['sb_session_pgs'] != '') { $sb_session_pgs = $this->request->post['sb_session_pgs']; $exan .= $this->language->get('sb_session_pgs') . $sb_session_pgs . "<br />"; } if (isset($this->request->post['sb_session_cpg']) && $this->request->post['sb_session_cpg'] != '') { $sb_session_cpg = $this->request->post['sb_session_cpg']; $exan .= $this->language->get('sb_session_cpg') . $sb_session_cpg . "<br />"; } // Current session end // Private data $exan .= "<br />" . $this->language->get('sb_private_title') . "<br />"; if (isset($this->request->post['sb_udata_vst']) && $this->request->post['sb_udata_vst'] != '') { $sb_udata_vst = $this->request->post['sb_udata_vst']; $exan .= $this->language->get('sb_udata_vst') . $sb_udata_vst . "<br />"; } if (isset($this->request->post['sb_udata_uip']) && $this->request->post['sb_udata_uip'] != '') { $sb_udata_uip = $this->request->post['sb_udata_uip']; $exan .= $this->language->get('sb_udata_uip') . $this->request->server['REMOTE_ADDR'] . "<br />"; } if (isset($this->request->post['sb_udata_uag']) && $this->request->post['sb_udata_uag'] != '') { $sb_udata_uag = $this->request->post['sb_udata_uag']; $exan .= $this->language->get('sb_udata_uag') . $sb_udata_uag . "<br />"; } if (isset($this->request->post['sb_promo_code']) && $this->request->post['sb_promo_code'] != '') { $sb_promo_code = $this->request->post['sb_promo_code']; $exan .= $this->language->get('sb_promo_code') . $sb_promo_code . "<br />"; } // Private data end } $order_data['customer_id'] = $customer_id; $order_data['customer_group_id'] = $customer_group_id; $order_data['firstname'] = $firstname; $order_data['lastname'] = $lastname; $order_data['email'] = $email; $order_data['telephone'] = $phone; $order_data['fax'] = $fax; $order_data['custom_field'] = array(); $order_data['payment_firstname'] = $firstname; $order_data['payment_lastname'] = $lastname; $order_data['payment_company'] = ''; $order_data['payment_address_1'] = $boc_title; $order_data['payment_address_2'] = ''; $order_data['payment_city'] = ''; $order_data['payment_postcode'] = ''; $order_data['payment_zone'] = ''; $order_data['payment_zone_id'] = ''; $order_data['payment_country'] = ''; $order_data['payment_country_id'] = ''; $order_data['payment_address_format'] = ''; $order_data['payment_custom_field'] = array(); $order_data['payment_method'] = $boc_title; $order_data['payment_code'] = 'cod'; $order_data['shipping_firstname'] = $firstname; $order_data['shipping_lastname'] = $lastname; $order_data['shipping_company'] = ''; $order_data['shipping_address_1'] = $boc_title; $order_data['shipping_address_2'] = ''; $order_data['shipping_city'] = ''; $order_data['shipping_postcode'] = ''; $order_data['shipping_zone'] = ''; $order_data['shipping_zone_id'] = ''; $order_data['shipping_country'] = ''; $order_data['shipping_country_id'] = ''; $order_data['shipping_address_format'] = ''; $order_data['shipping_custom_field'] = array(); $order_data['shipping_method'] = ''; $order_data['shipping_code'] = ''; $order_data['comment'] = $comment; $order_data['total'] = $boc_order_total; $order_data['affiliate_id'] = 0; $order_data['commission'] = 0; $order_data['marketing_id'] = 0; $order_data['tracking'] = ''; $order_data['language_id'] = $this->config->get('config_language_id'); $order_data['currency_id'] = $this->currency->getId($this->session->data['currency']); $order_data['currency_code'] = $this->session->data['currency']; $order_data['currency_value'] = $this->currency->getValue($this->session->data['currency']); $order_data['ip'] = $this->request->server['REMOTE_ADDR']; if (!empty($this->request->server['HTTP_X_FORWARDED_FOR'])) { $order_data['forwarded_ip'] = $this->request->server['HTTP_X_FORWARDED_FOR']; } elseif (!empty($this->request->server['HTTP_CLIENT_IP'])) { $order_data['forwarded_ip'] = $this->request->server['HTTP_CLIENT_IP']; } else { $order_data['forwarded_ip'] = ''; } if (isset($this->request->server['HTTP_USER_AGENT'])) { $order_data['user_agent'] = $this->request->server['HTTP_USER_AGENT']; } else { $order_data['user_agent'] = ''; } if (isset($this->request->server['HTTP_ACCEPT_LANGUAGE'])) { $order_data['accept_language'] = $this->request->server['HTTP_ACCEPT_LANGUAGE']; } else { $order_data['accept_language'] = ''; } $this->load->model('extension/module/bocorder'); $data['order_id'] = $this->model_extension_module_bocorder->addBocorder($order_data); if (empty($data['order_id'])) { $json['error']['order'] = $this->language->get('error_order'); } else { $this->session->data['order_id'] = $data['order_id']; $this->model_extension_module_bocorder->addBocorderHistory($data['order_id'], $this->config->get('config_order_status_id'), $exan); $json['success'] = sprintf($this->language->get('text_success'), $data['order_id'], $phone); if ($buyoneclick_success_type == '1') { $json['redirect'] = $this->url->link('checkout/success', '', 'SSL'); } $this->send_sms($product_info['name'], $firstname, $phone, $email, $data['order_id']); } } else { $json['redirect'] = str_replace('&amp;', '&', $this->url->link('product/product', 'product_id=' . $this->request->post['product_id'])); } } else { $json['error']['product'] = $this->language->get('error_product'); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Я так понимаю надо в этот массив добавить 'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id']), // $order_data['products'] = array(); $order_data['products'][] = array ( 'product_id' => $product_info['product_id'], 'name' => $product_info['name'], 'model' => $product_info['model'], 'option' => $product_option, 'download' => '', 'quantity' => $product_quantity, 'subtract' => $product_info['subtract'], 'price' => $boc_unit_price, 'total' => $boc_total, 'tax' => $boc_unit_tax, 'reward' => $product_info['reward'] ); Но нет, не помогает. Подскажите люди добрые кому не сложно и понятно, как мне сделать что была ссылка на товар в письме от него XD buyoneclick.
  5. а вот так вообще по красоте. SELECT c.customer_id, c.email, c.telephone, c.firstname FROM oc_customer c LEFT JOIN oc_order o ON c.customer_id = o.customer_id WHERE o.customer_id is NULL
  6. Скучно вам да. ) Cuctomer - и не увидел же сразу... Но это таки не всё да. SELECT c.customer_id FROM oc_customer c LEFT JOIN oc_order o ON c.customer_id = o.customer_id WHERE o.customer_id is NULL Вот так работает. (Но через мозги - через копипаст и это не сработает.)))))) Спасибо вам.
  7. Здравствуйте, на сайте регистрируются покупатели, их мотивируют зарегистрироваться, скидками, но есть такие которые так и не купили в итоге, и вот как отобрать тех пользователей которые так и не совершили ни одной покупки, ну что бы в дальнейшем сделать по ним рассылку, или прозвон. Поиск по запросу "opencart неактивные пользователи", "opencart рассылка по неактивным покупателям", "opencart пользователи которые не совершали покупок", "opencart зарегистрированные без покупок", результатов не дал. Подскажите пожалуйста как отделить одних от других. Тех что делали покупку от тех кто не делал. ocStore 3.0.3.7.
  8. Здравствуйте, появилась необходимость вывести в категории какой либо контент типа заголовок, изображение в зависимости от содержимого utm метки, именно в моём случае подошло utm_campaign, и я вот нашёл решение и доработал его под себя (сам я в php на 2с плюсом). public function index() { if (isset($_GET['utm_campaign'])) { $_SESSION['utm_campaign'] = $_GET['utm_campaign']; } $title = $_SESSION['utm_campaign']; if (isset($_GET['utm_campaign'])) { $title_text = '<img class="changed-img" src="/image/cache/catalog/banners/subcat/des-subcat-1x1.png">'; } switch ($title) { case "78466906": $title_text = 'ЗАГОЛОВОК_1'; break; case "78466906_1": $title_text = '<h2>ЗАГОЛОВОК_2</h2> <img src="/image/cache/catalog/banners/subcat/des-subcat-1x1.png">'; break; } $data['title_text_n'] = $title_text; И поставил я всё это дело в controller/category.php сразу после public function index() { как вы можете видеть, добавил переменную $data['title_text_n'] = $title_text;, и в шаблоне category.twig вызвал всё это дело таким образом {% if title_text_n is empty %} {{ content_top }} {% else %} <div class="change-content">{{ title_text_n }}</div> {% endif%} И в итоге то, всё работает, если нет в get запросе переменной utm_campaign то content top, если есть но не попадает под заданные switch case параметры то просто изображение, если есть то всё в соответствии с case. Но чувствую что творю я лютую дичь. ))) (Да и х... с ним), но всё же вот вопрос(ы). Как я понимаю вот это всё такое в контроллер помещать я не должен. $title_text = '<h2>ЗАГОЛОВОК_2</h2> <img src="/image/cache/catalog/banners/subcat/des-subcat-1x1.png">'; я могу пометить это в языковые переменные, то есть создать в language/category.php например text_cahged_def - $_['text_cahged_def'] = 'Преимущества: <img class="changed-img-lang" src="/image/cache/catalog/banners/subcat/des-subcat-1x1.png">'; и вот так switch ($title) { case "78466906": $title_text = $this->language->get('text_cahged_one'); break; case "78466906_1": $title_text = $this->language->get('text_cahged_two'); break; } И так работает. Но чувство что творю дичь не покидает. )).. В общем вопрос подскажите пожалуйста как это сделать по уму - правильно, не надо мне готовых решений, вы подскажите пожалуйста куда смотреть, обратить внимание, ну и вообще от любых подсказок буду безумно признателен.
  9. Спасибо вам огромное! Честно, я искал.
  10. Здравствуйте Все! И всегда! В общем есть в ocStore 3.0.3.7 свой блог, и задача для каждой статьи выводить свой баннер сверху, это как я думал решается созданием индивидуальной схемы для каждой статьи блога. В схему пишем магазин по умолчанию и путь / . И на желаемую статью блога, назначаем новую схему. Такой метод успешно работает для обычных статей которые в разделе каталог. А вот для раздела БЛОГ - > статьи блога, еcли я в назначаемую схему пишу путь / и назначаю её на статью, ничего не выводится не в content_top не в bottom ни куда, а если пишу путь blog/article, то что я указываю в схеме в content_top или куда ещё, выводится во все статьи блога, даже куда эта схема не назначена, или даже если назначена другая схема. Была родная схема "Статьи блога" с путём blog/article , я её удалил. Тоесть на вновь созданной схеме с путём /, и в назначаемой статье ни чего не выводится в статью, а с путём blog/article выводится во все статьи блога даже которым назначена другая схема. Подскажите пожалуйста в чём это не доглядели создатели, и где же мне что подправить, контроллер blog/article.php глянул, все в принципе как в контроллере product.php, в общем ничего не понял ))) но чует моё сердце что дело тут в контроллере. Подскажите пожалуйста, может кто сталкивался с таким, или просто знает как это решить. Просто в блоге уде создано прилично так статей, а теперь дезигнеры из приукрасили, надо сделать, и переделывать из блога в обычные статьи это в общем то засада.
  11. <?xml version="1.0" encoding="UTF-8"?> <modification> <name>Hide promotions in admin panel</name> <code>skippromotion</code> <version>3.0x</version> <author>TH</author> <link>https://stackoverflow.com/questions/55702884</link> <file path="admin/controller/extension/extension/*.php"> <!-- Remove the 'promotions' feature --> <operation error="log"> <search><![CDATA[$data['promotion'] = $this->load->controller('marketplace/promotion');]]></search> <add position="replace"><![CDATA[ $data['promotion'] = ''; ]]></add> </operation> </file> </modification> OcMod
  12. Спасибо. вот метод, который нашёл но изменил под 3.0.3.7.
  13. Тогда значит заболел опенкарт, я же говорю, чистая установка, так же то же самое выдаёт.
  14. Здравствуйте, в разделе расширений появилась вот такая надпись, сразу над всеми расширениями. Please enable cookies. Please wait... We are checking your browser... opencartforum.com Please stand by, while we are checking your browser... Redirecting... Please turn JavaScript on and reload the page. Please enable Cookies and reload the page. Why do I have to complete a CAPTCHA? Completing the CAPTCHA proves you are a human and gives you temporary access to the web property. What can I do to prevent this in the future? If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware. If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices. ======================================= Первичный поиск ни чего не выдал, знающие люди, подскажите пожалуйста, что это и что с эти делать? P.S. Точно не что то из установленного, ибо на чистой установке тоже самое.
  15. Вот так, в контроллер information if ($information_info['information_id'] == 14) { $this->response->setOutput($this->load->view('information/informationvid', $data)); } else { $this->response->setOutput($this->load->view('information/information', $data)); } //$this->response->setOutput($this->load->view('information/information', $data)); где 14 это id вашей статьи. informationvid это название нового .tpl или .twig шаблона, эта схема работает ни на 2 и на 3 версии. Схему назначать менять не надо, то есть, схемы работают как обычно. В шаблоне делаете как вам надо.
  16. https://https://opencartforum.com/files//opencart-moduli-shablony/moduli/uchet-v-zakaze/predoplata Вот нашёл в принципе подходит, не совсем то что хотелось, но допустим. И с этим модулем если он включен, то предоплата будет при настроенных условиях, там доставка какая, оплата. Но. Нужен так сказать чекбокс, который для покупателя будет включать или не включать возможность предоплаты, то есть чтобы покупатель мог выбрать, сделать предоплату или оплатить всю сумму сразу.
  17. Да вот в том то и дело, как объяснить, вас это волновать не должно, вы мне сделайте что бы работало, а я объясню. Можете сделать,? будете делать,? цена? Нет.? Тогда нет.

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.