I am customizing ubercart to work with a separate learning management system.

I need to write to a table when a new product is created which contains a vocabulary term (a catalog category). This new table will be used by the LMS to know it should create a new course.

I can't seem to access the vocabulary terms for a new product at the point that function uc_product_insert is called. Perhaps these are created from the product form after this function is called?

I use the same code to check for the desired vocab term in function uc_product_update and it seems to work fine, but maybe I didn't test it enough to make sure it wasn't just finding the old (non-updated) data.

Can someone suggest where I could hook into the routine so that I can be sure the new product categories are already written to the db (or else what $node-> info I could check).

I tried using taxonomy_node_get_terms($node->nid) but it did not return any terms for the product at that point.

Thanks,

Comments

rszrama’s picture

Status: Active » Fixed

This sounds like a general Drupal question that you might find support for in the forums. Our issue tracker is devoted specifically to bugs and patches for the core Ubercart modules. You can always try our support forums as well, but I don't have any quick ideas for you other than to keep dumping the data that comes through hook_nodeapi(). It might be you need to adjust your custom module's weight so it gets fired after the taxonomy module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.