good morning guys, in my case I want to retrieve the customer name which is responsible for doing a reservation, but I can't get any attribute from reservation describe me the customer name
Can anyone please tell me how to get costumer name from the reservation ? , because any reservation was done by a customer.
this is how do i get the current reservation :
public function getReservation()
{
return $this->_coreRegistry->registry('current_reservation');
}
this is another way , but why it throws for me an error while fetching why ?
Why there are a problems when fetching the data
the block :
public function getReservationCollection()
{
$collection = $this->_reservationCollectionFactory->create();
$collection->addAttributeToSelect('*');
$collection->setPageSize();
return $collection;
}
the phtml file :
<?php
$res = $block->getReservationCollection();
var_dump($res);
foreach ($res as $re) {
print_r($re->getData());
echo "<br>";
}?>