Need advise

7 posts by 2 authors in: Forums > CMS Builder
Last Post: September 14, 2010   (RSS)

By thenetgirl - September 13, 2010

Originally the contact person was pulled by created.by but they hire receptionists so i hard coded that info on the page. Now 1 of the agents wants her contact info on her rentals. And I am not sure how to include that just for her.

Agents have homepages

http://www.montereyrentals.com/VacationRentalsDetail.php?65-17-162
Patricia

www.thenetgirl.com

Re: [thenetgirl] Need advise

By Chris - September 13, 2010

Hi thenetgirl,

Could you please post the complete PHP source code for that page?
All the best,
Chris

Re: [chris] Need advise

By thenetgirl - September 13, 2010

here ya go
Patricia

www.thenetgirl.com

Re: [thenetgirl] Need advise

By Chris - September 13, 2010 - edited: September 14, 2010

Hi thenetgirl,

I have an idea: how about a checkbox in your Accounts section called Display Contact Info? On your detail page, you can use an IF-ELSE to display either the record's created.by contact info or your hardcoded defaults, depending on whether the checkbox is checked.

<?php if ($vacation_rentalsRecord['createdBy.display_contact_info']): ?>
<!-- insert your old createdBy code here -->
<?php else: ?>
<!-- insert your hardcoded contact info here -->
<?php endif ?>


Does that make sense? Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Need advise

By thenetgirl - September 13, 2010

I tired this didnt work

<?php echo $vacation_rentalsRecord['display_contact_info'] ?> </b><font size="2">
<br>
<b> Email: </b>
<!-- insert your old created.by code here -->
</font>

<b> <?php echo $vacation_rentalsRecord['homepages.name'] ?></b></p>
<p align="center">
<font size="2"><b>Phone: </b> <?php echo $vacation_rentalsRecord['homepages.phone'] ?></font><p align="center">
<font size="2"><b>Email: </b> <a href="mailto:<?php echo $vacation_rentalsRecord['homepages.email'] ?>"><?php echo $vacation_rentalsRecord['homepages.email'] ?></a>

<?php else: ?>
</font>
<p align="center">
<font size="2">
<!-- insert your hardcoded contact info here -->
<b> Email: </b>
</font>
<span style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31, 73, 125);">
<a href="mailto:Reservations@MontereyRentals.com">
<font color="#2A4480">
Reservations@MontereyRentals.com</font></a></span></font><font color="#2A4480" face="Verdana"><span style="font-size: 11pt; font-family: Calibri,sans-serif">
</span>




<p align="center">
</font><b>
<font face="Verdana" size="2" color="#0E8A8A">
or Phone: </font></b>
<font color="#2A4480" size="2" face="verdana">
831-655-7840</font><font color="#0E8A8A" face="Verdana"></p>
<?php endif ?>





----------------- I decided ['display_contact_info'] wasnt part of $vacation_rentalsRecord

so I tried to add the account info <?php foreach ($accountsRecords as $record): ?>
<?php echo $accountsRecords ['display_contact_info'] ?>

didnt work

tried different variation of

echo $vacation_rentalsRecord['createdBy.fullname'];
echo $vacation_rentalsRecord['createdBy.email'];
echo $vacation_rentalsRecord['createdBy.phone_number'];


What am I missing???
Patricia

www.thenetgirl.com

Re: [thenetgirl] Need advise

By Chris - September 14, 2010

Hi thenetgirl,

Sorry, that was meant to read $vacation_rentalsRecord['createdBy.display_contact_info']. I've fixed my post above.

Does this work for you?

<?php if ($vacation_rentalsRecord['createdBy.display_contact_info']): ?>
<?php echo $vacation_rentalsRecord['createdBy.fullname']; ?><br />
<?php echo $vacation_rentalsRecord['createdBy.email']; ?><br />
<?php echo $vacation_rentalsRecord['createdBy.phone_number']; ?><br />
<?php else: ?>
Hardcoded<br />
Contact<br />
Info<br />
<?php endif ?>

All the best,
Chris