Jump to content

Override form.tpl in AdminCartRulesController


Recommended Posts

Hi!

I want to override default template called "form.tpl". It is in: /[admin]//themes/default/template/controllers/cart_rules/

 

I copied it, modified and placed in:

 

/override/controllers/admin/themes/default/template/controllers/cart_rules/

 

(i also tried: /modules/[my_module]/views/templates/admin/themes/default/template/controllers/cart_rules/ ).

 

 

This template is used by AdminCartRulesController:

 

$this->content .= $this->createTemplate('form.tpl')->fetch();

 

How can I change the path that controller takes this template from?

 

Link to comment
Share on other sites

In order to override the Product class, your file needs to be called Product.php and must feature a Product class that then extends ProductCore class.

 

The file can be placed in either of these locations:

 

/override/classes/Product.php

/modules/my_module/override/classes/Product.php

 

In order to override the ProductController class, your file needs to be called ProductController.php and must feature a ProductController class that then extends ProductControllerCore class.

 

The file can be placed in either of these locations:

 

/override/controllers/front/ProductController.php

/modules/my_module/override/controllers/front/ProductController.php

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