Jump to content

Recommended Posts

Hello everybody,


i wrote a little module, which makes it easier to pick a certain color in an extra window (fancybox).


The module creates and displays a button via my files customcolorpick.php -> customcolorpick.tpl. The file customcolorpick.tpl in turn opens a dialog.php via fancybox where i need to access my current product id, from which the form was started.


This is my little code example:



public function hookCustomHook($params)
	// Does not work
	$product = $this->context->controller->getProduct();

	$this->context->controller->addCSS($this->_path.'css/product.css', 'all');
		'module_color' => Configuration::get('MODUL_COLOR'),
		'module_window_link' => $this->context->link->getModuleLink('customcolorpick', 'display')
return $this->display(__FILE__, 'customcolorpick.tpl');


<a class="iframe" id="wishlist_button_nopop" href="{$module_window_link}">Farbton wählen</a>

Any ideas?

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
  • Create New...

Important Information

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