// Adding some hooks :)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12932 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fSerny
2012-02-02 14:18:07 +00:00
parent fb02212083
commit a5d024ad84
7 changed files with 17 additions and 4 deletions
@@ -34,4 +34,7 @@
<span>{$input.customer}</span><br />
</p>
{/if}</div>
{/block}
{if ($input.name == 'module')}
{hook h="displayAdminCategoriesForm"}
{/if}
{/block}
@@ -106,6 +106,7 @@ $(document).ready(function() {
</a>
</li>
{/foreach}
{hook h="displayAdminHomeQuickLinks"}
</ul>
<div class="separation"></div>
<div id="partner_preactivation"><h2>{l s='Your Required'}</h2><p class="center"><img src="../img/loader.gif" alt="" /></p>
@@ -115,7 +116,7 @@ $(document).ready(function() {
{$tips_optimization}
<div id="discover_prestashop"><p class="center"><img src="../img/loader.gif" alt="" />{l s='Loading...'}</p></div>
{hook h="displayAdminHomeInfos"}
</div>
@@ -126,8 +127,9 @@ $(document).ready(function() {
{$customers_service}
{$stats_sales}
{$last_orders}
{hook h="displayAdminHomeStatistics"}
</div>
{hook h="displayBackOfficeHome"}
</div>
<div class="clear">&nbsp;</div>
@@ -405,6 +405,10 @@ class AdminCategoriesControllerCore extends AdminController
'guest' => $guest_group_information,
'customer' => $default_group_information,
'desc' => $this->l('Mark all groups you want to give access to this category')
),
array(
'type' => 'module',
'name' => 'module'
)
),
'submit' => array(
@@ -218,6 +218,7 @@ class AdminOrdersControllerCore extends AdminController
@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars,
$customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null,
_PS_MAIL_DIR_, true);
Hook::exec('actionAdminOrdersTrackingNumberUpdate', array('order' => $order));
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token);
}
else
@@ -3798,7 +3798,7 @@ class AdminProductsControllerCore extends AdminController
public function initFormModules($obj)
{
$id_module = Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($this->tab_display_module).'\'');
$this->tpl_form_vars['custom_form'] = hook::exec('displayAdminProductsExtra', array(), (int)$id_module);
$this->tpl_form_vars['custom_form'] = Hook::exec('displayAdminProductsExtra', array(), (int)$id_module);
}
+1
View File
@@ -81,6 +81,7 @@ class PasswordControllerCore extends FrontController
$customer->last_passwd_gen = date('Y-m-d H:i:s', time());
if ($customer->update())
{
Hook::exec('actionPasswordRenew', array('customer' => $customer, 'password' => $password));
if (Mail::Send($this->context->language->id, 'password', Mail::l('Your password'),
array(
'{email}' => $customer->email,
+2
View File
@@ -177,6 +177,8 @@ class MailAlert extends ObjectModel
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.txt') &&
file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.html'))
Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'customer_qty', Mail::l('Product available', $id_lang), $templateVars, strval($customer_email), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');
Hook::exec('actionModuleMailAlertSendCustomer', array('product' => (is_array($product->name) ? $product->name[$id_lang] : $product->name), 'link' => $link->getProductLink($product)));
self::deleteAlert((int)$customer_id, strval($customer_email), (int)$id_product, (int)$id_product_attribute);
}