Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where are classes Registered?


kjavitz

Recommended Posts

I need to register a new class, but where are classes such as the shopping cart registered? When I try and register something myself I get this complaint:

 

Fatal error: Call to a member function on a non-object in /usr/local/etc/httpd/vhosts/videogamesforrent.com/htdocs/includes/application_top.php on line 381

 

Help please?

"communicating your business message through the web"

 

Kevin Javitz

Link to comment
Share on other sites

not sure what you mean about registering, but

 

put your class file in /catalog/includes/classes

 

include that file on the page you want to use it (or in application_top.php so you can use it anywhere):

include(DIR_WS_CLASSES . 'myclass.php');

 

instantiate an object of the class:

$theclass = new myclass;

 

use it:

$theclass->classFunction();

 
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...