Jump to content

igorfelix

Пользователи
  • Content Count

    685
  • Joined

  • Last visited

Community Reputation

16 Обычный

1 Follower

About igorfelix

  • Rank
    Продвинутый пользователь

Информация

  • Пол
    Не определился

Recent Profile Visitors

4,635 profile views
  1. Даже если положительный остаток, просто хочу в карточку товара вывести статус под id 5 (Ожидание 2-3 дня) Все я сам сделал ) в model (SELECT ss.name FROM " . DB_PREFIX . "stock_status ss WHERE ss.stock_status_id = 6 AND ss.language_id = '" . (int)$this->config->get('config_language_id') . "') AS stock_status_2, 'stock_status_2' => $query->row['stock_status_2'] контролер $data['stock'] = $product_info['stock_status_2']; шаблон <?php echo $stock; ?>
  2. а Как сделать что б он дергал статус не у товара, а из системы (Главная-Состояние склада и там 6 статусов), например под id 5 нужно взять переменную ее текст (например "под реализацию"), и эту переменную вставить в карточку товара.
  3. Нашел еще недочет.. если человек был авторизован и потом вышел, то на странице сайт.ру/logout/ будет ошибка Notice: Undefined variable: order_id in /var/www/www-root/data/www/вашсайт.ру/catalog/view/theme/default/template/common/success.tpl on line 23 Вы вышли из вашего личного кабинета. Ваша корзина покупок была сохранена. Она будет восстановлена при следующем входе в личный кабинет. и еще на странице /index.php?route=affiliate/success тоже ....
  4. Добрый день, купил модуль. версия 2.3 Устанавливал все по инструкции. Сайт вырубило нахр*н. Админку и Фронт. Народ делайте бекапы всегда ! Автор напишите мне в личку
  5. Гугл все равно ни в какую не хочет в консоле подхватывать. Домен кириллический с HTTPS но в Гугл если сайт вбить вроде страницы есть тут форум обшуршал, видимо это у многих такая проблема
  6. Так и чем закончилась проблема? Решения нет?
  7. спасибо за ответ. а я сделал по другому. если страницу обновили, то переменную скрыл. но за ответ спасибо, пригодится
  8. Аналогично. 2 часа просидел.. не видит он схему.. где упустили.. ?
  9. Помогите подправить, в адресе картинки у товара идет два слэша. /image//catalog/gallery/
  10. А у меня получилось, выложу новый filemanager.php. Теперь при открытие стандартного менеджера изображений будет открывать сайт.рф/image/ Версия 2.3 опенкарт . <?php classControllerCommonFileManagerextendsController{protectedfunction translit($text){ $rus = array("а","А","б","Б","в","В","г","Г","д","Д","е","Е","ё","Ё","є","Є","ж","Ж","з","З","и","И","і","І","ї","Ї","й","Й","к","К","л","Л","м","М","н","Н","о","О","п","П","р","Р","с","С","т","Т","у","У","ф","Ф","х","Х","ц","Ц","ч","Ч","ш","Ш","щ","Щ","ъ","Ъ","ы","Ы","ь","Ь","э","Э","ю","Ю","я","Я",'/',' '); $eng =array("a","A","b","B","v","V","g","G","d","D","e","E","e","E","e","E","zh","ZH","z","Z","i","I","i","I","yi","YI","j","J","k","K","l","L","m","M","n","N","o","O","p","P","r","R","s","S","t","T","u","U","f","F","h","H","c","C","ch","CH","sh","SH","sch","SCH","","","y","Y","","","e","E","ju","JU","ja","JA",'',''); $text = strtolower(str_replace($rus,$eng,$text)); $disallow_symbols = array(' '=>'-','\\'=>'-','/'=>'-',':'=>'-','*'=>'','?'=>'',','=>'','"'=>'','\''=>'','<'=>'','>'=>'','|'=>'');return trim(strip_tags(str_replace(array_keys($disallow_symbols), array_values($disallow_symbols), trim(html_entity_decode($text, ENT_QUOTES,'UTF-8')))),'-');}publicfunction index(){ $this->load->language('common/filemanager');// Find which protocol to use to pass the full image link backif(isset($this->request->server['HTTPS'])&&(($this->request->server['HTTPS']=='on')||($this->request->server['HTTPS']=='1'))){ $server = HTTPS_CATALOG;}else{ $server = HTTP_CATALOG;}if(isset($this->request->get['filter_name'])){ $filter_name = rtrim(str_replace(array('*','/'),'', $this->request->get['filter_name']),'/');}else{ $filter_name =null;}// Save current directoryif(!isset($this->request->get['directory'])){if(!isset($this->request->get['parent'])){//New call Filemanager $this->request->get['directory']= isset($this->request->cookie['file_manager']['directory'])? $this->request->cookie['file_manager']['directory']:''; $this->request->get['page']= isset($this->request->cookie['file_manager']['page'])? $this->request->cookie['file_manager']['page']:1;}else{// Trying to go back to the root directory, delete cookies setcookie('file_manager[directory]','', time()-3600,'/', $this->request->server['HTTP_HOST']); setcookie('file_manager,'', time()-3600,'/', $this->request->server['HTTP_HOST']);}}else{ setcookie('file_manager[directory]', $this->request->get['directory'], time()+60*60*24*30,'/', $this->request->server['HTTP_HOST']); setcookie('file_manager, isset($this->request->get['page'])? $this->request->get['page']:1, time()+60*60*24*30,'/', $this->request->server['HTTP_HOST']);}// Make sure we have the correct directoryif(isset($this->request->get['directory'])){ $directory = rtrim(DIR_IMAGE .''. str_replace('*','', $this->request->get['directory']),'/');}else{ $directory = DIR_IMAGE;}if(isset($this->request->get['page'])){ $page = $this->request->get['page'];}else{ $page =1;} $directories = array(); $files = array(); $data['images']= array(); $this->load->model('tool/image');if(substr(str_replace('\\','/', realpath($directory).'/'. $filter_name),, strlen(DIR_IMAGE))== DIR_IMAGE){// Get directories $directories = glob($directory .'/'. $filter_name .'*', GLOB_ONLYDIR);if(!$directories){ $directories = array();}// Get files $files = glob($directory .'/'. $filter_name .'*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', GLOB_BRACE);if(!$files){ $files = array();}}// Merge directories and files $images = array_merge($directories, $files);// Get total number of files and directories $image_total = count($images);// Split the array based on current page number and max number of items per page of 10 $images = array_splice($images,($page -1)*16,16);foreach($images as $image){ $name = str_split(basename($image),14);if(is_dir($image)){ $url ='';if(isset($this->request->get['cke'])){ $url .='&cke='. $this->request->get['cke'];}if(isset($this->request->get['target'])){ $url .='&target='. $this->request->get['target'];}if(isset($this->request->get['thumb'])){ $url .='&thumb='. $this->request->get['thumb'];} $data['images'][]= array('thumb'=>'','name'=> implode(' ', $name),'type'=>'directory','path'=> utf8_substr($image, utf8_strlen(DIR_IMAGE)),'href'=> $this->url->link('common/filemanager','token='. $this->session->data['token'].'&directory='. urlencode(utf8_substr($image, utf8_strlen(DIR_IMAGE .''))). $url,true));} elseif (is_file($image)){ $data['images'][]= array('thumb'=> $this->model_tool_image->resize(utf8_substr($image, utf8_strlen(DIR_IMAGE)),100,100),'name'=> implode(' ', $name),'type'=>'image','path'=> utf8_substr($image, utf8_strlen(DIR_IMAGE)),'href'=> $server .'image/'. utf8_substr($image, utf8_strlen(DIR_IMAGE)));}} $data['heading_title']= $this->language->get('heading_title'); $data['text_no_results']= $this->language->get('text_no_results'); $data['text_confirm']= $this->language->get('text_confirm'); $data['entry_search']= $this->language->get('entry_search'); $data['entry_folder']= $this->language->get('entry_folder'); $data['button_parent']= $this->language->get('button_parent'); $data['button_refresh']= $this->language->get('button_refresh'); $data['button_upload']= $this->language->get('button_upload'); $data['button_folder']= $this->language->get('button_folder'); $data['button_delete']= $this->language->get('button_delete'); $data['button_search']= $this->language->get('button_search'); $data['token']= $this->session->data['token'];if(isset($this->request->get['directory'])){ $data['directory']= urlencode($this->request->get['directory']);}else{ $data['directory']='';}if(isset($this->request->get['filter_name'])){ $data['filter_name']= $this->request->get['filter_name'];}else{ $data['filter_name']='';}// Return the target ID for the file manager to set the valueif(isset($this->request->get['target'])){ $data['target']= $this->request->get['target'];}else{ $data['target']='';}// CKEditorif(isset($this->request->get['cke'])){ $data['cke']= $this->request->get['cke'];}else{ $data['cke']='';}// Return the thumbnail for the file manager to show a thumbnailif(isset($this->request->get['thumb'])){ $data['thumb']= $this->request->get['thumb'];}else{ $data['thumb']='';}// Parent $url ='&parent=parent';if(isset($this->request->get['directory'])){ $pos = strrpos($this->request->get['directory'],'/');if($pos){ $url .='&directory='. urlencode(substr($this->request->get['directory'],, $pos));}}if(isset($this->request->get['cke'])){ $url .='&cke='. $this->request->get['cke'];}if(isset($this->request->get['target'])){ $url .='&target='. $this->request->get['target'];}if(isset($this->request->get['thumb'])){ $url .='&thumb='. $this->request->get['thumb'];} $data['parent']= $this->url->link('common/filemanager','token='. $this->session->data['token']. $url,true);// Refresh $url ='';if(isset($this->request->get['directory'])){ $url .='&directory='. urlencode($this->request->get['directory']);}if(isset($this->request->get['cke'])){ $url .='&cke='. $this->request->get['cke'];}if(isset($this->request->get['target'])){ $url .='&target='. $this->request->get['target'];}if(isset($this->request->get['thumb'])){ $url .='&thumb='. $this->request->get['thumb'];} $data['refresh']= $this->url->link('common/filemanager','token='. $this->session->data['token']. $url,true); $url ='';if(isset($this->request->get['directory'])){ $url .='&directory='. urlencode(html_entity_decode($this->request->get['directory'], ENT_QUOTES,'UTF-8'));}if(isset($this->request->get['filter_name'])){ $url .='&filter_name='. urlencode(html_entity_decode($this->request->get['filter_name'], ENT_QUOTES,'UTF-8'));}if(isset($this->request->get['cke'])){ $url .='&cke='. $this->request->get['cke'];}if(isset($this->request->get['target'])){ $url .='&target='. $this->request->get['target'];}if(isset($this->request->get['thumb'])){ $url .='&thumb='. $this->request->get['thumb'];} $pagination =newPagination(); $pagination->total = $image_total; $pagination->page = $page; $pagination->limit =16; $pagination->url = $this->url->link('common/filemanager','token='. $this->session->data['token']. $url .'&page={page}',true); $data['pagination']= $pagination->render(); $this->response->setOutput($this->load->view('common/filemanager', $data));}publicfunction upload(){ $this->load->language('common/filemanager'); $json = array();// Check user has permissionif(!$this->user->hasPermission('modify','common/filemanager')){ $json['error']= $this->language->get('error_permission');}// Make sure we have the correct directoryif(isset($this->request->get['directory'])){ $directory = rtrim(DIR_IMAGE .''. $this->request->get['directory'],'/');}else{ $directory = DIR_IMAGE;}// Check its a directoryif(!is_dir($directory)|| substr(str_replace('\\','/', realpath($directory)),, strlen(DIR_IMAGE))!= DIR_IMAGE){ $json['error']= $this->language->get('error_directory');}if(!$json){// Check if multiple files are uploaded or just one $files = array();if(!empty($this->request->files['file']['name'])&& is_array($this->request->files['file']['name'])){foreach(array_keys($this->request->files['file']['name'])as $key){ $files[]= array('name'=> $this->request->files['file']['name'][$key],'type'=> $this->request->files['file']['type'][$key],'tmp_name'=> $this->request->files['file']['tmp_name'][$key],'error'=> $this->request->files['file']['error'][$key],'size'=> $this->request->files['file']['size'][$key]);}}foreach($files as $file){if(is_file($file['tmp_name'])){// Sanitize the filename $filename = basename($this->translit(html_entity_decode($file['name'], ENT_QUOTES,'UTF-8')));// Validate the filename lengthif((utf8_strlen($filename)<3)||(utf8_strlen($filename)>255)){ $json['error']= $this->language->get('error_filename');}// Allowed file extension types $allowed = array('jpg','jpeg','gif','png');if(!in_array(utf8_strtolower(utf8_substr(strrchr($filename,'.'),1)), $allowed)){ $json['error']= $this->language->get('error_filetype');}// Allowed file mime types $allowed = array('image/jpeg','image/pjpeg','image/png','image/x-png','image/gif');if(!in_array($file['type'], $allowed)){ $json['error']= $this->language->get('error_filetype');}// Return any upload errorif($file['error']!= UPLOAD_ERR_OK){ $json['error']= $this->language->get('error_upload_'. $file['error']);}}else{ $json['error']= $this->language->get('error_upload');}if(!$json){ move_uploaded_file($file['tmp_name'], $directory .'/'. $filename);}}}if(!$json){ $json['success']= $this->language->get('text_uploaded');} $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json));}publicfunction folder(){ $this->load->language('common/filemanager'); $json = array();//Translit Folder Name $this->request->post['folder']= $this->translit($this->request->post['folder']);// Check user has permissionif(!$this->user->hasPermission('modify','common/filemanager')){ $json['error']= $this->language->get('error_permission');}// Make sure we have the correct directoryif(isset($this->request->get['directory'])){ $directory = rtrim(DIR_IMAGE .''. $this->request->get['directory'],'/');}else{ $directory = DIR_IMAGE;}// Check its a directoryif(!is_dir($directory)|| substr(str_replace('\\','/', realpath($directory)),, strlen(DIR_IMAGE))!= DIR_IMAGE){ $json['error']= $this->language->get('error_directory');}if($this->request->server['REQUEST_METHOD']=='POST'){// Sanitize the folder name $folder = basename(html_entity_decode($this->request->post['folder'], ENT_QUOTES,'UTF-8'));// Validate the filename lengthif((utf8_strlen($folder)<3)||(utf8_strlen($folder)>128)){ $json['error']= $this->language->get('error_folder');}// Check if directory already exists or notif(is_dir($directory .'/'. $folder)){ $json['error']= $this->language->get('error_exists');}}if(!isset($json['error'])){@mkdir($directory .'/'. $folder,0777); chmod($directory .'/'. $folder,0777);@touch($directory .'/'. $folder .'/'.'index.html'); $json['success']= $this->language->get('text_directory');} $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json));}publicfunctiondelete(){ $this->load->language('common/filemanager'); $json = array();// Check user has permissionif(!$this->user->hasPermission('modify','common/filemanager')){ $json['error']= $this->language->get('error_permission');}if(isset($this->request->post['path'])){ $paths = $this->request->post['path'];}else{ $paths = array();}// Loop through each path to run validationsforeach($paths as $path){// Check path exsistsif($path == DIR_IMAGE || substr(str_replace('\\','/', realpath(DIR_IMAGE . $path)),, strlen(DIR_IMAGE))!= DIR_IMAGE){ $json['error']= $this->language->get('error_delete');break;}}if(!$json){// Loop through each pathforeach($paths as $path){ $path = rtrim(DIR_IMAGE . $path,'/');// If path is just a file delete itif(is_file($path)){@unlink($path);// If path is a directory beging deleting each file and sub folder} elseif (is_dir($path)){ $files = array();// Make path into an array $path = array($path .'*');// While the path array is still populated keep looping throughwhile(count($path)!=){ $next = array_shift($path);foreach(glob($next)as $file){// If directory add to path arrayif(is_dir($file)){ $path[]= $file .'/*';}// Add the file to the files to be deleted array $files[]= $file;}}// Reverse sort the file array rsort($files);foreach($files as $file){// If file just deleteif(is_file($file)){@unlink($file);// If directory use the remove directory function} elseif (is_dir($file)){ rmdir($file);}}}} $json['success']= $this->language->get('text_delete');} $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json));}} ' '
  11. Обновите страницу после заказа, и увидите ошибки, что переменная не найдена. Кто знает как устранить ?
  12. Всем привет! У кого нибудь сползают категории ? У меня часто почему то модуль категории путает. Много косяков нашел в модуле. Производителям иногда rand прописывает. Автор модуля не отвечает. Мне кажется он клал уже давно на модуль свой.
×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.