Hi Delia, Thank you for all your hard work.
Hello everyone, I would like to convert this form into a multi-language module, but I'm not a programmer.
I wonder if you helpme, because this module is perfect for me, but I have the problem that the files that the user must download: brochures, manuals, accessories ... are different depending on the language ...
I started to enter into the database and change language_id functios_product_extra_field:
function zen_copy_products_extra_fields($products_id_from, $products_id_to) {
global $db;
// get extra fields to copy from
$products_copy_from= $db->Execute("select * from " . TABLE_PRODUCT_EXTRA_FIELDS . " where products_id='" . $products_id_from . "'" );
// New attribute - insert it
$db->Execute("insert into " . TABLE_PRODUCT_EXTRA_FIELDS . " (products_id, language_id, extra_field, file_1, file_2, file_3, file_4, file_1_title, file_2_title, file_3_title, file_4_title, video, video_title, height, width,) values ('" . $products_id_to . "',
'" . $products_copy_from->fields['language_id'] . "',
'" . $products_copy_from->fields['extra_field'] . "',
'" . $products_copy_from->fields['file_1'] . "',
'" . $products_copy_from->fields['file_2'] . "',
'" . $products_copy_from->fields['file_3'] . "',
'" . $products_copy_from->fields['file_4'] . "',
'" . $products_copy_from->fields['file_1_title'] . "',
'" . $products_copy_from->fields['file_2_title'] . "',
'" . $products_copy_from->fields['file_3_title'] . "',
'" . $products_copy_from->fields['file_4_title'] . "',
'" . $products_copy_from->fields['video'] . "',
'" . $products_copy_from->fields['video_title'] . "',
'" . $products_copy_from->fields['height'] . "',
'" . $products_copy_from->fields['width'] . "')");
} // eof: zen_copy_extra_fields
in collect_info:
// <?php // eof extra fields mod // ?>-->
<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_EXTRA_TEXT_FIELD; ?></td>
<td class="main"><?php echo zen_draw_textarea_field('extra field', 'soft', '100%', '30', stripslashes($pInfo->extra_field, $languages[$i]['id']));
zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('extra_field',$pInfo->extra_field, $languages[$i]['id'], 'class="noEditor"') ?></td>
</tr>
<tr>
<td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td><?php if ($i == 0) echo TEXT_PRODUCTS_VIDEO; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_file_field('video') . ' '. TEXT_VIDEO_FILE_DESCRIPTION . ' ' . zen_draw_input_field('video_title', $pInfo->video_title, $languages[$i]['id']) . zen_draw_hidden_field('previous_video', $pInfo->video, $languages[$i]['id']). ' '.$pInfo->video, $languages[$i]['id']; ?>
</td>
</tr>
<tr>
<td></td>
<td class="main" ><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . TEXT_VIDEO_FILE_WIDTH .' '. zen_draw_input_field('width', $pInfo->width, $languages[$i]['id']), $pInfo->width .TEXT_VIDEO_FILE_HEIGHT. ' '. zen_draw_input_field('height', $pInfo->height, $languages[$i]['id']); ?>
</td>
</tr>
<tr>
<td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION_FILE; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_file_field('file_1') . ' '. TEXT_PRODUCTS_FILE_DESCRIPTION . ' ' . zen_draw_input_field('file_1_title', $pInfo->file_1_title, $languages[$i]['id']) . zen_draw_hidden_field('previous_file_1', $pInfo->file_1, $languages[$i]['id']).' '.$pInfo->file_1; ?></td>
</tr>
<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION_FILE; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_file_field('file_2') . ' '. TEXT_PRODUCTS_FILE_DESCRIPTION . ' ' . zen_draw_input_field('file_2_title', $pInfo->file_2_title) . zen_draw_hidden_field('previous_file_2', $pInfo->file_2, $languages[$i]['id']).' '.$pInfo->file_2; ?></td>
</tr>
<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION_FILE; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_file_field('file_3') . ' '. TEXT_PRODUCTS_FILE_DESCRIPTION . ' ' . zen_draw_input_field('file_3_title', $pInfo->file_3_title) . zen_draw_hidden_field('previous_file_3', $pInfo->file_3, $languages[$i]['id']).' '.$pInfo->file_3; ?></td>
</tr>
<tr>
<td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION_FILE; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_file_field('file_4') . ' '. TEXT_PRODUCTS_FILE_DESCRIPTION . ' ' . zen_draw_input_field('file_4_title', $pInfo->file_4_title) . zen_draw_hidden_field('previous_file_4', $pInfo->file_4, $languages[$i]['id']).' '.$pInfo->file_4 ; ?></td>
</tr>
<?php
}
?>
<?php // eof extra fields mod // ?>
thank you