Sidebar

startup_tutorial_and_checklist:design_configuration:smarty_template_code_extensions:seller_group_display

Display Based On Seller User Group

This tutorial should allow you to choose something to display based on the user group of the seller of a listing. This means that this code will ONLY work within the listing details pages.

You will user smarty code to create a loop within the listing details page. By default the templates assigned to that page are these:

/main_page/listing_classified.tpl (default classified details template)
/main_page/listing_auction.tpl (default auction details template)
/main_page/listing_page.tpl (default assigned page template)

But of course you could have changed them. If that has happened you'll need to edit those templates.

You'll base your loop of the value of the following variable:

{$seller_data_raw.group_id}

You would create a loop like this one:

{if $seller_data_raw.group_id == 1}
    this seller is a member of user group 1 so display something specifically for that user group

{elseif $seller_data_raw.group_id == 2}
    this seller is a member of user group 2 so display something specifically for that user group

{else}
    this is not a member of user group 1 or 2 

{/if}

<tip c n>The software already has a "sponsored by" feature within each user group to allow you to display seller user group specific html within the listing details page. This tutorial will allow you do do more than one individual display per seller user group</tip>

startup_tutorial_and_checklist/design_configuration/smarty_template_code_extensions/seller_group_display.txt · Last modified: 2015/05/08 22:54 by geojames