osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Use of undefined constant "TOP" (2.0.15)

This is a discussion on Use of undefined constant "TOP" (2.0.15) within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; I'm getting this error message to my PHP error log whenever I move from one manufacturer to another under admin. ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Reply

 

LinkBack Thread Tools
  #1  
Old 03-17-2010, 11:16 PM
JRR JRR is offline
New Member
 
Join Date: Sep 2009
Location: Vancouver, BC, Canada
Posts: 29
Thanks: 14
Thanked 1 Time in 1 Post
Rep Power: 0
JRR is on a distinguished road
Default Use of undefined constant "TOP" (2.0.15)

I'm getting this error message to my PHP error log whenever I move from one manufacturer to another under admin.

PHP Notice: Use of undefined constant TOP - assumed 'TOP' in /usr/www/users/flip/catalog/admin/includes/boxes/catalog.php on line 34 (35, 36, 37, ..., 45, 46, 47)

Here's line 34 (35, 36, ... 47 similar, all have TOP added):

$contents[] = array('text' => tep_admin_files_boxes(FILENAME_CATEGORIES, BOX_CATALOG_CATEGORIES_PRODUCTS, TOP) .

Now 'TOP' was added to admin/includes/boxes/catalog.php in the newest release of OSCMax 2.0.15 - no 'TOP' in 2.0.4 boxes/catalogl.php - and it is linked to admin/includes/functions/general.php but darned if I can see where (its late - I'm tired), the supposedly relevant line is:

$sub_boxes = '<a href="' . tep_href_link($filename) . '" class="menuBoxContentLink" target="_' . $target_window . '">' . $sub_box_name . '</a><br>';

When I deleted all the "TOP"s then I get this error message:

PHP Warning: Missing argument 3 for tep_admin_files_boxes(), called in /usr/www/users/flip/catalog/admin/includes/boxes/catalog.php on line 34 (35, 36...46, 47) and defined in /usr/www/users/flip/catalog/admin/includes/functions/general.php on line 50
PHP Notice: Undefined variable: target_window in /usr/www/users/flip/catalog/admin/includes/functions/general.php on line 56


Here is line 50 from catalog.php:
function tep_admin_files_boxes($filename, $sub_box_name, $target_window) {

And here is line 56 from catalog.php:
$sub_boxes = '<a href="' . tep_href_link($filename) . '" class="menuBoxContentLink" target="_' . $target_window . '">' . $sub_box_name . '</a><br>';

So is it this a real error or is it just a minor problem that isn't hurting anything?

John :-#)#

Last edited by JRR; 03-17-2010 at 11:21 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 03-18-2010, 06:15 AM
michael_s's Avatar
osCMax Developer


 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 16,522
Thanks: 149
Thanked 652 Times in 558 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Use of undefined constant "TOP" (2.0.15)

Minor issue. This is a warning that will be addressed in future releases. The current workaround is to disable the warnings (which is the default configuration of osCMax that you must have changed or your config is not obeying).

In admin/includes/application_top.php, you need this line (line 18
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);


Or you could just change the constant definition in the affected files by changing TOP to 'TOP' whic is the actual fix to this.

Yes, just add the single quotes around TOP in the files/lines that are throwing the error.
__________________
Michael Sasek
osCMax Developer

*** Do not PM me requesting paid help. The only paid work I do is for AABox Web Hosting customers ***

Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.

osCMax User Manual - osCMax Templates - Advanced Template Tutorial

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page? lithband osCMax v2 Customization/Mods 7 05-27-2010 04:20 AM
"Create account" leading to "Advanced search"??? Steelwork osCMax v2 Installation issues 14 02-08-2010 07:31 AM
most of my items are "Flat-rate", but how can I also offer "Free-Shipping" on just a few specific ones?? mac007 osCMax v2 Customization/Mods 0 11-09-2009 08:15 AM
Hide "Add to Cart" and disable "Buy Now" for manufacturer v1.0 michael_s New osCommerce Contributions 0 10-31-2008 02:03 AM
Remove "QTPRO" for "Option Type Feature" adam71o osCMax v2 Customization/Mods 3 01-10-2007 09:32 AM


All times are GMT -8. The time now is 07:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2010 osCmax
Inactive Reminders By Icora Web Design