27 lines
680 B
PHP
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');
|
|
}
|
|
|
|
} |