Zen Cart Logo
Forums / General Questions / Errors I cant figure out!

Errors I cant figure out!

Locked

Views: 1,483

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
24 Dec 2008, 4:59 PM
#1
mischiefdesignz avatar

mischiefdesignz

New Zenner

Join Date:
Aug 2008
Location:
Ohio
Posts:
63
Plugin Contributions:
2

Errors I cant figure out!

I have used the debug tool and I am having a major duh moment I can not get these errors figured out
[24-Dec-2008 11:53:46] PHP Warning: Missing argument 2 for currencies::display_price(), called in /home/content/m/i/s/mischief/html/includes/languages/english/extra_definitions/orange/free_gifts.php on line 28 and defined in /home/content/m/i/s/mischief/html/includes/classes/currencies.php on line 99
[24-Dec-2008 11:53:46] PHP Warning: Missing argument 2 for currencies::display_price(), called in /home/content/m/i/s/mischief/html/includes/languages/english/extra_definitions/orange/free_gifts.php on line 29 and defined in /home/content/m/i/s/mischief/html/includes/classes/currencies.php on line 99
[24-Dec-2008 11:53:46] PHP Fatal error: Call to undefined function zen_get_generated_category_path_rev() in /home/content/m/i/s/mischief/html/includes/modules/upcoming_products.php on line 56

the right side of my main page is not showing up for some reason here is my link to look http://mischiefscrapz.com ...... thank you in advance for any help:D

24 Dec 2008, 5:14 PM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Errors I cant figure out!

I don't think there is a free gift feature in zencart . i assume you have installed a module ? is so , your module either is not installed correctly or is not for the version of zencart you are using.

all the error keep refferring to /includes/languages/english/extra_definitions/orange/free_gifts.php

24 Dec 2008, 5:38 PM
#4
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Errors I cant figure out!

i know you can set the products for Free .. or create Gifts ..
looking at my freshly installed with no mod zencart , and i have no free_gifts.php , so i can only assume this is a modification done by you or 3rd party ..
either new file added or existing file name was changed.

24 Dec 2008, 6:38 PM
#5
mischiefdesignz avatar

mischiefdesignz

New Zenner

Join Date:
Aug 2008
Location:
Ohio
Posts:
63
Plugin Contributions:
2

Re: Errors I cant figure out!

it has something to do with the main index, when I click on any other link it opens fine ....... ughhhhhhhhh

24 Dec 2008, 10:44 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Errors I cant figure out!

Sometimes that's best ... or, the opposite approach: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

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

27 Dec 2008, 3:14 AM
#8
mischiefdesignz avatar

mischiefdesignz

New Zenner

Join Date:
Aug 2008
Location:
Ohio
Posts:
63
Plugin Contributions:
2

Re: Errors I cant figure out!

ok this is really stinking lol I did a fresh install got rid of them errors and got a new one, but page still doing the same thing.
[26-Dec-2008 20:35:05] PHP Fatal error: Call to undefined function zen_get_generated_category_path_rev() in /home/content/m/i/s/mischief/html/includes/modules/new_products.php on line 68

<?php
/**
 * new_products.php module
 *
 * @package modules
 * @copyright Copyright 2003-2007 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: new_products.php 6424 2007-05-31 05:59:21Z ajeh $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}

// initialize vars
$categories_products_id_list = '';
$list_of_products = '';
$new_products_query = '';

$display_limit = zen_get_new_date_range();

if ( (($manufacturers_id > 0 && $_GET['filter_id'] == 0) || $_GET['music_genre_id'] > 0 || $_GET['record_company_id'] > 0) || (!isset($new_products_category_id) || $new_products_category_id == '0') ) {
  $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and   p.products_status = 1 " . $display_limit;
} else {
  // get all products and cPaths in this subcat tree
  $productsInCategory = zen_get_categories_products_list( (($manufacturers_id > 0 && $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : $cPath), false, true, 0, $display_limit);

  if (is_array($productsInCategory) && sizeof($productsInCategory) > 0) {
    // build products-list string to insert into SQL query
    foreach($productsInCategory as $key => $value) {
      $list_of_products .= $key . ', ';
    }
    $list_of_products = substr($list_of_products, 0, -2); // remove trailing comma

    $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                  p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and p.products_id in (" . $list_of_products . ")";
  }
}

if ($new_products_query != '') $new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS);

$row = 0;
$col = 0;
$list_box_contents = array();
$title = '';

$num_products_count = ($new_products_query == '') ? 0 : $new_products->RecordCount();

// show only when 1 or more
if ($num_products_count > 0) {
  if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS == 0 ) {
    $col_width = floor(100/$num_products_count);
  } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
  }

  while (!$new_products->EOF) {
    $products_price = zen_get_products_display_price($new_products->fields['products_id']);
    if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);

    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);

    $col ++;
    if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1)) {
      $col = 0;
      $row ++;
    }
    $new_products->MoveNextRandom();
  }

  if ($new_products->RecordCount() > 0) {
    if (isset($new_products_category_id) && $new_products_category_id != 0) {
      $category_title = zen_get_categories_name((int)$new_products_category_id);
      $title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '' ) . '</h2>';
    } else {
      $title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</h2>';
    }
    $zc_show_new_products = true;
  }
}
?>

this is line 68

 if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);

my site http://mischiefscrapz.com

27 Dec 2008, 4:07 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Errors I cant figure out!

If you're missing that function, then your /includes/functions/functions_categories.php file is out-of-date. Perhaps you forgot to upgrade it during an upgrade, or you've installed an addon designed for an older version of Zen Cart, which modified that file, but doesn't have the most recent updates/improvements/fixes/additions in it.

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

27 Dec 2008, 4:18 AM
#10
mischiefdesignz avatar

mischiefdesignz

New Zenner

Join Date:
Aug 2008
Location:
Ohio
Posts:
63
Plugin Contributions:
2

Re: Errors I cant figure out!

omfg :hug: I love you! lmfao I was comparing every file I could think of that had to do with the products and updating them and nothing was working....... I reinstalled the freaking functions_categories and now it works perfect lol " knocks on wood " lol :clap: thank you so much!! I love all the mods and the toys people have for Zen. It may take a bit to figure something out, or actually have to break down and ask for help but I love it lol even tho trial and error learning gets a little hectic on my nerves at times lol thank you so much again!!