jill8026
your sites seem to achieve what I am after. would you care to share or point me in the right direction. Very much appreciate the help.
Thank you
Printable View
jill8026
your sites seem to achieve what I am after. would you care to share or point me in the right direction. Very much appreciate the help.
Thank you
You can use that extra text field anyway you want. It still will just list the info on the product page.
I created that field for youtube videos initially. Cut and paste the code into there. But then there is only one field for that kind of use in the mod. The request that lead me to doing this mod was more about attaching pdfs and embedding flash that anything so I only put in one extra generic field. I will add more in the next version - whenever that should be.
You would have to alter the search function - /includes/modules/pages/advanced_search_result/ header_php.php and then add code for the age searching. Not a small thing.
There are some instructions in this thread: http://www.zen-cart.com/forum/showthread.php?t=131143
delia,
thank you for the heads up. Not really a php programmer so it is going to keep me busy for a while. ;-)
I found some issue and i have a temporary workaround
ZC 1.3.9h
If you link a product to a different category and you decide to delete it form being linked you will not be able to edit the product anymore in the master category.
you will see it in the admin, but when you click to edit the product, no information will be viable.
in the error you will get something like this
[07-Jul-2011 09:50:04] PHP Warning: reset() expects parameter 1 to be array, null given in /home/xxxx/public_html/admin/includes/classes/object_info.php on line 29
[07-Jul-2011 09:50:04] PHP Warning: Variable passed to each() is not an array or object in /home/xxxx/public_html/admin/includes/classes/object_info.php on line 30
because the admin/includes/module/delete_product_confirm.php will delete the information from both the MASTER and the LINK thus breaking the array.
:clap:WORKAROUND #1: Do not override the
admin/includes/module/delete_product_confirm.php
nothing bad can happen, only the additional fields will stay in the DB
BTW: it is good practices not to delete any products. disable them or move them when they are no more needed, saving you the product ID
:no:WORKAROUND #2 NOT RECOMMENDED for people like you..., remove the product from being linked via phpMYadmin
find the product to category table and delete the record of the link
eek, no one has reported that before. Has anyone else run into this? That sounds more like a bug introduced from something else and not this mod but it's possible it's my bug.
Hi Della,
After installing this patch I am getting the following SQL error when I try to import into DB:
An SQL error has occured. Please check your input data for tabs within fields and delete these. If this error continues, please forward your error log to the Easy Populate maintainer
Your help is appreciated
Did you use sql patch facility or the easy populate import? I've never seen that message about the easy populate maintainer so you may have some mods installed (not the normal easy populate mod) that are creating the problem.
:(Actually easypopulate works fine before instaslling product extrafield
Sorry, I thought you meant the mod didn't work.
Easy populate can't import or export these extra fields so if you trying to do that you are out of luck. Easy populate only works on the default database tables. Any changes will stop easy populate from working.
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;
update whit my work
Hello Delia , I'm almost done, I'm stuck here:
can you help meCode:if ($_POST['file_1_title'] != '') {
$products_file_1 = new upload('file_1');
$products_file_1->set_destination(DIR_FS_PRODUCT_EXTRA);
if ($products_file_1->parse() && $products_file_1->save(true)) {
$products_file_1_name = $products_file_1->filename;
} else {
$products_file_1_name = (isset($_POST['previous_file_1']) ? $_POST['previous_file_1'] : '');
}
}
When trying to add an swf file and hit preview i get this error message, the file i am adding is a good swf file and plays on my computer.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
well, it says to contact your server admin, ie, your hosting company. There's several possibilities for the problem but I would talk to your support first.
I'm on local right now before i go live
then that's probably why. Flash behaves differently on your machine than on the web.
Is anyone in the process of updating this add-on to work in v1.5.0?
I haven't had time yet. Nor have I installed 1.5 for anyone. I really want to wait for both for a while to make sure there aren't any changes. 1.3.9 had so many changes that I spent a lot of unpaid time upgrading and reupgrading carts and mods.
All it takes is doing a file compare. There are several files that have been changed and I do not know how crucial they are.
I do have the add on installed and sort of working, i can display the extra field on the products info page. Of course the add on doesn't appear in the admin which is fine for now but one thing i noticed is that when i save the product with the extra field filled out the product does show this info but when i go back in edit the product the extra field is empty and when i save the product it will wipe out the extra info. I'll be eagerly waitng for an update. Also would be nice if i could get this extra field into the tabs but that's a different topic.
I am using 1.3.9h. I installed all of the files. My database starts with zen_. I did not apply sql patch. Not sure how. Am I also missing some type of activation step?
Thank you.
I failed to mention in the previous post....I don't see a change. I don't see a new extra field. No error either.
Thank you for answering!
No. I did not apply the sql patch. Where is it and its' directions? I want to use the new spot for a link, user name and password for each product (courses all with online access/some also with hard-copy materials sent). Does this sound reasonable?
Have you ever installed a mod before?
This mod has specific fields for specific reasons - one text field and ways to upload pdf files or show flash. So unless it's altered it sounds like it won't work for you.
Thank you for the quick response!
Just winmerge'd this mod with zencartV1.50, it works fine after applied of the differences to zencartV1.50 .
Thanks Delia for your contribution:clap:
I also have done it - just haven't had time to package and upload to the site.
Hello and thank you for this plugin! When might we be able to get the updated plugin for Zencart v1.5.
Thank you
When I install this plugin, Products edit page in admin will show nothing ,I found this bug because using easy populate upload data.
admin/includes/modules/product/collect_info.phpI try to delete this statement.and then the products edit page return to normal,but Product Extra Fields don't work.please tell me what shall I do to satisfy both sidesCode:and p.products_id = pe.products_id
Did you run the sql for the database?
Instead of showing a link to the swf, then pop up of the flash movie.
I sucessfully hardcoded in the Extra text field to have direct play for the flash as below:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="240"
height="320">
<param name="movie" value="http://domain_name/product_extra_files/flash.swf">
<param name="quality" value="high">
<embed src="http://domainname/product_extra_files/flash.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="240"
height="320"></embed>
</object>
Demo is here:
http://my.gobiztunnel.com/index.php?...roducts_id=362
Hopefully, this will be useful for sharing here. Thanks.
Hi Delia
Just wanted to say thanks for this mod - I had been going down the route of altering products_description and the like and then I realised how short term that was going to be.
I do seem to have one small problem.
If I have no data in the field (for instance after setting up the mod or inserting a new product) then the More Information doesn't appear - which is fine, just what I want.
But when I delete the information from the field, two strange things happen.
First the preview page shows raw html instead of rich text
and secondly and more of a pain the More Information header appears on the product with just one bullet underneath it.
Any ideas?
An example is http://www.equivivre-shop.co.uk/inde...products_id=55
(Yes I've hacked the name of the field to Elizabeth Says )
Actually, I've sorted the second part now - there must have been a little bit of formatting left in the field.
However, I am just seeing raw html on the preview page and I don't understand why - it only affects the original product description - not your extra fields but I didn't merge the files, I used your file in it's entirety.
I am also getting Error: Destination does not exist product_extra_files after I try and load a file. The directory does exist - but where is it looking for it - my directory exists in the store root - is that correct? Or should it be somewhere else?
None of that makes any sense - the raw html certainly shouldn't show - but do you mean only a bit of it showing or the whole thing? The preview is certainly not the important thing in this. If you confirm the changes, does the actual product page look okay?
If you put the product_extra_files in the root directory - there would be no problem but if your store is not in the root directory and is in a folder instead, then I made a goof. So let me know which is the case.
Sorry Delia
Forgot to check the box that says 'tell me when there's a reply' or whatever.
It's the preview box that it's doing it in - and yes I agree it doesn't make any sense, But yes the text is perfectly formatted on the product page. I'm not fighting it - it just seems bizarre and I can't see a reason for it.
Yes this particular website is in a subfolder of the root. I have another website which runs in root. Having said that, I may well want to use this mod on that site as well and I can see no reason why they shouldn't share the same resources. I'll get back to you if it solves the problem
I'm actually looking at writing some code which will split your fields up on to separate tabs - I fancy having the standard description as the first tab, your large text field as the second and the links on a third - is there anything I need to look out for in terms of potential 'gotcha's' if I do?
This just isn't behaving well for me Delia. I can't seem to get the preview page right and it doesn't seem to make a difference where I put the directory, it still says it doesn't exist.
If I go into the db and add the name of the file manually, it then finds it OK
Is there anything I can check in the files to make sure I have the latest version? I can't believe I have anything different than your thousands of happy customers but I am using your files as they come out of the packet, there are no mods mixed in with them
John
@Delia
Do youthink it is possible to have instead of text (as extra description link) but an image like in this image:Attachment 11143 and the by clicking the image it takes you to the extra description page or pdf?
Do you think it is possible to tweak your awesome plugin to have an iframe to pop up once you click instead of going on a new page?
Sort of like this: Attachment 11144
John, sorry, I missed getting any notices about your reply in July. Don't know what to tell you about your problems.
Alepia, anything changes like are certainly possible. The original reason for the mod was a request from a customer who wanted to be able to upload pdfs more than anything else. When I've installed it for clients, I changed it for all sorts of purposes.
This is a nice and mod, but I can not find any instructions how to uninstall it.
Any help is greatly appreciated.
You just have to upload the same files from a default installation. The database changes do not affect the default cart and leaving the table that's been created is not a big deal.
Alright. Thank you so much.
Hello, Deila:
I just installed the Extra Field add-on on my 1.5 zencart.
There is an Extra Field in admin area, but none appears in online catalog.
Would you mind show me the right direction?
I installed sql patch and uploaded all files.
Thank you.
oh, found a mistake - template was not named properly.
thanks.
Did you notice that this mod is for 1.3.9? I have not yet uploaded the updated version for 1.5.
Hi Delia,
Unfortunately I tried to install the plugin for ZenCart 1.3.8 before I realized there was a version for 1.3.9. I am running 1.3.9.
Now when I try to update a product I get the following error:
How can I fix this??Quote:
1146 Table 'frogzski_znc1.znc_product_extra_description_extra' doesn't exist
in:
[update znc_product_extra_description_extra set products_code = null, file_1 = null, file_2 = null, file_3 = null, file_4 = null, file_1_title = null, file_2_title = null, file_3_title = null, file_4_title = null where products_id = '163']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Thanks!
The same as any mod - go back thru and reupload the files in the mod from a fresh version of your old vulnerable cart - time to upgrade!
Thanks for responding!
Ok, still getting the same error. Any suggestions?
You haven't replaced all the files. Still have something from the mod installed.
I restored all of my site files, except the database, to a date well before I tried installing this. Do I need to change/fix a table on the database or something?
no, the mod adds a table and changes none so you have missed a file somewhere.
Thanks for the mod Delia... I have an issue i am hoping you can help me with.
Everything is working...
-Got fields in admin
-Even the file is uploaded
-The old files (existing) work in the catalog (new files cannot file the filename)
-No errors showing even in debug
-text is working, anchor, descriptions etc
However, it will not write the filename for the file upload to the database. I have checked the install several times and even installed it on a test site and it does not populate the database field for files... text yes, files not so much... they are in fact however being uploaded.
Zen Cart 1.5.1
PHP 5.3.21
MySQL 5.1.68-cll
any ideas?
Without working with it myself, I can't answer that for sure. But I could see that there's a php problem if the code I used wasn't allowed on your server. It would not give an error; it would just not work. But as I'm not a php guru, I really can't be more specific.
I have not tested that part on that level of php but have heard no complaints so far. There were very few changes between the 1.3.9h files and the 1.5x files themselves so I would assume it normally works.
I actually had to change the ability to include the url part in the PHP config, but got it going now
Great! I was in the area of the right answer!
Yes ma'am! Thanks again
Hi, I'm in the process of building a new site based on 1.5.1 and I could use more text fields but not video, links or PDF's. I'm new to ZenCart and not a coder. It's a wine site and I've set up categories for things like vintage, country, region, style, size, and a few more for search purposes. Ideally, I'd love to have the category info put into these fields. Minimally, I need all this same information to appear in the product descriptions and would like to add all your additional fields as text even if I manually or through EasyPopulate, fill out the fields. Any assistance would be appreciated.
It's definitely possible to do that but it does require php skills. The database fields are all text fields so you just have to change the admin for input - and that's really what the mod does - so it is a fair amount of work that I suspect you aren't capable of doing.
Even writing up any instructions would be a long, drawn out thing.
Thank you for the response. I figured out how to do what I need using read-only attributes. Although I haven't tried it yet, I'm under the impression that EasyPolulate will allow the uploading of attributes.
I have to recommend apsona store manager over easy populate. Just saying.... apsona.com
Hi Delia
I have installed your plugin to my 1.5.1 development environment and have it working at least part of the way. It is worth pointing out, I am not a Zen Guru or PHP expert.
I can see the four fields when I add a product and I can see the content of those fields in your SQL table alongside the product ID I copied from the Zen Products table. So far, so good!
When I preview the product I can see Text which says files to download, and below that I see (in blue text) the title of
the file I entered in the field. However, if I click the blue text I get an error as shown here and when I view the page as a user I see this and this is what I can see in your SQL table
The product 'Seared Halibut' is created as a 'Product_general' class rather than a new class as previously suggested by another user.
I have edited my custom tpl_product_info.php as mentioned elsewhere on your site but still nothing shows in the user view also I have edited the downloads and product_extra_files folders to 777 for test purposes.
I hope you are able to understand my issue.
Many thanks in advance,
Bob
The first error message is saying that the files are not where the script is expecting to find them. The mod normally references the folder in the store root but for some reason yours is looking for the folder inside the download folder. Did you change anything beyond the instructions?
I will have to dig deep in the actual code itself to find out where and what controls this but I've never seen this go wrong before.
No I have'nt changed anything apart from what the previous advisor suggested, that was create product types of PDF and DOC and assign them to the plugin php.
I have now moved the product_extra_files folder from within the downloads folder to the root of the cart and am getting a message
Error: Destination does not exist I:/xampp/htdocs/seafoodexpress/download/products_extra_files when creating a product. Yet I can see in /admin/includes/modules/new_product_preview.php the code is as follows which clearly calls for the file to be in the root.
I think it would be better if i UNWIND the mod, and start again from step 1 what do you think?PHP Code:
if ($_POST['file_1_title'] != '') {
$products_file_1 = new upload('file_1');
$products_file_1->set_destination(DIR_FS_PRODUCT_EXTRA);
if ($products_file_1->parse() && $products_file_1->save(true)) {
$products_file_1_name = $products_file_1->filename;
} else {
$products_file_1_name = (isset($_POST['previous_file_1']) ? $_POST['previous_file_1'] : '');
}
}
if ($_POST['file_2_title'] != '') {
$products_file_2 = new upload('file_2');
$products_file_2->set_destination(DIR_FS_PRODUCT_EXTRA);
if ($products_file_2->parse() && $products_file_2->save(true)) {
$products_file_2_name = $products_file_2->filename;
} else {
$products_file_2_name = (isset($_POST['previous_file_2']) ? $_POST['previous_file_2'] : '');
}
}
if ($_POST['file_3_title'] != '') {
$products_file_3 = new upload('file_3');
$products_file_3->set_destination(DIR_FS_PRODUCT_EXTRA);
if ($products_file_3->parse() && $products_file_3->save(true)) {
$products_file_3_name = $products_file_3->filename;
} else {
$products_file_3_name = (isset($_POST['previous_file_3']) ? $_POST['previous_file_3'] : '');
}
}
if ($_POST['file_4_title'] != '') {
$products_file_4 = new upload('file_4');
$products_file_4->set_destination(DIR_FS_PRODUCT_EXTRA);
if ($products_file_4->parse() && $products_file_4->save(true)) {
$products_file_4_name = $products_file_4->filename;
} else {
$products_file_4_name = (isset($_POST['previous_file_4']) ? $_POST['previous_file_4'] : '');
}
}
if ($_POST['video_title'] != '') {
$products_video = new upload('video');
$products_video->set_destination(DIR_FS_PRODUCT_EXTRA);;
if ($products_video->parse() && $products_video->save(true)) {
$products_video_name = $products_video->filename;
} else {
$products_video_name = (isset($_POST['previous_video']) ? $_POST['previous_video'] : '');
}
}
Bob
I:/xampp/htdocs/seafoodexpress/download/products_extra_files
That line says its looking for the products_extra_files folder inside a document folder of download in the root. Do you have zen cart installed in a folder named download? If not, I would be inclined to look at your config files for a reason that it's not looking in the right place.
Hi Delia,
I decided to go back to basics! :blush: and wiped the plugin, restored my previous database and start over.
This time I renamed all the files being replaced as filename.php.keep before copying your files over. I created the new datatable and copied my products_id from products to the new table using my SQL statement (oh I had to change type=MyISAM to ENGINE=MyISAM) to get it to work.
I then recreated the product and added the PDF to file1 and previewed and got the same error ref I/xampp...../downloads/product_extra_files!!
I then went through each of the config file as you suggested and found in includes/modules/pages/product_extra_definitions_info/main_template_vars_product_type.php the following code which seems to indicate that the folder products_extra_files should be in /downloads rather than root or am I reading this wrong?
Kind regards
Bob
/**
* Retrieve relevant data from relational tables, for the current products_id:
*/
$tpl_page_body = '/tpl_product_info_display.php';
$sql = "select * from " . TABLE_PRODUCT_EXTRA_DESCRIPTION_EXTRA . "
where products_id = '" . (int)$_GET['products_id'] . "'";
$files = $db->Execute($sql);
/*
* extract info from queries for use as template-variables:
*/
$products_code = $files->fields['products_code'];
$products_file_1_title = $files->fields['file_1_title'];
$products_file_2_title = $files->fields['file_2_title'];
$products_file_3_title = $files->fields['file_3_title'];
$products_file_4_title = $files->fields['file_4_title'];
$products_file_1 = $files->fields['file_1'];
$products_file_2 = $files->fields['file_2'];
$products_file_3 = $files->fields['file_3'];
$products_file_4 = $files->fields['file_4'];
if (!empty($products_code)) $products_code = TEXT_PRODUCTS_CODE." ".$products_code;
if (!empty($products_file_1_title)) $products_file_1_link = '<a href="' . "/download/products_extra_files/" . $products_file_1 . '">'. $products_file_1_title . '</a>';
if (!empty($products_file_2_title)) $products_file_2_link = '<a href="' . "/download/products_extra_files/" . $products_file_2 . '">'. $products_file_2_title . '</a>';
if (!empty($products_file_3_title)) $products_file_3_link = '<a href="' . "/download/products_extra_files/" . $products_file_3 . '">'. $products_file_3_title . '</a>';
if (!empty($products_file_4_title)) $products_file_4_link = '<a href="' . "/download/products_extra_files/" . $products_file_4 . '">'. $products_file_4_title . '</a>';
You are right. Crap, I do not have my files set up that way. Are you sure you downloaded the most recent version? What zen cart version are you on so that I can check the correct files on my computer?
Hi Delia
:blush::blush::blush: OK now who hasn't got their head screwed on???
After giving up last night at 01.45 I decided to attack the problem again when I got back from work today.
All the Errors were MY errors and the confusion ALL MINE!:blush:
I orginally downloaded your 1.6 version for Zen 1.5.1 and then somehow installed Extra description files mod by aetas!!!!
Thus after deleting all of that, and then installing the CORRECT plugin everything now works fine. :D
Attachment 13814
In actuality, the plugin is simply brilliant and EXACTLY what I was looking for. One final question, is it possible to get rid of the add to cart button when product is free and when any of fields 1-4 are populated?
Thanks again for all your help and please excuse my absolute stupidity!
Kind regards from the UK
Bob
It can happen to anybody. Not to worry! Just glad you got it straightened out.
The add to cart button is always going to show - for good reason in case they have other products that aren't free. Everything usually still needs to added to the cart. If you only have free products then you can comment out the code - but you might as well, in that case, just turn the cart to show room mode instead. If you do have products for purchase then you are stuck with the add to cart unless....
Back to idea of having different product types and a lot of changes and configuration. So the answer is (don't shoot me), "it depends"!
Hello Thanks for work.
I use 1.5.1
I need this plugin only to add 3 fields of text, is it possible with this plugin?
I don't try to see video swf attached...
I try to read instructions but I didn't find any instructions, I upload all files and then run sql is true?
Last thing if I would to unistall can you say to me what sql command I have to run?
thanks in advance
:blush:
I need this plugin only to add 3 fields of text, is it possible with this plugin?
----Only one text field is provided specifically with this version.
I don't try to see video swf attached...
----Everything is provided that is necesary.
I try to read instructions but I didn't find any instructions, I upload all files and then run sql is true?
----Information in the readme.txt file
Last thing if I would to unistall can you say to me what sql command I have to run?
----Not provided but the install sql installs a new table so there's nothing to remove from the default zen cart tables.
thanks for fast reply ;-)
This contribution is a big help thanks!
Any way I can get the extra field to show as a column in the product list after clicking a category?
Cheers.
Hey,
I am using the add-on and its working great, I altered some code to allow it show a size guide on some of our products - now if you click on it the size guide will display in a lightbox popup - check it out! http://www.rockfrocks.com/50s-style-...w-detail-black
However, I now find that when we go into the product details page in the admin, the values in each of the extra field get wiped and appear as blank. This means that each time we update a product description, we have to add the details for product extra fields again. Has anybody else experienced this and is there a solution?
did you alter the admin code? I wouldn't think that you would have if you are just adding the lightbox feature. If you didn't then your edits are not at fault and something else is.
Hey, no I didnt actually. I just edited the product info page. I might be able to restore just the admin page from a previous version. That seems like such an obvious solution now but it never even crossed my mind! Thanks for the pointer!
Hi, Where is the install sql ? It does not appear to be in the zip file at the download here at the zen plugin section. I have uploaded all the files but now cannot access my product page in the admin.
Well, that's bizarre. I can't believe no one has noticed this before! Here's the sqlJust copy and paste that into your admin > tools > Install SQL patches.Code:DROP TABLE IF EXISTS `product_extra_fields`;
CREATE TABLE `product_extra_fields` (
`products_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`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `product_extra_fields` (`products_id`)
SELECT `products_id` FROM `products` where `products_type` = 1;
I'll put up the next version and be sure to include the sql. It will be different in the next version.
Thank you so much. It seems to be working fine. appreciate your work on this. I wish there were a way to just add fields where you want them to show up on the Product page. The Numinix module for that I just can't get to work but your uploaded and so far no errors. Great contrib. Thank you again.
I just uploaded version 2 of this mod updated to 1.5.4. I do not know when it will be available.
Now included are 2 more text fields. I also added in an htaccess file for the product_extra_fields folder that limits the types of files allowed and protects the folder (see instructions). I have included sql files for installation, deletion and upgrade this time!
I looked at adding these fields into the search but simply didn't get far enough along that path. I plan on it later.
Anyone grabbing the new files, please let me know immediately if you run into any problems.
Hi,
Thanks for the great mod. I am using it to show an advice centre in a sidebox. I have a problem though if anybody can help me? The sidebox was working fine until I put it in the same column as another sidebox, doing that causes the entire page layout to mess up.
I'm not very good with coding so I am thinking I have messed up the code in the sidebox template file.
Can anybody tell me how to put this code into a sidebox template file to make it work please?:
I am using the editable sidebox module as a template, so here is the template I need to insert it into:PHP Code:
<div class="files">
<?php if(isset($products_file_1_link) || isset($products_file_2_link) || isset($products_file_3_link) || isset($products_file_4_link) || isset($video_file_link) || isset($extra_field)) {
echo '<div class="filesHead">'.TEXT_PRODUCT_MORE_INFO.'</div><ul>';
}?>
<?php if($extra_field!='') {
echo '<li>'.$extra_field . '</li>';
} ?>
<?php if(isset($products_video_link)) {
echo '<li>'.$products_video_link . '</li>';
} ?>
<?php if(isset($products_file_1_link)) {
echo '<li>'.$products_file_1_link . '</li>';
} ?>
<?php if(isset($products_file_2_link)) {
echo '<li>'.$products_file_2_link . '</li>';
} ?>
<?php if(isset($products_file_3_link)) {
echo '<li>'.$products_file_3_link. '</li>';
} ?>
<?php if(isset($products_file_4_link)) {
echo '<li>'.$products_file_4_link;
}
if(isset($products_file_1_link) || isset($products_file_2_link) || isset($products_file_3_link) || isset($products_file_4_link) || isset($video_file_link) || isset($extra_field)) {
echo '</ul>';
}
?>
</div>
ThanksPHP Code:
<?php
/**
* editable sidebox - allows a sidebox editable with the define pages editor to be added to your site
*
* @package templateSystem
* @copyright 2007 Kuroi Web Design
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: blank_sidebox.php 2007-08-10 kuroi $
*/
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
// this is where the content that you have via the Admin is pulled in.
$content .= file_get_contents($define_sidebox);
$content .= '</div>';
?>
If it was working before you moved it then perhaps you need to look at the other sideboxes. Sounds like something is missing a div tag and I don't see that in the code you've posted.
Hi
Yeah, that's what I thought originally. So I turned off and on the sideboxes, including standard zen cart sideboxes, and it doesn't work with any of the sideboxes. I also had a look at the stylesheet to see if there are any problems there, but there is nothing amiss.
I know the sidebox templates follow a different format from what I have read, it doesn't just work by copying and pasting the product_info template code that you kindly provided, but I am having a hard time translating it into the sidebox template.
This is the code that I came up with:
But I have no idea if it is right, or has any errors? I just know that it breaks when I put the sidebox in the same column as any other sidebox.PHP Code:
<?php
/**
* editable sidebox - allows a sidebox editable with the define pages editor to be added to your site
*
* @package templateSystem
* @copyright 2007 Kuroi Web Design
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: blank_sidebox.php 2007-08-10 kuroi $
*/
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
$content = file_get_contents($define_sidebox);
$content .= '<div class="adbox">'.$extra_field .'</div>';
$content .= '<div class="adbox">' .$current_categories_description_sub .'</div>' ;
$content .= '<div class="adbox">'.$products_file_1_link . '</div>' ;
$content .= '<div class="adbox">'.$products_file_2_link . '</div>' ;
$content .= '<div class="adbox">'.$products_file_3_link . '</div>' ;
$content .= '<div class="adbox">'.$products_file_4_link . '</div>' ;
// this is where the content that you have via the Admin is pulled in.
$content .= '</div>';
?>
Thanks
So you have never gotten the sidebox itself working, just the code on the product info page? You don't want that sidebox showing on any other page so that also requires a bit of coding otherwise it will show a blank box on other pages.
If the sidebox was showing correctly then it would not need editing. If you'll put it back where it was working, I can take a look at the page.
Hi,
Thanks for the help, I have managed to get it working now :smile: You was right about the div tag, there was an extra closing div tag in the source code, so I deleted the last div tag in the editable sidebox module and it is now working on the test site.
Thanks again
I just sent my newest version for approval. You can now display these extra fields on a tab if you are using Tabbed Products Pro v.1.10. If you want the files before they are approved, pm me.
I don't see anything referring to the admin directory.
I renamed the admin directory to my admin folder name as well as the custom template. My admin was no longer accessible, and have now restored from backup.
ZC1.5.4
When you say that the admin was "no longer accessible", what symptoms were you seeing? Were there any debug-log files generated?