toutpratique/override/modules/sendtoafriend/sendtoafriend.php
Thibault GUILLAUME 95dde9f70c inté page produit
2015-09-08 12:52:03 +02:00

27 lines
680 B
PHP

<?php
if (!defined('_PS_VERSION_'))
exit;
class sendToAFriendOverride extends sendToAFriend
{
public function install()
{
return (parent::install() && $this->registerHook('productSend'));
}
public function hookproductSend($params)
{
/* Product informations */
$product = new Product((int)Tools::getValue('id_product'), false, $this->context->language->id);
$image = Product::getCover((int)$product->id);
$this->context->smarty->assign(array(
'stf_product' => $product,
'stf_product_cover' => (int)$product->id.'-'.(int)$image['id_image'],
'stf_secure_key' => $this->secure_key
));
return $this->display(__FILE__, 'sendtoafriend-extra.tpl');
}
}