New Zenner
- Join Date:
- Aug 2010
- Posts:
- 5
- Plugin Contributions:
- 0
Product Extra Fields for text, pdfs and flash
How long does it take for the new version of the plugin to show up on the Add-Ons Page? Are they usually this slow?
Thanks,
Bill
Views: 74,458
New Zenner
How long does it take for the new version of the plugin to show up on the Add-Ons Page? Are they usually this slow?
Thanks,
Bill
New Zenner
I finally got the checking if the video field in database is filled function done. Just need a little copy-paste so ill explain it to you guys. This adds a column to your prodcut listing showing if there is a flash file or not linked to the product.
You need to edit one of the excisting columns so i picked WEIGHT (so this function can be turned off or on when you disable WEIGHT at Admin->Product Listing)
Go to includes/modules/product_listing.php and then go to case 'PRODUCT_LIST_WEIGHT':
Delete the whole code within the case 'PRODUCT_LIST_WEIGHT': and the break; tag. Then add the following code:
$sql5 = "select * from " . TABLE_PRODUCT_EXTRA_FIELDS . "
where products_id = '" . $listing->fields['products_id'] . "'";
$files = $db->Execute($sql5);
$products_video = $files->fields['video'];
if (!empty($products_video))
{
$lc_text = 'This product has a flash file';
} else {
$lc_text = '';
}
This is a quick solution and i havent tested it fully yet, but it seems to work perfect. Good luck
Example:
http://alturl.com/in5vr
(check the column to the left named Movie)
New Zenner
Hi
I seem to almost have this working with the latest zen cart (1.3.9h) but not quite ....
When I go to look at one of the files, I get the following error message:
*Forbidden
You don't have permission to access /product_extra_files/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.*
Any idea what I need to do? I have changed the permissions ... and uploaded the document (a pdf) but cannot get it to open.
Arrrgghhh ... so close and yet so far. When I hover over the link, it shows the folder but not the particular file ...
Any help, gratefully received ...
Gillian
Totally Zenned
You shouldn't be able to view that folder in a browser - only thru ftp.
If the file itself isn't showing in the link, then something isn't working.
At this point, I'll send the newest version via email since it hasn't been added to this site. Obviously, whoever is in charge is on vacation.
Just PM me with your email address.
Totally Zenned
The newest version for 1.3.9h is up in the contributions finally:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1331
New Zenner
Hi Delia
I have gone through the new files and merged the changes to my Zen Cart. However, I still cannot get it to work entirely. Attached is a screen shot of what is showing.
The top section are some fields I altered using product_weight as a starting point. Most of those work (except one which inexplicably will work if I populate it from the database but not from the admin pages).
Below are your extra fields. The first is a Youtube video but all I get is text. The other documents are pdf but when I go to click on them I get the following error message ...
*Forbidden
You don't have permission to access /product_extra_files/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.*
Any ideas what I am doing wrong?
Many thanks.
Gillian
Totally Zenned
I would guess you are on zen cart version 1.3.9g - upgrade to h, the problems have been fixed.
New Zenner
Hi Delia
No, I have already upgraded to h ...
Gillian
New Zenner
Hi
I have compared all files and ensured that I have everything updated correctly (using 1.3.9h and product_extra_fields ver. 5)
Slowly getting closer but still not got it working ...
Now when I add a file (e.g. Redwood.pdf), I can see the file in the link ... See the attached jpg. At the top of the attachment you can see it shows that the pdf has been successfully added and at the bottom it shows the location of the file when I hover over the link ...
For some reason, it is showing the product_extra_fields folder as being in the Admin folder. I had put it into the main folder ... So that is the first problem ....
Next, when I update the product, and then hover over the link, it no longer shows the document, nor does it show it as being in the ADMIN folder ... so there is something going wrong there.
Also, when I go to the store, the file is not showing up ... still just going to the folder and not the file itself.
Any ideas?
Gillian
New Zenner
Totally Zenned
I'm going to install this on a site to see if I can get it to work out of the box for me. However, I'm about to leave for vacation so I may not get back about this right away.
New Zenner
Hi Delia
Much appreciated. I am really trying to make this work by following all the instructions carefully. However, this is still stumping me ...
Any help would be gratefully received.
Gillian
New Zenner
Thanks for this post. I have been having the same problem.
When I look in the Database table I see that the entry of file_1_title has been written no probs. But the file name hasn't, the file_1 field is still blank. When I manually enter the file-name the links perform as expected.
Unfortunately I am not sure enough with php scripting to debug what the error for me might be...
Also any help appreciated.
Totally Zenned
I will be glad to use someone's site to install this package so that I can see what's happening. Contact me via pm.
New Zenner
I have the same problem using v1.3.9h...the links are created and the documents are uploaded. The problem is the store links to the folder but the filename is ommitted from the link.
New Zenner
I have installed this wonderful mod on 1.3.9h. After importing the fields for the existing products the links show up on the product page as expected. So far so good.
But when I go to the admin there is nothing to see. No new (sub) product type. No extra fields on the edit product pages.
I have checked over and over if i have uploaded all files but everything is there.
Am I overlooking something? Please help.
Totally Zenned
FransDo:
I have installed this wonderful mod on 1.3.9h. After importing the fields for the existing products the links show up on the product page as expected. So far so good.
But when I go to the admin there is nothing to see. No new (sub) product type. No extra fields on the edit product pages.
I have checked over and over if i have uploaded all files but everything is there.
Am I overlooking something? Please help.
You must not have uploaded the changed files. Check the file names in the package and then check to see if the files on the site have changed dates - the date you uploaded the files in admin.
New Zenner
Hi Delia,
So right you are!
Indeed one of the files appeared to be empty.
It is working great now.
Many thanks .
New Zenner
Hi,
I have just dowloaded your latest version posted just a couple of days ago. The problem is the same - I can see the "files for download" on produc preview page, but not on me web-page.:(
Could you please help out?
Totally Zenned
Are you sure that you are using the version 1.5.1? The changed file is admin/includes/modules/product/preview_info.php. I suggest uploading it separately to make sure.
Starting at line 192, I added these lines back in:
// extra fields mod
echo zen_draw_hidden_field('extra_field' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));
echo zen_draw_hidden_field('file_1', stripslashes($products_file_1_name));
echo zen_draw_hidden_field('file_2', stripslashes($products_file_2_name));
echo zen_draw_hidden_field('file_3', stripslashes($products_file_3_name));
echo zen_draw_hidden_field('file_4', stripslashes($products_file_4_name));
echo zen_draw_hidden_field('video', stripslashes($products_video_name));
//eof extra field mod
Fields marked required must be completed.
Tell staff why this post should be reviewed.