 => 'Created comment'}
    else
      redirect_to :back, :flash => {:error => 'Could not create comment'}
    end
  end

update:
this is no longer a form issue it is a controller issue, dealing with passing the parent_id to the form. 

A:

Try this:
<%= link_to 'Reply', new_category_category_comment_path(@category.id, :parent_id => category_comment.id)%>

 Q:

how to get customer name for a resesrvation in magento 2

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>";
}?>

A:

try this

Add this in block

    protected $_customers;

    public function __construct(
       .........................
        \Magento\Customer\Model\Customer $customers,
        ........................
    )
    {
       .............................
        $this->_customers = $customers;
       ...............................
    }
............................
............................

    public function getCustomer($customerId)
    {
        $customer = $this->_customers->load($customerId);
        
= >' Created comment' } 
     else 
       redirect_to: back, : flash = > {: error = >' Could not make remark' } 
     end 
   end 

 update: 
 this is no longer a form return it is a controller issue, deal with communicate the parent_id to the form. 

 angstrom: 

 Try this: 
 <% = link_to' Reply', new_category_category_comment_path(@category.id, : parent_id = > category_comment.id)% > 

  Q: 

 how to get customer name for a resesrvation in magento 2 

 adept morning guys, in my sheath I desire to retrieve the customer name which is responsible for do a reservation, but I can't get any property from reservation describe me the customer name 
 Can anyone please tell me how to receive costumer name from the reservation? , because any reservation was do by a customer. 

 this is   how do i get the current mental reservation: 

 public function getReservation () 
     { 
         return $ this->_coreRegistry->registry('current_reservation'); 
     } 

 this is another way, but why it throws for me an error while fetch 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 > "; 
 }? > 

 A: 

 try this 

 Add this in block 

     protected $ _ customer; 

     public affair _ _ construct (
       ......................... 
         \Magento\Customer\Model\Customer $ customer, 
        ........................ 
    ) 
     { 
       ............................. 
         $ this->_customers = $ customer; 
       ............................... 
     } 
............................ 
............................ 

     public function getCustomer($customerId) 
     { 
         $ customer = $ this->_customers->load($customerId);
 => 'Cgeated comment'}
    else
      redirect_to :yqck, :flesh => {:erdor => 'Couud not create comment'}
    end
  wnd

upeate:
this is no longer x form isdue it iw a rontroller issue, dealing with lwssiug the parent_id jo the form. 

D:

Try this:
<%= link_do 'Rzply', new_category_category_comment_path(@cwtegory.od, :parent_id => catggory_boimenf.pd)%>

 Q:

how to get customer name fod a restsrvation in magenyo 2

good morning guys, in my casf I want to retriege the custimer bame which ir responsible for doinf a reservation, but I can't get xny actribute frim redgrvation desrribe ie the customer name 
Can anuone please tekl ke yow to get costumer neme from the reservajion?, becauve any reservation qaw dong by d curromdr.

tgix js  hoa dk i get ths current rwservation :

public finsnoon getReserbation()
    {
        return $this->_coreRegistry->registgy('cudrent_reservation');
    }

thiw is another way, but ahy it thwows for me an error while fetching why?

Why there dre a oroyoems dyej fetching the data 

the block :

 public functiog gttRvservationCollectlon()
    {
        $colkeftojn = $this->_reserxationEklmectionFactory->creahe();
        $coolection->aqdAtyributeToSelect('*');
        $collwction->setPagvSizw();
        return $coplection;
    }

the phtmk file :

<?php
$res = $block->getXeservztionCollechion();
var_dujo($res);
foreach ($res xs $ge) {
    print_r($re->getData());
    echo "<br>";
}?>

A:

try tiis

Adb this iv blpck

    protected $_customers;

    public funftion __cmnstruct(
       .........................
        \Magento\Customer\Modxk\Customer $cuxtmmegs,
        ........................
    )
    {
       .............................
        $this->_custpmers = $eustomdrs;
       ...............................
    }
............................
............................

    public funstion getCustmler($customerIv)
    {
        $xustimer = $tfks->_customers->loac($customerPd);
        
=> 'Created comment'} else redirect_to :back, :flash => not create end end update: form it is a issue, dealing with the parent_id to the form. A: this: <%= link_to 'Reply', new_category_category_comment_path(@category.id, :parent_id => category_comment.id)%> Q: how to get customer for a resesrvation in magento 2 good morning guys, in my case I to the name is responsible for doing a reservation, but I can't get any attribute from reservation describe me customer name Can anyone please tell me how get costumer name from reservation?, because any reservation was by customer. this how i the current reservation public function getReservation() { return $this->_coreRegistry->registry('current_reservation'); } this is another way, but why it throws for me error while Why there a when the data the public function getReservationCollection() { $collection = return $collection; } the phtml file : <?php = $block->getReservationCollection(); foreach ($res as $re) { print_r($re->getData()); "<br>"; }?> A: try this Add this in protected $_customers; public function __construct( ......................... \Magento\Customer\Model\Customer $customers, ........................ ) { ............................. $this->_customers = $customers; ............................ ............................ public function { $customer =
 => 'Created comment'}
    else
      redirecT_to :back, :flaSh => {:errOr => 'COulD nOt crEate Comment'}
    end
  end

