Hi
Hope someone can help as I have spent hours on this matter researching the internet for an answer.
I am having trouble with my logic_hook not firing on my shared host. I create a cost.php and logic_hook.php under Custom/Modules/AOS_Products. The cost.php just performs a few calculations for the varies custom fields created for the products that I have in the system.
The logic hooks are working fine on my Test machine at home (it’s running wampserver). Apache Version : 2.2.22 PHP Version : 5.3.13 MySQL Version :
5.5.24
I have set the permissions correctly on the shared host and am still not able to resolve the issue please help.
Below is a snippet from the log file where I am receiving the follow error.
Mon Nov 10 09:01:18 2014 [21070][1][DEPRECATED] Formatting correction: AOS_Products->date_entered had formatting automatically corrected. This will be removed in the future, please upgrade your external code
Mon Nov 10 09:01:18 2014 [21070][1][DEPRECATED] Formatting correction: AOS_Products->date_modified had formatting automatically corrected. This will be removed in the future, please upgrade your external code
Mon Nov 10 09:01:18 2014 [21070][1][DEBUG] Hook called: AOS_Products::before_save
Mon Nov 10 09:01:18 2014 [21070][1][ERROR] Unable to load custom logic file: custom/modules/aos_products/cost.php
Mon Nov 10 09:01:18 2014 [21070][1][ERROR] Unable to load custom logic file: custom/modules/aos_products/cost.php
Mon Nov 10 09:01:18 2014 [21070][1][ERROR] Unable to load custom logic file: custom/modules/aos_products/cost.php
Mon Nov 10 09:01:18 2014 [21070][1][ERROR] Unable to load custom logic file: custom/modules/aos_products/cost.php
Mon Nov 10 09:01:18 2014 [21070][1][ERROR] Unable to load custom logic file: custom/modules/aos_products/cost.php
Mon Nov 10 09:01:18 2014 [21070][1][INFO] Get One: |SELECT id_c FROM aos_products_cstm WHERE id_c = ‘189381f4-ae26-c436-df68-53dbe93a4ab4’|
Below is a copy of my logic_hook.php
<?php // Do not store anything in this file that is not part of the array or the hook version. This file will // be automatically rebuilt in the future. $hook_version = 1; $hook_array = Array(); // position, file, function $hook_array['before_save'] = Array(); $hook_array['before_save'][] = Array(1, 'cost', 'custom/modules/aos_products/cost.php', 'cost', 'cost'); $hook_array['before_save'][] = Array(2, 'subtotal', 'custom/modules/aos_products/cost.php', 'subtotal', 'subtotal'); $hook_array['before_save'][] = Array(3, 'markup', 'custom/modules/aos_products/cost.php', 'markup', 'markup'); $hook_array['before_save'][] = Array(4, 'selling', 'custom/modules/aos_products/cost.php', 'selling', 'selling'); $hook_array['before_save'][] = Array(5, 'sqm', 'custom/modules/aos_products/cost.php', 'sqm', 'sqm'); ?>Below is a copy of my cost.php
<?php class cost { function cost(&$bean, $event, $arguments) { // calculate item cost $bean->cost = ($bean->cp_lm_c / $bean->width_c); } } class subtotal { function subtotal(&$bean, $event, $arguments) { // calculate item subtotal $bean->subtotcost_c = ($bean->cost + $bean->underfelt_c + $bean->fitters_c); } } class markup { function markup(&$bean, $event, $arguments) { // calculate item markup $bean->markup_c = ($bean->subtotcost_c * $bean->markup_p_c / 100); } } class selling { function selling(&$bean, $event, $arguments) { // calculate item selling $bean->price = ($bean->subtotcost_c + $bean->markup_c + $bean->c_load_c + $bean->lam_fitters_c); } } class sqm { function sqm(&$bean, $event, $arguments) { // calculate item sqm $bean->markup_sqm_c = ($bean->c_load_c + $bean->markup_c); } } ?>