Very useful mod for product PDF brochures :)
The magic spell you cast in Phpmyadmin if you have existing products when you intall this mod:
INSERT INTO product_extra_fields (products_id) SELECT products_id FROM products;
Much easier than messing about with excel as suggested earlier in this thread.
Also, I prefer to have my product PDF's kept with my images, so if you do the following the extra files will be uploaded to whatever subdirectory of the images folder you have selected in the "Upload to directory" dropdown on the edit product page:
in new_product_preview.php
if ($_POST['file_1_title'] != '') {
$products_file_1 = new upload('file_1');
$products_file_1->set_destination(DIR_FS_CATALOG_IMAGES . $_POST['img_dir']);
if ($products_file_1->parse() && $products_file_1->save(true)) {
$products_file_1_name = $_POST['img_dir'] . $products_file_1->filename;
} else {
$products_file_1_name = (isset($_POST['previous_file_1']) ? $_POST['previous_file_1'] : '');
}
}
in preview_info.php
<?php echo "<a href='images/" . $products_file_1_name . "'>" . $pInfo->file_1_title . "</a>"; ?>
in main_template_vars_product_type.php
if (!empty($products_file_1_title)) $products_file_1_link = '<a href="' . "images/" . $products_file_1 . '">'. $products_file_1_title . '</a>';
Obviously modify the file2, 3, & 4 bits in the same way :)