Jump to content

magc8888

Members
  • Content count

    14
  • Joined

  • Last visited

Posts posted by magc8888


  1. Oooops...

     

    I have gone through the whole thread, read all the replies and found out empo stop supporting the thread anymore. And Zane86 has sent some helpful posts. I carefully and correctly followed all the steps of the installation. But still got the error message, the parse one has been solved and i comment out some part of the box/category.php then finally i can see the cap contribution on my site, although the tep show error is not solved.

     

    Ok, When i click the add product and add a product into it, then clicked preview , it redirect me to the index page, i have added the suggestion from Zane86, but still redirect me to index page. Just don't know what is going wrong.

    and there are only two buttons in the add product page, " Preview " and " Back " , no upload image button or submit button. Besides the drop down button of calendar works well, the rest is :'(

     

    I am using RC2a version and installed cap 1.4.3. I am going to try to install it with RC1 to see whether is it working or not.

     

    For sure the idea of this contribution is wonderful. but it is a pity i still cannot use it.


  2. Dear Empo,

     

    Thanks a lots of this great contribution. I finally installed it, i can see it in admin and able to make approval. but when i go to Administrator, there is a error message on the top:

     

    Warning: reset() [function.reset]: Passed variable is not an array or object in /home/hongkon2/public_html/admin/includes/classes/object_info.php on line 17

     

    Warning: Variable passed to each() is not an array or object in /home/hongkon2/public_html/admin/includes/classes/object_info.php on line 18

     

    and when i clicked " ADD PRODUCT" and "EDIT PRODUCT" , it appeared the error message:

     

    Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/hongkon2/public_html/includes/header.php:160) in /home/hongkon2/public_html/includes/boxes/categories.php on line 60

     

    below is the /includes/boxes/categories.php

     

    <?php

    /*

    $Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

     

    Welcome to MagC Gifts Store - Unique gift shopping online, jewelry gift shop

     

    http://www.magcgifts.com

     

    Copyright © 2006 MagC Gifts Store

     

    Released under the GNU General Public License

    */

     

    function tep_show_category($counter) {

    global $tree, $categories_string, $cPath_array;

     

    for ($i=0; $i<$tree[$counter]['level']; $i++) {

    $categories_string .= "  ";

    }

     

    $categories_string .= '<a href="';

     

    if ($tree[$counter]['parent'] == 0) {

    $cPath_new = 'cPath=' . $counter;

    } else {

    $cPath_new = 'cPath=' . $tree[$counter]['path'];

    }

     

    $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

     

    if (isset($cPath_array) && in_array($counter, $cPath_array)) {

    $categories_string .= '<b>';

    }

     

    // display category name

    $categories_string .= $tree[$counter]['name'];

     

    if (isset($cPath_array) && in_array($counter, $cPath_array)) {

    $categories_string .= '</b>';

    }

     

    if (tep_has_category_subcategories($counter)) {

    $categories_string .= '->';

    }

     

    $categories_string .= '</a>';

     

    if (SHOW_COUNTS == 'true') {

    $products_in_category = tep_count_products_in_category($counter);

    if ($products_in_category > 0) {

    $categories_string .= ' (' . $products_in_category . ')';

    }

    }

     

    $categories_string .= '<br>';

     

    if ($tree[$counter]['next_id'] != false) {

    tep_show_category($tree[$counter]['next_id']);

    }

    }

    ?>

    <!-- categories //-->

    <tr>

    <td>

    <?php

    $info_box_contents = array();

    $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

     

    new infoBoxHeading($info_box_contents, true, false);

     

    $categories_string = '';

    $tree = array();

     

    $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

    while ($categories = tep_db_fetch_array($categories_query)) {

    $tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

    'parent' => $categories['parent_id'],

    'level' => 0,

    'path' => $categories['categories_id'],

    'next_id' => false);

     

    if (isset($parent_id)) {

    $tree[$parent_id]['next_id'] = $categories['categories_id'];

    }

     

    $parent_id = $categories['categories_id'];

     

    if (!isset($first_element)) {

    $first_element = $categories['categories_id'];

    }

    }

     

    //------------------------

    if (tep_not_null($cPath)) {

    $new_path = '';

    reset($cPath_array);

    while (list($key, $value) = each($cPath_array)) {

    unset($parent_id);

    unset($first_id);

    $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

    if (tep_db_num_rows($categories_query)) {

    $new_path .= $value;

    while ($row = tep_db_fetch_array($categories_query)) {

    $tree[$row['categories_id']] = array('name' => $row['categories_name'],

    'parent' => $row['parent_id'],

    'level' => $key+1,

    'path' => $new_path . '_' . $row['categories_id'],

    'next_id' => false);

     

    if (isset($parent_id)) {

    $tree[$parent_id]['next_id'] = $row['categories_id'];

    }

     

    $parent_id = $row['categories_id'];

     

    if (!isset($first_id)) {

    $first_id = $row['categories_id'];

    }

     

    $last_id = $row['categories_id'];

    }

    $tree[$last_id]['next_id'] = $tree[$value]['next_id'];

    $tree[$value]['next_id'] = $first_id;

    $new_path .= '_';

    } else {

    break;

    }

    }

    }

    tep_show_category($first_element);

     

    $info_box_contents = array();

    $info_box_contents[] = array('text' => $categories_string);

     

    new infoBox($info_box_contents);

    ?>

    </td>

    </tr>

    <!-- categories_eof //-->

     

     

    I am not good at this. don't know where is the problem.

     

    Mag


  3. Hi ,

     

    I have installed the photo_gallery 1.3. (Simple Photo Gallery) Everything seems ok, but i didn't see the function on my website, how the visitor can use it. i have allready add the following instruction.

     

    And i also got some error message on Admin, when i clicked "Clean Gallery", got this error:1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1 select cID, pID from gallery limit -20, 20 [TEP STOP]

     

    And when clicked the Gallery Superusers, got this error message:Fatal error: Call to undefined function tep_hide_session_id() in /home/hongkon2/public_html/admin/gallery_superusers.php on line 112

     

    It will be so pity if i cannot get benefit from this great contribution. I would like it very much.

     

    Does anyone has a clue how to fix those. I have little knowledge about this. please help me.

     

    Maggie

     

     

    7. In includes/languages/english/account.php

     

    ***ADD before the closing ?>:

    //SIMPLE GALLERY start

    define('MY_GALLERY', 'My photo gallery');

    //SIMPLE GALLERY end

     

    #################################

     

    8. In admin/includes/column_left.php:

     

    //SIMPLE GALLERY start

    require(DIR_WS_BOXES . 'gallery.php');

    //SIMPLE GALLERY end

     

    #################################

     

    9. In admin/includes/filenames.php

     

    ***ADD:

    //SIMPLE GALLERY start

    define('FILENAME_GALLERY', 'gallery.php');

    define('FILENAME_GALLERY_SUPERUSERS', 'gallery_superusers.php');

    define('FILENAME_GALLERY_UPLOAD', 'gallery_upload.php');

    //SIMPLE GALLERY end

     

    #################################

     

    10. In admin/inclides/languages/english.php

    ***ADD:

    //SIMPLE GALLERY start

    define('BOX_HEADING_GALLERY', 'Gallery');

    define('BOX_GALLERY_GALLERY', 'Clean Gallery');

    define('BOX_GALLERY_SUPERUSERS', 'Superusers');

    define('BOX_GALLERY_UPLOAD', 'Upload');

    //SIMPLE GALLERY end

     

    #################################

     

    11. In admin/includes/database_tables.php

     

    **ADD before the final ?>:

     

    //SIMPLE GALLERY start

    define('TABLE_GALLERY', 'gallery');

    define('TABLE_GALLERY_SUPERUSERS', 'gallery_superusers');

    //SIMPLE GALLERY end

     

    #################################

     

    12. add to catalog/includes/database_tables.php:

     

    //SIMPLE GALLERY start

    define('TABLE_GALLERY_SUPERUSERS', 'gallery_superusers');

    define('TABLE_GALLERY', 'gallery');

    //SIMPLE GALLERY end

×