0

I have requirement, which deals with Order placing. I am not using uber cart module or any other eCommerce related modules. I have created a new content type names 'order placing', now the client requires that the title field should be filled by users name which I have added in user registration form. The second requirement is that the 'order placing' content type has a serial number field, which has to be auto generated depending on the database values.

Any ideas how could I achieve this?

Anyone?

1

You can use the Auto Nodetitle module along with the Token module for your title requirement. As for the second, you could hook into hook_nodeapi() if Drupal 6, or hook_node_presave() if Drupal 7, to populate your number field.

  • Thanks for the suggestion above, but for the second requirement I would need a hook function which I could use in template.php as the serial number has to be shown to the user. any ideas? – mad_programmer Aug 5 '13 at 16:37
  • I am pretty certain you would have to do this in a custom module, not a theme. But all this functionality is doing is populate the field programatically, so, whatever permissions you have on that field would be maintained. – Jimajamma Aug 5 '13 at 20:41
  • thanks, I will give it a try, custom module is what I wanted to avoid but guess I have no other choice. – mad_programmer Aug 6 '13 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.