I'm not sure why this code won't work - I'm sure someone else will pick this up instantly.
I'm trying to give the buyer 1 userpoint for every product purchased. Basically they are purchasing credits and there is a volume discount for buying more but they still need to get one credit per product not one credit per dollar. Im using the userpoints and the userpoints ubercart modules in conjuction with conditional actions and custom php to try to make this happen.
userpoints_userpointsapi($order->products[0]->qty);
When I use this it works: userpoints_userpointsapi(50);
So the error is in the $order->products[0]-qty variable or some other thing.
Thank to all those who are smarter than I am.
