전에 올린글에 리플이 있엇는데 먼말인지 이해를 못하시겟다고 흑흑
다시 정리해 볼게요

A라는 오픈소스 플그램 버전 1 을 쓰고있었어용
근데 거기서 코드를 좀 고쳐서 썻어요...
정확히 말하면 기존에 있는 코드를 지웟거나 바꾼건 없고, 기존에 있는거에 코드를 추가해서 썻어요..
밑에보면 보통 글씨가 원래 오리지날이고, 두껍고 큰 글씨가 추가된 부분이에용...


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\'];    }

  }


그런데, 이 프로그램이 버전 2가 나왓어요...업그레이드를 하려는데 걍 업그래이드를 하면 저 위에 추가한 기능이 날라가 버려용 ㅠㅠ
그래서 제딴에 생각하기를, 아하! 어차피 코드가 추가된것 뿐이니, 파일을 열어서 같은 부분을 찾아서 같은 부위에 추가하면 되겟네!
라고 생각해서, 저 코드 부분을 찾아보았어요..그런데 버전 2에서는 저 부분이 다르게 코딩되어있는것이었어요..
요렇게...


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\'],
    \'cost\'            => $result[\'cost\'],
    \'special\'          => $special[\'cost\'],
    \'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




제가 php를 잘 몰라서 저 큰 글씨 부분이 무엇을 의미하는지 해석이 잘 안되서
새로운 버전의 코딩에 맞게 수정하는거 당연히 불가능해서요 ㅠㅠ
저 큰글씨 부분의 기능을 업뎃된 버전의 코딩에 맞게 해서 계속 쓰고 싶거든요..ㅠㅠ

도와주시면 정말 이쁜이쁜 배우자 만나실거에요..ㅠㅠ
불쌍한 처자하나좀 도와주세요 ㅠㅠ php 강의같은거 잘 되어있는데 어디 없나 흑흑 ㅜㅠ