I misunderstood. I checked the data within phpmyadmin but did not run a query, sorry for my confusion. Can you please advise which query I can run and I will share the results?
Also, I checked the easypopulate_4_export.php file and replaced row 222-301 with the following and it worked, all data is showing when processing Basic Attributtes. Of course the code is coming from a previous version of EP4
Code:
// these variables are for the Attrib_Basic Export
$active_products_id = ""; // start empty
$active_options_id = ""; // start empty
$active_language_id = ""; // start empty
$active_row = array(); // empty array
$last_products_id = "";
$print1 = 0;
$result = ep_4_query($filelayout_sql);
while ($row = ($ep_uses_mysqli ? mysqli_fetch_array($result) : mysql_fetch_array($result))) {
if ($ep_dltype == 'attrib_basic') { // special case 'attrib_basic'
if ($row['v_products_id'] == $active_products_id) {
if ($row['v_options_id'] == $active_options_id) {
// collect the products_options_values_name
if ($active_language_id <> $row['v_language_id']) {
$l_id = $row['v_language_id'];
$active_row['v_products_options_type'] = $row['v_products_options_type'];
$active_row['v_products_options_name_'.$l_id] = $row['v_products_options_name'];
$active_row['v_products_options_values_name_'.$l_id] = $row['v_products_options_values_name'];
$active_language_id = $row['v_language_id'];
} else {
$l_id = $row['v_language_id'];
$active_row['v_products_options_name_'.$l_id] = $row['v_products_options_name'];
$active_row['v_products_options_values_name_'.$l_id] .= ",".$row['v_products_options_values_name'];
$active_row['v_products_options_type'] = $row['v_products_options_type'];
}
continue; // loop - for more products_options_values_name on same v_products_id/v_options_id combo
} else { // same product, new attribute - only executes once on new option
// Clean the texts that could break CSV file formatting
$dataRow = '';
$problem_chars = array("\r", "\n", "\t"); // carriage return, newline, tab
foreach($filelayout as $key => $value) {
$thetext = $active_row[$key];
// remove carriage returns, newlines, and tabs - needs review
$thetext = str_replace($problem_chars,' ',$thetext);
// encapsulate data in quotes, and escape embedded quotes in data
$dataRow .= '"'.str_replace('"','""',$thetext).'"'.$csv_delimiter;
}
// Remove trailing tab, then append the end-of-line
$dataRow = rtrim($dataRow,$csv_delimiter)."\n";
fwrite($fp, $dataRow); // write 1 line of csv data (this can be slow...)
$ep_export_count++;
$active_options_id = $row['v_options_id'];
$active_language_id = $row['v_language_id'];
$l_id = $row['v_language_id'];
$active_row['v_products_options_name_'.$l_id] = $row['v_products_options_name'];
$active_row['v_products_options_values_name_'.$l_id] = $row['v_products_options_values_name'];
$active_row['v_products_options_type'] = $row['v_products_options_type'];
continue; // loop - for more products_options_values_name on same v_products_id/v_options_id combo
}
} else { // new combo or different product or first time through while-loop
if ($active_row['v_products_model'] <> $last_products_id) {
// Clean the texts that could break CSV file formatting
$dataRow = '';
$problem_chars = array("\r", "\n", "\t"); // carriage return, newline, tab
foreach($filelayout as $key => $value) {
$thetext = $active_row[$key];
// remove carriage returns, newlines, and tabs - needs review
$thetext = str_replace($problem_chars,' ',$thetext);
// encapsulate data in quotes, and escape embedded quotes in data
$dataRow .= '"'.str_replace('"','""',$thetext).'"'.$csv_delimiter;
}
// Remove trailing tab, then append the end-of-line
$dataRow = rtrim($dataRow,$csv_delimiter)."\n";
fwrite($fp, $dataRow); // write 1 line of csv data (this can be slow...)
$ep_export_count++;
$last_products_id = $active_row['v_products_model'];
}
// get current row of data
$active_products_id = $row['v_products_id'];
$active_options_id = $row['v_options_id'];
$active_language_id = $row['v_language_id'];
$active_row['v_products_model'] = $row['v_products_model'];
$active_row['v_products_options_type'] = $row['v_products_options_type'];
$l_id = $row['v_language_id'];
$active_row['v_products_options_name_'.$l_id] = $row['v_products_options_name'];
$active_row['v_products_options_values_name_'.$l_id] = $row['v_products_options_values_name'];
} // end of special case 'attrib_basic'
Bookmarks