In this post I am going to explain how to get customer details by id in PrestaShop 1.7.
// Your customer id
$id_customer = 4;
// Load customer object
$customer = new Customer((int) $id_customer);
// Validate customer object
if (Validate::isLoadedObject($customer)) {
// Get Customer First Name
echo $customer->firstname;
// Get Customer Last Name
echo $customer->lastname;
// Get Customer Email
echo $customer->email;
// Print Customer Object
echo "<pre>";
print_r($customer);
echo "</pre>";
}
Write an article about ecommerce that help people to grow their ecommerce business. You’ll find best ecommerce guide, news, tips & more!



Leave a Reply