Jump to content

Override classes question


Mr S

Recommended Posts

Hi, I am just getting my feet wet with Prestashop Core coding.

 

In my override/classes folder i have Tools.php file with code:

 

[/size][/size]
[size=4]class Tools extends ToolsCore[/size]
[size=4]{[/size]
[size=4]	public static function generateHtaccess($path, $rewrite_settings, $cache_control, $specific = '', $disableMuliviews = false)[/size]
[size=4]	{[/size]
[size=4]	 // Org code with my changes[/size]
[size=4]   }[/size]
[size=4]}[/size]
[size=4]

 

Do I need any thing else?

Like parent::generateHtaccess();

 

I have tested it and it seems to be working, just want to see if there is any thing more I need to do?

Link to comment
Share on other sites

the format of what you have done is correct. you should add parent::generateHtaccess() as the first line of your function, ONLY if you want that code to execute. since it seems you have copied the code from the original generateHtaccess function, and then modified it, there is no need to execute parent::generateHtaccess()

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...