AnsweredAssumed Answered

checking logic hooks

Question asked by crystal crystal on Jul 31, 2015
Latest reply on Jul 31, 2015 by Bal Hana Kim do Amaral Oliveira
how do I check if my logic hooks's codes is correct?I would like to see the quantities reducing.Below are my codes

logic_hooks.php
<?php
$hook_version = 1;
$hook_array = Array();
$hook_array['after_save'] = Array();
// print
$hook_array['after_save'][] = Array(1, 'cal_quantity', 'custom/modules/p_Product_Catalogue/cal_quantity.php', 'cal_quantity', 'cal_quantity',);
?>

cal_quantity.php

<?php
if(!defined('sugarEntry') ||!sugarEntry) die('Not A Valid Entry Point');
class cal_quantity{
function cal_quantity($bean, $event, $arguments)
{
$bean->quantity_c = $bean->quantity_c;
}
}
?>

Outcomes