Hi all,
I´m just in the process to install the Super Download Shop and everything went smooth until now, when I try to group files together in the administration page I get an error telling me:
Warning: Invalid argument supplied for foreach() in .../Shop/admin/products_attributes.php on line 150
on my line 150 there is:
foreach($file_selected as $k => $file_name) {
if (tep_not_null($file_name)) {
$file_name = tep_db_prepare_input($file_name);
// check if file already in group
$file_check_query = tep_db_query("select * from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES . " where download_group_id = '" . (int)$filegroup_id . "' and download_group_filename = '" . $file_name . "'");
if (tep_db_num_rows($file_check_query) == 0) {
// check existing file and descriptions
$file_query = tep_db_query("select download_groups_file_id from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES . " where download_group_filename = '" . $file_name . "'");
if (tep_db_num_rows($file_query) > 0) {
$file_array = tep_db_fetch_array($file_query);
tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES . " (download_groups_file_id, download_group_id, download_group_filename) values ('" . (int)$file_array['download_groups_file_id'] . "', '" . (int)$filegroup_id . "', '" . tep_db_input($file_name) . "')");
} else {
tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES . " (download_group_id, download_group_filename) values ('" . (int)$filegroup_id . "', '" . tep_db_input($file_name) . "')");
$download_groups_file_id = tep_db_insert_id();
for ($i=0, $n=sizeof($languages); $i<$n; $i ++) {
$file_desc = tep_db_prepare_input(TEXT_TEMP_DESC . ' ' . $download_groups_file_id);
tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_TO_FILES . " (download_groups_file_id, language_id, download_group_file_description) values ('" . (int)$download_groups_file_id . "', '" . (int)$languages[$i]['id'] . "', '" . tep_db_input($file_desc) . "')");
}
}
}
Because I´m not used to all that programming language and just can compare and cut and paste I can´t go any further.... any help would greatly appreciatet. I think there might be another file that collides with this one...
Also I have the Paypal IPN module installed and not sure yet as how I can modify the checkout process as Alex studio mentioned it in his guide. If there is any discussion or post where I can get this modification from it would be cool.
Best regards - Christoph