This is the scenario. Our business sells coupons/deals posted by business owners on our site. A business owner comes in and registers with our site as a “Business Owner” member group. He then gets access to a limited control panel where he enters his profile information into a channel called “Business Profile”. Once this profile has been created, he can add deals through a channel called “Deals”. Each of these deal entries will have a field called “business-name” where he has to enter the exact “title” of the “Business Profile”. I then have a “business-view” template (see fig 1) that lists all open (meaning the status of the “Deal” is “Open”) deals posted by that business alone. I know there is a way to do it through “relationships”.
But due to an installation bug, i am not seeing the custom field options for any field type. I am trying to find a work around as my client doesn’t have time to wait around for the bug fix.
So I did the following:
{preload_replace:bus_title="{exp:channel:entries channel="business_profile" entry_id="{segment_3}” limit=“1” }{title}{/exp:channel:entries}”}
{exp:channel:entries channel="deals" search:business_title="=Business 1" status="open" dynamic="off" }
<!—Print Deal stuff here—>
<li>_ <table class=“deals_bar” width=“100%” cellpadding=“1” cellspacing=“0” border=“0”>_ <tr align=“center”>_ <td align=“left” width=“30%”>strong>{title}</strong></td>_ <td align=“center” width=“15%”>span class=“deal_summary_head”>Value</span><br>{deal_value}</td>_ <td align=“center” width=“15%”>span class=“deal_summary_head”>Discount</span><br>{deal_discount}</td>_ <td align=“center” width=“15%”>span class=“deal_summary_head”>You Save</span><br>{deal_savings}</td>_ <td width=“25%”>span class=“view_deal_button” >View Deal</span></td>_ </tr>_ </table>
<div class=“slide-holder”>
<div class=“slide”>
{deal_excerpt}
</div>
</div>
</li>
{/exp:channel:entries}
But as you can see in fig 1, it displays all the deals from all business profile and not just the one in the search filter. Is there a better way to filter the results in order to only obtain the deals that have the “business name” same as the “title” of the business profile?
Thanks
Muthu