Start a new topic
Answered

Get matched

Hi, On the referral page it asks the user to 'Select a Specialty' and there is a tab with all the sub categories listed. Instead of the sub categories listed I would like the professions listed (main category). I tried tinkering with the widget code but couldn't get it to work because I don't know the variables. Brillz



Best Answer
Hi Brillz, I have made the needed changes on your site in order to make this work. The Widgets changed were the Default Email Lead Details widget on line 25 (Added a query to grab the corresponding Profession instead of Service) so it looks like this now:
 
$prome=mysql($w[database],"SELECT name FROM list_professions WHERE profession_id = $lead[service]");
while ($prothis=mysql_fetch_assoc($prome)) {
    echo $prothis[name];
}

 

and with it you can see the Lead Match information correctly for this change and I also edited the Lead Page Layout - Step 1 widget so it shows your clients the correct Profession information when filling out the form. In this case the Top level Categories. The changes between line 10 and 20 are the following:
<h3>Select a <?=$Label[listing_details]?>:</h3>
    <select name="service[]"
            style="font-size: 16px; color: rgb(74, 74, 74); margin-bottom: 25px; border-radius: 5px 5px 5px 5px; padding: 6px; width: 282px;">
        <option value="">(select a <?=$label[listing_details]?>)</option>
        <?
        $proresults=mysql($w[database],"SELECT * FROM `list_professions` GROUP BY `name` ORDER BY `name` ASC");
while ($serv=mysql_fetch_assoc($proresults)) { ?>
        <option value="<?=$serv[profession_id]?>"><?=$serv[name]?></option>
        <? } ?>
    </select>
</div>

 

Please verify if it works correctly. Thanks Brillz.

 


Hi Brillz, 


Please follow these simple steps and you'll have top level categories on the Get Matched page instead of the Sub-Categories. 

1. Go to Toolbox >> Widget Manager >> Lead Page Layout - Step 1



2. Then in the Widget code add this code:


<div class="project" style="width: 300px; display: inline; float: left;">

    <h3>Select a <?=$Label[service]?>:</h3>

    <select name="service[]"

            style="font-size: 16px; color: rgb(74, 74, 74); margin-bottom: 25px; border-radius: 5px 5px 5px 5px; padding: 6px; width: 262px;">

        <option value="">(select a <?=$label[service]?>)</option>

        <?

        $proresults=mysql($w[database],"SELECT * FROM `list_services` GROUP BY `name` ORDER BY `name` ASC");

while ($serv=mysql_fetch_assoc($proresults)) { ?>

        <option value="<?=$serv[service_id]?>"><?=$serv[name]?></option>

        <? } ?>

    </select>

</div>


The code should be pasted after the line #9. 



It should looks like this screenshot 




3. Don't forget to click on "Save" and then go back to your "Get Matched" page and refresh it. 


Hope this helps! :) 





1 person likes this
It is still not showing the service
Hi Brillz, can you email me at luis@brilliantdirectories.com with you site's name and any additional information so I know the specifics of your problem and where to solve it. Thanks bud.

 

Answer
Hi Brillz, I have made the needed changes on your site in order to make this work. The Widgets changed were the Default Email Lead Details widget on line 25 (Added a query to grab the corresponding Profession instead of Service) so it looks like this now:
 
$prome=mysql($w[database],"SELECT name FROM list_professions WHERE profession_id = $lead[service]");
while ($prothis=mysql_fetch_assoc($prome)) {
    echo $prothis[name];
}

 

and with it you can see the Lead Match information correctly for this change and I also edited the Lead Page Layout - Step 1 widget so it shows your clients the correct Profession information when filling out the form. In this case the Top level Categories. The changes between line 10 and 20 are the following:
<h3>Select a <?=$Label[listing_details]?>:</h3>
    <select name="service[]"
            style="font-size: 16px; color: rgb(74, 74, 74); margin-bottom: 25px; border-radius: 5px 5px 5px 5px; padding: 6px; width: 282px;">
        <option value="">(select a <?=$label[listing_details]?>)</option>
        <?
        $proresults=mysql($w[database],"SELECT * FROM `list_professions` GROUP BY `name` ORDER BY `name` ASC");
while ($serv=mysql_fetch_assoc($proresults)) { ?>
        <option value="<?=$serv[profession_id]?>"><?=$serv[name]?></option>
        <? } ?>
    </select>
</div>

 

Please verify if it works correctly. Thanks Brillz.

 


1 person likes this
Thanks Luis! It's working