not good, is there anyway to add an extra field call Item Condition to ep?
not good, is there anyway to add an extra field call Item Condition to ep?
not that I would even think about tackling, no. However, the folks at apsona.com would probably agree to add that (for a fee) into their store manager - It's much better than ezpopulate for working with the database. pm me if you want more info
Hi Delia, Thank you for all your hard work. I am having trouble getting the link to display on the product page. The fields are in the admin area to add the additional files and links. After I upload the file it is visible on the next admin screen. However it is not called on the rendered page. Any thoughts?
Thanks again for your hard work.
George
Check to be sure that you put the template in the right place. They are in a folder called your template so if you just uploaded the includes folder, they won't show up.
Delia, Thank you for the quick reply. However, I am still having touble getting the extra file to appear on the produce pages.
I have all th files in their proper directories (at least I think so). Template file is in my custom template area.
I can see the section to add extra files on the product attributes page. I also logged into PHP MyAdmin and can see the new table set up for: product_extra_fields.
I can add/upload files from admin and the colored bar at the top of the admin page tells me the files successfully loaded.
However, the file link does not appear.
Inside the new extra files section on the tpl_product_info_display.php there is a div area labeled "files."
When I look at the source code from the rendered page, this area is totally empty.
Here is a link to the page: http://www.trudysdresses.com/index.p...roducts_id=199
Any thoughts as what I am doing wrong?
Thanks again for your assistance.
George
Did you change the permissions on the files folder to allow upload?
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:
in collect_info:Code: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
Code:// <?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
I've never coded one for more than one language and I'm not an advanced programmer. Not only that but I don't even have time to look at that right now. Sorry!
I understand you
but bit by bit you can do ... if there are others who want to make their contribution.
you agree Delia!
i have insert language_id on database image in attachment...
and first mod collect_info to read extra_field and language_id:
thank you and allCode:<?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?> <br/> <br/></td> </tr> <tr> <td class="main" valign="top" ><?php echo TEXT_PRODUCTS_EXTRA_TEXT_FIELD . ' '; ?></td> <td colspan="2"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" width="25" valign="top"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <td class="main" width="100%"><?php echo zen_draw_textarea_field('extra field[' . $languages[$i]['id'] . ']', 'soft', '100%', '30', stripslashes($pInfo->extra_field)); zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('extra_field',$pInfo->extra_field, 'class="noEditor"') ?> </td> </tr> </table></td> </tr> <tr> <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><?php 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[' . $languages[$i]['id'] . ']', $pInfo->video_title) . zen_draw_hidden_field('previous_video', $pInfo->video). ' '.$pInfo->video; ?> </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 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[' . $languages[$i]['id'] . ']', $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 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[' . $languages[$i]['id'] . ']', $pInfo->file_2_title, $languages[$i]['id']) . zen_draw_hidden_field('previous_file_2', $pInfo->file_2, $languages[$i]['id']).' '.$pInfo->file_2; ?></td> </tr> <tr> <td class="main"><?php 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[' . $languages[$i]['id'] . ']', $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 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[' . $languages[$i]['id'] . ']', $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 // ?>
Update sql
Code:-- SQL for product extra fields -- Delia Wilson Lunsford -- Table structure for table `product_extra_fields` -- DROP TABLE IF EXISTS `product_extra_fields`; CREATE TABLE `product_extra_fields` ( `products_id` int(11) NOT NULL default '0', `language_id` int(11) NOT NULL default '0', `extra_field` text default '', `file_1` varchar(50) default NULL, `file_2` varchar(50) default NULL, `file_3` varchar(50) default NULL, `file_4` varchar(50) default NULL, `file_1_title` varchar(100) default NULL, `file_2_title` varchar(100) default NULL, `file_3_title` varchar(100) default NULL, `file_4_title` varchar(100) default NULL, `video` varchar(150) default NULL, `video_title` varchar(50) default NULL, `height` smallint(6) default NULL, `width` smallint(6) default NULL, PRIMARY KEY (`products_id`,`language_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `product_extra_fields` (`products_id`,`language_id`) SELECT `products_id`,`language_id` FROM `products_description` LEFT JOIN `product` USING (products_id) WHERE `products_type` = 1;
Bookmarks