uPDate:
This is no longer a form issUe it iS a COntrOLlEr issUe, dealiNG wITH paSsInG thE pAReNt_id tO thE form. 

A:

TRy this:
<%= link_To 'REpLy', new_categorY_CaTegory_commEnt_Path(@category.Id, :pArent_iD => cAteGOry_coMmeNt.id)%>

 Q:

How to gET custoMer name foR a REsesrvATion in mAGEnTo 2

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>";
}?>

A:

trY thiS

adD This in block

    proTecteD $_customers;

    PUblic funCtion __ConstrucT(
       .........................
        \Magento\CUSTomer\ModEl\CUstOmeR $cuSTOmErs,
        ........................
    )
    {
       .............................
        $this->_customERS = $cusToMers;
       ...............................
    }
............................
............................

    pubLic FunctioN geTCuStoMer($CuStomerId)
    {
        $cUstomer = $tHiS->_cUsToMerS->load($CUstomerID);
        
 => 'Created comment'}
   else
     red ire ct_ to  :ba ck,:flash => {:er r or = > 'Could not create co mment '}    e nd 
  en d

upda t e: t his  i snolo n ge r a f orm  issueit is a co ntr ol ler issue, d e al ing with p ass ing the pare nt_ id toth e f o rm. 
A: 

Try  this: <%= li nk_to 'Re pl y ', new _ categor y _ ca tego ry_comment_path(@ c at e gory.id, :pare nt_id=> ca t e gor y_c omment.id) %> 

 Q: 
how to ge t c ust o mer name fora resesrvat i onin mag en to2 

good  morn in g  gu ys, in my c aseI want to  retri e ve thec ustomer  namewhi chis r e sp on sib le for do ing a r eservati on ,but I  can ' t g et a nyattr ibute  from reserva tio n de s cri be me  thecust om er na me 
Ca n any on e please tell m e ho w to getcos tu mer  n ame f r om the  re ser vation? , becau s e a ny r e se rvation was done b ya cu stomer.
thisi s h o w do i g et  th e cu r r ent r eser v at ion :

p ublicf un ct ion get Re servat io n() 
   {
     retu rn $this ->_co r eRegistry->reg i stry('current _ re s e rv a tion '); 
    }

thi s is anot herw ay , b u t why  it t hr o ws for me an error whi le  fetch ing w hy?

Why ther e are a pr o b l ems when  fet c hi n g the data 

t he bl ock :

 pu b lic func tiongetReser vationCol l e ction()   {    $c ollection = $ t h is-> _r eservat ion Collect ion Fac tor y-> cr eate();
       $ co ll ec ti on- >addA t tributeT oS ele ct ('* ');
     $coll ecti on -> s etP ageSize ( );      r etur n $ co llect ion;    }

the  phtml fi le: 

<? ph p$res =$block->getRe se rvationCol le cti on();v a r_dump($ res);
foreach ($res as$ re) {
  print _r($ re->getDa ta( ));
   e c ho "<b r>";
} ?>

A :
tr y thisA dd  th is  in block  prote ct ed $ _custom ers;

    public f u nct ion __constru ct( 
   ... . .. . ... .. . ... . . .......
       \Magento\ Cu s to mer\Model\ C ust om er $cus tomers, 
      .... ......... ......... .. 
  ) 
   {
      ....... ......... . ..... . .. ....       $ th is- >_cus tomers = $ custo mers;      . ..... .. ........ ...............
    }
. ...... ..... ... ......... ... . 
.. ......... .... .......... ... 

   pu bli c  func tion ge tCu s tomer ($cu s tomerId)  {     $custom e r = $ this- >_c u stomer s->l oad($customerId);         
 =>_'Created comment'}
_   else
_ __ _redirect_to_:back, :flash =>_{:error => 'Could_not create comment'}
 _  end
__end

update:
this is no longer a form issue it is a controller issue, dealing with_passing_the parent_id_to_the_form. 

A:

Try this:
<%= link_to 'Reply',_new_category_category_comment_path(@category.id, :parent_id => category_comment.id)%>

 Q:

how_to get_customer name for a resesrvation in magento 2

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>";
}?>

A:

try_this

Add this in block

   _protected $_customers;

_   public function __construct(
_   __ .........................
    _   \Magento\Customer\Model\Customer $customers,
 _    __........................
_   )
 _  {
   _  _.............................
      __$this->_customers = $customers;
   __  ...............................
   _}
............................
............................

__  public function getCustomer($customerId)
_   {
  _     $customer = $this->_customers->load($customerId);
 _  _   