Contribution: Product Extra Fields Mod
Version: 1.0
Updated: 5/17/2009
Designed for: Zencart 1.3.8 (not tested in any other version)
This mod is based on the work done by Mariusz Józala of
http://zencart.aetas.pl. His mod is called extra description files and is not to be confused with this one. I have cleaned up his code, made it more zen cart compatible and added the flash to it.
This mod creates one extra text field, 4 fields that are designed for pdf uploads and one field for a flash video with adjustable size.
There are changed files - note the use of override files for page templates that should go into your template directory. Do not upload the template directory without changing the folder name (your_template) in the package.
Included in this text file:
Directions
Warnings
Files list
CSS directions
-------------------------------------------------------------------
Directions:
Change template directory name (see above)
Upload all files.
Change permissions on new directory : product_extra_files
Apply sql patch
You're done! (unless you already have products in your cart - see warning below)
--------------------------------------------------------------------
Warnings:
There is no file extension check on the uploads. All fields will upload any file so
1) be sure your flash file has the appropriate ending (swf, most likely)
2) you may upload any file to be viewed with your product, such as any size image (up to your server limit of course), any word, excel or php file, etc. Anyone who uses this really should restrict the upload files to pdfs as these are the safest files to have on your website.
File deletions and overwrites: Once you delete a product or change the files for a product, the old files never fade away. Uploading a file with the same name will overwrite that file
If you are installing this into a cart that already has products, you will have to populate the new table with every product id in order for the products to be visible. This is not hard to do with excel and phpmyadmin. If you have access to your database, export the file to excel, add the fields and import it back in.
---------------------------------------------------------------------
Admin Modified Files:
admin/includes/modules/product/collect_info.php
admin/includes/modules/product/preview_info.php
admin/includes/modules/new_product_preview.php
admin/includes/modules/update_product.php
Admin New Files:
admin/includes/extra_datafiles/product_database_names.php
admin/includes/languages/english/extra_definitions/product.php
Cart Modified Files:
includes/modules/pages/product_info/main_template_vars_product_type.php
includes/templates/your_template/templates/tpl_product_info_display.php
Cart New Files:
includes/extra_datafiles/product_database_names.php
includes/modules/pages/product_info/jscript_main.js
includes/modules/popup_flash/header_php.php
includes/modules/popup_flash/jscript_AC_RunActiveContent.js
includes/modules/popup_flash/jscript_main.js
includes/templates/your_template/popup_flash/tpl_main_page.php
New upload directory:
product_extra_files/ (set permissions at 777 - where your files will be uploaded to.
-------------------------------------------------------------------
CSS style tips:
Here is the suggested minimum css for the product page layout. Just add these lines to the end of your CSS if you want.
.files {
clear:left; float:left;
}
.filesHead {
font-weight: bold; margin-bottom: 5px;
}
I did create these items into a unordered list so many other things can also be done with these block as well.
Bookmarks