Ejemplo n.º 1
0
 public function showFeedDetails($id)
 {
     // get amazon_feed record
     $feed = new WPLA_AmazonFeed($id);
     // prepare feed content
     // $rows = $this->csv_to_array( $feed_data );
     $rows = $feed->getDataArray();
     // prepare feed result
     $result_header = implode("\n", array_slice(explode("\n", $feed->results), 0, 4));
     $result_content = implode("\n", array_slice(explode("\n", $feed->results), 4));
     $result_content = str_replace('original-record-number', '#', $result_content);
     $result_content = str_replace('error-code', 'code', $result_content);
     $result_content = str_replace('error-type', 'type', $result_content);
     $result_rows = $this->csv_to_array($result_content);
     // send log entry to support
     if (isset($_REQUEST['send_to_support']) && $_REQUEST['send_to_support'] == 'yes') {
         $this->sendRecordToSupport($id, $row);
     }
     unset($feed->data);
     unset($feed->results);
     $aData = array('feed' => $feed, 'rows' => $rows, 'result_rows' => $result_rows, 'result_header' => $result_header);
     $this->display('feed_details', $aData);
 }