Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    663
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default 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
    Zen cart PCI compliant Hosting

  3. #3

    Default 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

  4. #4
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default 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....
    Zen cart PCI compliant Hosting

  5. #5

    Default 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. #6

    Default 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

  7. #7
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default 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
    Zen cart PCI compliant Hosting

 

 

Similar Threads

  1. v138a How can I find the CSS file and which line of the element?
    By fanisme in forum General Questions
    Replies: 2
    Last Post: 24 Mar 2013, 06:40 PM
  2. Rogue > Can't find where it's Coming From
    By limelites in forum General Questions
    Replies: 18
    Last Post: 28 Sep 2010, 01:21 AM
  3. Can't seem to find the error... help please?
    By alana1223 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 9 Jan 2010, 05:27 PM
  4. Replies: 10
    Last Post: 8 Jan 2009, 09:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg