Elxis CMS Forum

Support => Technical support => Topic started by: Davide on March 27, 2011, 21:24:45

Title: php code if - kind of user specification
Post by: Davide on March 27, 2011, 21:24:45
&& $my->id) -> That is is a registered user
$iscustomer = $resmaster->isCustomer($hid); -> That is the check giving a customer user

How can I "upgrade" my code to get -> Check a customer and allow comment only when checked-out from the reservation and post limit to 1 post per Customer?
Title: Re: php code if - kind of user specification
Post by: ks-net on March 27, 2011, 21:57:26
ios res already has a function to choose who can comment a hotel...

registered
customers  <---this is what you want... it is already there
none

****

why one comment per customer/per hotel ?
what if this guy have made more than one reservations in this hotel?


lets say you make things  this way->  one comment  per customer/per reservation/per hotel
what if the customer makes a comment.. the hotelier responded... then customer will have no option to reply?

Title: Re: php code if - kind of user specification
Post by: Davide on March 27, 2011, 22:09:50
lets say you make things  this way->  one comment  per customer/per reservation/per hotel
That's right. But I'm trying to understand how to make the code including that limitation.
what if the customer makes a comment.. the hotelier responded... then customer will have no option to reply?
that's the second question how to identify the hotelier? i want to deny the possibility to comment. I don't want the answer, i just need the impression from guests

&& $my->id) -> That is is a registered user
$iscustomer -> i didn't find the key for hotelier