en Jump to content
  • 0
Frenchy

Cannot override product Controller

Question

Hello everyone,

 

I want to overrite the ProductController.php

 

According the doc : http://doc.prestashop.com/display/PS16/Controllers+within+PrestaShop#ControllerswithinPrestaShop-Overridingacontroller

I'm created the ProductController.php in override/controllers/front/

 

class ProductController extends ProductControllerCore
{
    /**
     * Assign template vars related to page content.
     *
     * @see FrontController::initContent()
     */
    public function initContent()
    {
		//some code
	}
}

 

When i'm tested this code, the behavior has not changed...

 

Please, help me :(

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Did you clear cache?

Also, try with syntax:

public static function priceCalculation(...)
{
	$price = parent::priceCalculation(...);

	// do something
	return self::$_prices[$cache_id];
}

 

Edited by phinq1910

Share this post


Link to post
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

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More