Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Need help with coding - can't find the file were the error is coming from

Need help with coding - can't find the file were the error is coming from

Locked

Views: 3,032

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
1 Jun 2006, 2:54 AM
#1
cowlickdesign avatar

cowlickdesign

New Zenner

Join Date:
Nov 2005
Posts:
20
Plugin Contributions:
0

Need help with coding - can't find the file were the error is coming from

Hello Zen-Cart community.

If you visit my site http://www.ipodresq.ca then proceed to click on one of two current categories an error is thrown when the categories products are to be shown.

first category: Free Diagnostic Testing
"http://www.ipodresq.ca/ipodresq/store/index.php?main_page=index&cPath=8"
second category: 3rd Generation Repair
"http://www.ipodresq.ca/ipodresq/store/index.php?main_page=index&cPath=9"

"1146 Table 'humapital.products_description' doesn't exist." Now im not too sure where I can find this file as I am not sure how the pages are built and what file to start with.

I know humapital should be replaced by store_ as its calling the wrong variable as it builds this page. It is trying to connect to the table were the descriptions are located. It should not be using my database username of humapital but the database prefix of store_.

Thanks in advance for anyones help and I hope I am clear enough. If not post and I'll get you more info.

P.S. I did install this template from:
http://www.templatemonster.com/zen-cart-templates/10096.html

6 Jun 2006, 4:27 PM
#2
dehaw avatar

dehaw

Zen Follower

Join Date:
Feb 2005
Location:
Lochgelly :: Fife :: Scotland :: UK
Posts:
423
Plugin Contributions:
0

Re: Need help with coding - can't find the file were the error is coming from

You'll find the details in the configuration files within includes -> configuration and admin -> includes -> configuration.

Hope this helps, let us know how you get on.

Dehaw

6 Jun 2006, 4:48 PM
#3
masterblaster avatar

masterblaster

Totally Zenned

Join Date:
Aug 2004
Location:
Germany
Posts:
528
Plugin Contributions:
0

Re: Need help with coding - can't find the file were the error is coming from

This template from templatemonster.com is quite buggy. I had to fix some things for a client of mine.

The database selection in this template doesn't support any prefixes. You A) install the template with no prefix or B) make it to use the correct prefix. :smile:

6 Jun 2006, 5:00 PM
#4
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Need help with coding - can't find the file were the error is coming from

humapital is the name of the database its looking for

products_description is the table

and there is NO prefix in this error,

take a look in your config files and see if the db prefix is defined

6 Jun 2006, 6:05 PM
#5
cowlickdesign avatar

cowlickdesign

New Zenner

Join Date:
Nov 2005
Posts:
20
Plugin Contributions:
0

Re: Need help with coding - can't find the file were the error is coming from

Thanks for the help so far.

I checked my config files and the database prefix is defined to the correct value, which is "store_".

masterblaster how would I install the template with the database prefix or how would I go and make it use the correct prefix?

I've been looking at the code and have no idea how the database query strings are built and where the come from.

Anyhelp of what to do would be greatly appreciated.

Thanks again,
Cowlick Design

6 Jun 2006, 6:11 PM
#6
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Need help with coding - can't find the file were the error is coming from

It looks like the problem is that the template is looking for a table that is HARD CODED. rather than using the defined table names.

You will probably want to look in the included files to see where they have this blunder....

6 Jun 2006, 6:24 PM
#7
cowlickdesign avatar

cowlickdesign

New Zenner

Join Date:
Nov 2005
Posts:
20
Plugin Contributions:
0

Re: Need help with coding - can't find the file were the error is coming from

Thanks Merlinpa1969 for the quick reply,

Is the correct way to call the database supposed to be "humapital.store_products_description"?

I belive the files that are affecting this would be the under "modules\product_all_listing.php" or "templates\tpl_index_product_list.php"

The way I figure this is that when I remove the tpl_index_product_list.php file the products of that category come up, just not in the most prettiest format.

Here is the code from tpl_index_product_list.php file:

