Ubercart hooks

firewing1's picture
Offline
Joined: 07/07/2009
Juice: 125
Ubercart hooks

I think it would be best if you use an order hook to update all a product's nodes when an order is submitted. hook_order_product_alter() looks like a good choice, but there may be a better one. A full list of hooks for UC2 is available here: http://api.ubercart.org/api/group/hooks/2

Essentially, your module will first have to determine if the product being ordered is a translation or not. If so, it must find the original product node, set the correct stock, and then update all translations accordingly. If it is not a translated node (meaning it is the original product node), then simply update all translations accordingly.

i18n issues i D6/UC2 for Multilingual sites By: CpILL (150 replies) Mon, 05/11/2009 - 14:02