Thanks for all the interest guys. I think I have finally go my head around it with all the extra notifiers I have manage to rewrite the mod just changing 3 core file.
The way I did it was to just allow a simple text entry to be stored for a product to tell me where it is. I suppose to do I properly I really should have a table of locations and link the location to the product like product to categories. Might look at that later! But for know I have it working using the following notifiers
'NOTIFY_ADMIN_PRODUCT_COLLECT_INFO_EXTRA_INPUTS',
'NOTIFIER_ADMIN_ZEN_REMOVE_PRODUCT',
'NOTIFY_PRODUCT_MUSIC_UPDATE_PRODUCT_END',
'NOTIFY_PRODUCT_MUSIC_COPY_TO_CONFIRM_DUPLICATE',
'NOTIFY_MODULES_COPY_TO_CONFIRM_DUPLICATE',
'NOTIFY_MODULES_UPDATE_PRODUCT_END'
A couple of trip ups were the fact that product info is now an object so needed to use $p1->products_id and not $p1['products_id'] this is only in the collect_info modules.
The second was realising that the $extra_product_inputs needs to be an array of arrays so
PHP Code:
$p2 = array('products_location'=>array(
'label'=> array(
'text' => TEXT_PRODUCTS_LOCATION,
'field_name' =>'products_location'),
'input' => $input));
I also gave mine a name just in case I find anyone else using it.
Finally I have even sanitised the input which I must say was surprisingly easy (so good job who ever wrote that!)
PHP Code:
$sanitizer = AdminRequestSanitizer::getInstance();
$group = array(
'products_location' => array('sanitizerType' => 'ALPHANUM_DASH_UNDERSCORE', 'method' => 'post'),
);
$sanitizer->addComplexSanitization($group);
Thanks Again for all the interest. Might even post it as a mod later.
Bookmarks