Hello,
I wanna code a module which adds a new product class (+ node type) at its installation. I tried several ways including db_query() but nothing worked as it should.
Now I'm trying to simulate a users uc_ubercart_class_form_submit but it also doesn't work 
Here's my code:
<?php
function uc_mymodule_install() {
$form_state['values']['name'] = 'Moduletestclass';
$form_state['values']['pcid'] = 'moduletestclass';
$form_state['values']['description'] = 'Moduletestclass description blablabla';
$form['pcid']['#type'] = 'textfield';
module_invoke_all(class_form_submit,$form, $form_state);
}
?>The only thing that happens is a redirect to 'admin/store/products/classes' as in ubercarts hook_class_form_submit() defined. What did I forget?
Did anyone created an ubercart module which adds a new product class + some cck fields?
Every suggestion is welcome!
greetz haggis
