Jump to content

How to get special manufacturer by id?


Recommended Posts

in product controller to smarty array you have to add variable with manufacturer object:

 

$mymanufacturer = new Manufacturer(336);

 

then add it to smarty array.

$this->context->smarty->assign('mymanufacturer',$mymanufacturer);

 

 

then in product.tpl file you can use {$mymanufacturer} variable (remember that this is object)

  • Like 2
Link to comment
Share on other sites

in product controller to smarty array you have to add variable with manufacturer object:

 

$mymanufacturer = new Manufacturer(336);

 

then add it to smarty array.

$this->context->smarty->assign('mymanufacturer',$mymanufacturer);

 

 

then in product.tpl file you can use {$mymanufacturer} variable (remember that this is object)

Tnx vekia but i couldn't use it!

I created a ProducController.php in overwrite/controller/front and I  put below lines

<?php

class ProductControllerCore extends FrontController

{

$mymanufacturer = new Manufacturer(336);

$this->context->smarty->assign('mymanufacturer',$mymanufacturer);

}

?>

and use {$mymanufacturer} in product.tpl! it doesn't work

Edited by vahidafshari (see edit history)
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...