Jump to content

override the controlers


ILLEX-MEDIA

Recommended Posts

Hello,

 

i have today download a Mail.php this i have uploadet to override/classes/Mail.php

 

This works fine but i understand this. We work this?

 

Than i will creat new files for override files from controllers/, i will make a sampel:

 

override/controllers/IndexController.php

 

<?php
class IndexControllerCore extends FrontController
{
public function setMedia()
{
 parent::setMedia();
 Tools::addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen');
 Tools::addJS(_PS_JS_DIR_.'jquery/jquery.fancybox-1.3.4.js');
}
}
?>

 

I will add this file to override for add the .css and .js file to the indexpage (its for fancybox) but i will not change the original core files than i will create override so i can upload this when i must update the shop and must not again change corefiles...

 

 

Sorry my english is bad but i hope you cane help me.

 

Regards, Stefan

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