Jump to content

Code Hooks in Plugins Question


Tom S.

Recommended Posts

Hello,

As I understand it, I can extend a class using code hooks in plugins. So, if I wanted to modify a method for the cart class I could do this inside of my plugin:

class cart extends _HOOK_CLASS_
{
	protected function clear()
	{
		// some code
	}

}

Am I right in thinking I will completely override the clear() method with that?

My question is how can I add some extra functionality to the clear() method without completely overriding it? Say, for example, I wanted to add an extra line to that method making a change to a table in the database (but keep the rest of the functionality the same). How could I do that?

I read that just copying the entire method into my hook is against the terms.

Thanks.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...