Yes, here is the file:
Code:<?php /** * main_template_vars_product_type.php * This file contains all the logic to prepare $vars for use in the product-type-specific template * It pulls data from all the related tables which collectively store the info related only to this product type. * * @package productTypes * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: main_template_vars_product_type.php 2326 2005-11-09 23:43:14Z drbyte $ */ /* * This file contains all the logic to prepare $vars for use in the product-type-specific template * It pulls data from all the related tables which collectively store the info related only to this product type. */ // This should be first line of the script: $zco_notifier->notify('NOTIFY_PRODUCT_TYPE_VARS_START_PRODUCT_EXTRA_DESCRIPTION_INFO'); /** * Retrieve relevant data from relational tables, for the current products_id: */ // Nothing special to do here for primary product_info type $sql = "select * from " . TABLE_PRODUCT_EXTRA_FIELDS . " where products_id = '" . (int)$_GET['products_id'] . "'"; $files = $db->Execute($sql); /* * extract info from queries for use as template-variables: */ $extra_field = $files->fields['extra_field']; $text_1 = $files->fields['text_1']; $text_2 = $files->fields['text_2']; $text_3 = $files->fields['text_3']; $text_4 = $files->fields['text_4']; $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']; $products_video = $files->fields['video']; $products_video_title = $files->fields['video_title']; if (!empty($products_video)) $products_video_link = '<a href="javascript:popupWindow(\''.zen_href_link(FILENAME_FLASH).'&id='.$_GET[products_id]. '\') ">'. $products_video_title . '</a>'; if (!empty($products_file_1_title)) $products_file_1_link = '<a href="' . "product_extra_files/" . $products_file_1 . '">'. $products_file_1_title . '</a>'; if (!empty($products_file_2_title)) $products_file_2_link = '<a href="' . "product_extra_files/" . $products_file_2 . '">'. $products_file_2_title . '</a>'; if (!empty($products_file_3_title)) $products_file_3_link = '<a href="' . "product_extra_files/" . $products_file_3 . '">'. $products_file_3_title . '</a>'; if (!empty($products_file_4_title)) $products_file_4_link = '<a href="' . "product_extra_files/" . $products_file_4 . '">'. $products_file_4_title . '</a>'; // This should be last line of the script: $zco_notifier->notify('NOTIFY_PRODUCT_TYPE_VARS_END_PRODUCT_EXTRA_DESCRIPTION_INFO'); ?>
Ok, when I stall this mod (Product Extra Field) here are the files and folders:
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/includes/modules/delete_product_confirm.php
Admin New Files:
admin/includes/extra_datafiles/product_database_names.php
admin/includes/languages/english/extra_definitions/product.php
admin/includes/functions/extra_functions/function_product_extra_fields.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
But when I install this file: includes/modules/pages/product_info/main_template_vars_product_type.php I was getting an error. But when I delete it off my server the error is gone.
Can you re-trigger the error ("Warning: an error occurred..."), and then go grab the latest debug log file? The one you posted seems to be caused by something other than this custom fields thing. Maybe multiple log files are being created on the same page. So, if you're seeing several created at the same time-stamp, post all of them. (And the ones not related to this plugin are something else you should look at fixing too.)
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I did a Debug and this what I got:
[28-Apr-2016 09:39:43 America/Chicago] Request URI: /index.php?main_page=product_info&cPath=7_8&products_id=38&zenid=856a9aba017f2fea 4823005914f2d625, IP address: 50.26.65.173
#1 trigger_error() called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/xxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/modules/pages/product_info/main_template_vars_product_type.php:31]
#5 include_once(/xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/modules/pages/product_info/main_template_vars_product_type.php) called at [/xxxxx/xxxxx/public_html/morrisgiftshop.biz/includes/modules/pages/product_info/main_template_vars.php:134]
#6 require(/xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/modules/pages/product_info/main_template_vars.php) called at [/xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php:251]
#7 require(/xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php) called at [/xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/index.php:97]
[28-Apr-2016 09:39:43 America/Chicago] PHP Fatal error: 1146:Table 'xxxxxx_zencart.TABLE_PRODUCT_EXTRA_FIELDS' doesn't exist :: select * from TABLE_PRODUCT_EXTRA_FIELDS
where products_id = '38' ==> (as called by) /xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/modules/pages/product_info/main_template_vars_product_type.php on line 31 <== in /xxxxxx/xxxxxx/public_html/morrisgiftshop.biz/includes/classes/db/mysql/query_factory.php on line 167
Last edited by wmorris; 28 Apr 2016 at 03:48 PM.
Probably all due to this error
Did you run "install_product_extra_fields sql"???Code:PHP Fatal error: 1146:Table 'xxxxxx_zencart.TABLE_PRODUCT_EXTRA_FIELDS' doesn't exist
Zen-Venom Get Bitten
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
DROP TABLE IF EXISTS `product_extra_fields`;
CREATE TABLE `product_extra_fields` (
`products_id` int(11) NOT NULL default '0',
`extra_field` text default '',
`text_1` varchar(50) default NULL,
`text_2` varchar(50) default NULL,
`text_3` varchar(50) default NULL,
`text_4` varchar(50) default NULL,
`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;
Verify that: includes/extra_datafiles/product_database_names.php
Has been uploaded/reupload it.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Bookmarks