I'm looking to pass the customer id and order id in a url to track sales from an affiliate link. To pass the order id I'm using this variable <?= $order->id ?>, I haven't specifically found a reference to customer id in the docs, would it just be <?= $customer->id ?>
Thanks for any help.
Page 1 of 1
Pass Customer ID
#2
Posted 29 March 2012 - 10:42 AM
Hi,
Yes, most models extending on the Db_ActiveRecord have an 'id' field that is used as an identifier. In your case, it might be useful to look at the the class references for Shop_Order and Shop_Customer. The order's customer id can be accessed directly with $order->customer->id (assuming $order is a Shop_Order) object.
Thank you
Yes, most models extending on the Db_ActiveRecord have an 'id' field that is used as an identifier. In your case, it might be useful to look at the the class references for Shop_Order and Shop_Customer. The order's customer id can be accessed directly with $order->customer->id (assuming $order is a Shop_Order) object.
Thank you
Share this topic:
Page 1 of 1

Help











