Post by Iceman » Mon May 20, 2013 5:17 pm

Hi all!
I would like to get the customer ID on the product.php to call a custom pricing function.
I tried $customer_id = $this->customer->getId() but it returns a strange value (only 1 or 0, not the customer ID like 100111).
How should I use the function?
Thanks in advance.

Bye.

Newbie

Posts

Joined
Mon May 20, 2013 5:14 pm

Post by Avvici » Mon May 20, 2013 7:30 pm

That will work.
Assuming the customer is logged in you need to check:

Code: Select all

if ($this->customer->isLogged()) { 
                        $cid = $this->customer->getId();
                        } else{
$cid = '';
}
 

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: No registered users and 6 guests