In virtuemart order table i see there is a field "customer_number", is that field same and unique for all orders of the same buyer/customer??
For some reasons i need to query the order table for a specific user's orders by this customer id instead user id.
Thanks in advance
The customer_number is not unique to a customer
I would tend to go with -
virtuemart_orders -> virtuemart_user_id
If the customer has a VM account then this number will be the same for all orders they made when logged in
Sorry i am not getting u.
Can there be different customer_number values of a user who made different orders for different products?? In vm orders table i checked couple of orders of a user and in every order row that customer_number value is same. So isn't it unique per user?
"
QuoteCan there be different customer_number values of a user"
By this I think you mean a registered customer
If a customer is registered and is logged in when they complete an order then they will have the same customer number
However - virtuemart_user_id will also be the same for every order and is a lot easier read :-)
Hi yes of course m talkin abt the user who is registered and completes order by logging in. So is as that id is unique id, i need to use it for some purposes.
Yes use it
But I dont know why you could not use virtuemart_user_id