LemonStand Forum: Pass Customer ID - LemonStand Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Pass Customer ID

#1 User is offline   skinnydope 

  • Member
  • Group: Members
  • Posts: 19
  • Joined: 17-January 11

Posted 28 March 2012 - 06:40 PM

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.
0

#2 User is offline   Manca 

  • Developer
  • Group: +Administrators
  • Posts: 252
  • Joined: 02-September 11

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

Share this topic:


Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users