Ubercart add to cart trigger?
I want to keep track of all items added to uber cart. I.e. Whenever someone clicks ADD TO CART, I want to: create a database entry of the time and item added.
This way I can see which items are most clicked on.
The logic to add it to a db etc is easy to do. What I need to know is, how do I p开发者_JAVA技巧lug into the "add to cart" part. I.e. How do I know when this has been clicked?
You should be able to implement hook_add_to_cart in a custom module, which will get called exactly as you describe above.
In Drupal 7 it changed to hook_uc_add_to_cart
精彩评论