<table border="0" width=<?=CONTENT_WIDTH?>% cellspacing="0" cellpadding="0" class=ch2> <tr> <td align=center class="pageHeading" colspan="2"><?php echo HEADING_TITLE; ?></td> </tr> <tr><td colspan="2" padding-top:0px valign=top align=center> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($do_filter_list) { $form = zen_draw_form('filter', zen_href_link(FILENAME_DEFAULT), 'get') . TEXT_SHOW; ?>
<td align="right" valign="bottom" class="main"><?php echo $form ?>
<?php if (!$getoption_set) { echo zen_draw_hidden_field('cPath', $cPath); } else { echo zen_draw_hidden_field($get_option_variable, $_GET[$get_option_variable]); } if (isset($_GET['typefilter'])) echo zen_draw_hidden_field('typefilter', $_GET['typefilter']); if ($_GET['manufacturers_id']) { echo zen_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']); } echo zen_draw_hidden_field('sort', $_GET['sort']); echo zen_draw_hidden_field('main_page', FILENAME_DEFAULT); echo zen_draw_pull_down_menu('filter_id', $options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"'); echo zen_hide_session_id(); ?>
</form></td>
<?php } ?> </tr> <?php // categories_description if ($current_categories_description != '') { ?> <tr> <td colspan="4"> <table border="0" width="100%" cellspacing="2" cellpadding="2" class="categoriesdescription"> <tr class="categoriesdescription"> <td class="categoriesdescription"><?php echo $current_categories_description; ?></td> </tr> </table> </td> </tr> <?php } // categories_description ?> <tr> <td colspan="2" class="main"><?php include(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_PRODUCT_LISTING)); ?></td> </tr> </table> </td></tr> </table> <?php //// bof: categories error if ($error_categories==true) { // verify lost category and reset category $check_category = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_id='" . $cPath . "'"); if ($check_category->RecordCount() == 0) { $new_products_category_id = '0'; $cPath= ''; } ?> <?php $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MISSING); while (!$show_display_category->EOF) { ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_FEATURED_PRODUCTS') { include(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_FEATURED_PRODUCTS_MODULE)); } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_SPECIALS_PRODUCTS') { include(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_SPECIALS_INDEX)); } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_NEW_PRODUCTS') { require(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_NEW_PRODUCTS)); } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_UPCOMING') { include(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); } ?> <?php $show_display_category->MoveNext(); } // !EOF ?> <?php } //// eof: categories error ?> <?php //// bof: categories $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW); if ($error_categories == false and $show_display_category->RecordCount() > 0) { ?> <?php $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW); while (!$show_display_category->EOF) { ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_FEATURED_PRODUCTS') { include(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_FEATURED_PRODUCTS_MODULE)); } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_SPECIALS_PRODUCTS') { include(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_SPECIALS_INDEX)); } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_NEW_PRODUCTS') { require(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_NEW_PRODUCTS)); } ?> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_UPCOMING') { include(DIR_WS_TEMPLATE . 'modules/' . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); } ?> <?php $show_display_category->MoveNext(); } // !EOF ?> <?php } //// eof: categories ?>

let me know if I should place the code for the product_all_listing.php file.

Thanks for everyone's help.

Look forward to future replies.

Best Regards,
Cowlick Design

6 Jun 2006, 9:37 PM
#8
cowlickdesign avatar

cowlickdesign

New Zenner

Join Date:
Nov 2005
Posts:
20
Plugin Contributions:
0

Re: Need help with coding - can't find the file were the error is coming from

Thanks Merlinpa1969 you are the man,

Working great!!!

Time to get this up and running with all the products and services.

Woo Hoo
CowlickDesign

6 Jun 2006, 9:46 PM
#9
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Need help with coding - can't find the file were the error is coming from

template monster strikes again,

If you get this error look in the tmxx/modules/product_listing.php

you will see where it says

"select product_description from product_description

chang that part and only that part to read
"Select product_description From " . TABLE_PRODUCT_DESCRIPTION . "

this will now use the defines to add the db_prefix if you have one added

23 Aug 2006, 3:11 PM
#10
lindenbaumx avatar

lindenbaumx

New Zenner

Join Date:
Aug 2006
Posts:
1
Plugin Contributions:
0

Re: Need help with coding - can't find the file were the error is coming from

Hi Merlinpa1969!
I have resolved the same problem with your good help.
Only about one point, please let me say.

TABLE_PRODUCT_DESCRIPTION>>>>>>>NO!
TABLE_PRODUCTS_DESCRIPTION>>>>>>>YES!

I have been confused for about 10 minutes...:laugh:
But your advice was very helpful. Thank you!