묻고답하기

오픈소스 프로그램을 수정해서 쓰고 있었는데요, (수정은 제가 안했고요..,)
수정전 소스가 이거고요.....

foreach ($results as $result) {
    if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) {
     $this->data['product_images'][] = array(
      '+ 'preview' => $this->model_tool_image->resize($result['image'], 100, 100),
      'file'    => $result['image']
     );
    } else {
     $this->data['product_images'][] = array(
      'preview' => $this->model_tool_image->resize('no_image.jpg', 100, 100),
      'file'    => $result['image']
     );
    }
   }
  }

수정해서 쓰던 소스는 이거에요...(빨간부분이 추가됨)

  foreach ($results as $result) {
   
    if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) {
     $this->data['product_images'][] = array(
      '+ 'preview' => $this->model_tool_image->resize($result['image'], 100, 100),
      'file'    => $result['image'],       'product_color_id'    => $result['product_color_id']     

     );
    } else {
     $this->data['product_images'][] = array(
      'preview' => $this->model_tool_image->resize('no_image.jpg', 100, 100),
      'file'    => $result['image'],       'product_color_id'    => $result['product_color_id'] 
     );     }    }   }   $this->data['product_colors'] = array();   if (isset($product_info)) {    $results = $this->model_catalog_product->getProductColors($this->request->get['product_id']);      foreach ($results as $result) {         if ($result['color'] && file_exists(DIR_IMAGE . $result['color'])) {      $this->data['product_colors'][] = array(       'preview' => $this->model_tool_image->resize($result['color'], 30, 30),       'file'    => $result['color'],       'product_color_id'    => $result['product_color_id'],       'name'    => $result['name']      );     } else {      $this->data['product_colors'][] = array(       'preview' => $this->model_tool_image->resize('no_image.jpg', 30, 30),       'file'    => $result['color'],       'product_color_id'    => 0,       'name'    => ''           );
    }
   }
  }
  $this->data['product_sizes'] = array();   if (isset($product_info)) {    $results = $this->model_catalog_product->getProductSizes($this->request->get['product_id']);      foreach ($results as $result) {      $this->data['product_sizes'][] = $result['size'];    }

  }

그리고 저 오픈소스 플그램이 업데이트가 되어서요.. 저는 php를 잘 모르고 해서
문서를 서로 대조해서, 추가된 위치와 부분을 찾아 필요한데로 추가해서 쓰려고 했는데,
코딩 형식이 조금 바뀌엇더라구요....ㅜㅜ 업데이트 된 소스 는 ::

foreach ($results as $result) {
   $action = array();
   
   $action[] = array(
    'text' => $this->language->get('text_edit'),
    '+ 'href' => $this->url->link('catalog/product/update', 'token=' . $this->session->data['token'] . '&product_id=' . $result['product_id'] . $url, 'SSL')
   );
   
   if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) {
    $image = $this->model_tool_image->resize($result['image'], 40, 40);
   } else {
    $image = $this->model_tool_image->resize('no_image.jpg', 40, 40);
   }
 
   $product_specials = $this->model_catalog_product->getProductSpecials($result['product_id']);

   if ($product_specials) {
                $special = reset($product_specials);
                if(($special['date_start'] != '0000-00-00' && $special['date_start'] > date('Y-m-d')) || ($special['date_end'] != '0000-00-00' && $special['date_end'] < date('Y-m-d'))) {
                    $special = FALSE;
                }
            } else {
                $special = FALSE;
            }
 
        $this->data['products'][] = array(
    'product_id'       => $result['product_id'],
    'name'             => $result['name'],
    'model'            => $result['model'],
    'price'            => $result['price'],
    'special'          => $special['price'],
    'image'            => $image,    'quantity'         => $result['quantity'],
    'status'+ '           => ($result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled')),
    'selected'         => isset($this->request->post['selected']) && in_array($result['product_id'], $this->request->post['selected']),
    'action'           => $action


보니까 업데이트 버젼 코딩엔 키값(?) 주고 하는 부분의 형식이 바뀌고 한것 같은데..
'file'도 없고요... 두번째 소스에 빨간 부분의 내용을 이 업데이트된 부분에 추가해서 쓰고싶은데..
자비를좀 배풀어 주세요..!! ㅜㅜ

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
토이터 호스팅 카페24 사용하면 1.7 업그레이드 문제없나요? [1] 2013.04.09 by KANTSOFT
jean 레이아웃 직접 수정하는 방법? 1.7 [1] 2013.04.09 by 투씨
네모스 위젯 gallery_frame에서 썸네일 이미지를 첨부이미지2로 변경 관련  
본체 게시판에 글쓰기하면 오류메시지가 나옵니다. file  
웹개밥 자동삭제 애드온이 작동이 안됩니다.  
sfunicon Please enter a value for user_layout_image['name'] 의미?  
smurpooh XE 기본 방명록에서 관리권한으로 삭제하기  
poemcradle XE 1.7.3이후 플래너XE123 에러... [1] file 2013.04.08 by 늘푸른나무2
qkrgysu 월간일정표에 관해서 [1] file 2013.04.08 by 늘푸른나무2
XE플스 gnb 2차 메뉴 가로 배열 구조 마무리 문의드립니다. [1] 2013.04.08 by Sulli
ramia1 CSS이미지 삽입 테두리 질문드립니다. file  
numi 1.4.5.10 카운터가 작동하지않습니다ㅜㅜ  
나뚜루녹차 위젯을 수정하고싶습니다  
gh1980 드림위버와 같이 사용 [2] 2013.04.08 by 송동우
늘같이 레이아웃 css가 저장이 안 되네요 ㅜㅜ [1] 2013.04.08 by 강하레
시카고 로그인 유지가 PC와 모바일에서 동시에 가능하면 좋겠습니다 [1] 2013.04.08 by 강하레
pentopen 댓글창 권한조정으로 없앨수 있나요? [1] 2013.04.08 by 송동우
머들린 닉네임 초기화 및 포인트 현황 관련 질문  
글쎄나는 [레이아웃 사용안함]시 css설정은 어디에서? [2] 2013.04.08 by 윈컴이
Orchestra 제로보드 xe 사이트 이전시