+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Change text phrase for step_done.tpl?

  1. #1

    Change text phrase for step_done.tpl?

    Dear all,

    With help of Curtis I made this listing type key 'biz' to need approval while others are auto approved according to admincp. One thing left is to change the step done phrase. Which I found in this file:
    templates/controllers/add_listing/step_done.tpl
    In this find is this code:

    <div class="text-notice">
    {if $config.listing_auto_approval}
    {assign var='done_phrase_key' value='notice_after_listing_adding_auto'}
    {else}
    {assign var='done_phrase_key' value='notice_after_listing_adding'}
    {/if}

    {phrase key=$done_phrase_key}
    </div>
    I want to add listing type 'biz' to show phrase saying that listing need approval so I add

    <div class="text-notice">
    {if $config.listing_auto_approval || $listingType.Key != 'biz'}
    {assign var='done_phrase_key' value='notice_after_listing_adding_auto'}
    {else}
    {assign var='done_phrase_key' value='notice_after_listing_adding'}
    {/if}

    {phrase key=$done_phrase_key}
    </div>
    But it always show value='notice_after_listing_adding_auto', even though I add listing in biz listing type. Did I do something wrong?

  2. #2
    Hello Wei, isn't it $listing_type.Key? i'm not sure.

  3. #3
    Quote Originally Posted by Bahram Soltanirad View Post
    Hello Wei, isn't it $listing_type.Key? i'm not sure.
    Yes Bahram thank you. It actually the correct one.
    Last edited by Wei Hong; March 29, 2018 at 01:33 AM.

  4. #4
    Quote Originally Posted by Bahram Soltanirad View Post
    Hello Wei, isn't it $listing_type.Key? i'm not sure.
    Hi Bahram, do you happen to know code for category key as well?
    I tried:

    $listing.Category_Key
    $listing.Category_ID
    $category.Key
    $category.ID

    None above works.

    I tried to add additional category to the code, the listing type works thanks to your correction.

    {if $config.listing_auto_approval && $listing_type.Key != 'biz' && $listing.Category_ID != 'service_car'}
    {assign var='done_phrase_key' value='notice_after_listing_adding_auto'}
    {else}
    {assign var='done_phrase_key' value='notice_after_listing_adding'}
    {/if}

    {phrase key=$done_phrase_key}

  5. #5
    Try $listing_data.Category_ID

  6. #6
    Hi Bahram,

    Thanks for your reply. I just tried it and it didn't work ((((

  7. #7
    Quote Originally Posted by Wei Hong View Post
    Hi Bahram,

    Thanks for your reply. I just tried it and it didn't work ((((
    hmmm...please try $manageListing->category.name or $manageListing->category.ID

  8. #8
    Hello Wei,

    try to print: {$listing_type.Key}
    then {$listing.Category_ID}
    Category_ID it is numeric variable and connot be 'service_car'

    also you can use phrase variable: $done_phrase_key like {$lang.$done_phrase_key}
    Viktor,
    Flynax technical department,
    Best wishes.

  9. #9
    Quote Originally Posted by Bahram Soltanirad View Post
    hmmm...please try $manageListing->category.name or $manageListing->category.ID
    Thanks Bahram, unfortunately it doesn' work either.

    Quote Originally Posted by Viktor View Post
    Hello Wei,

    try to print: {$listing_type.Key}
    then {$listing.Category_ID}
    Category_ID it is numeric variable and connot be 'service_car'

    also you can use phrase variable: $done_phrase_key like {$lang.$done_phrase_key}
    Hi Viktor,

    I don't understand. Did you mean me to change to below:

    {if {$config.listing_auto_approval} && {$listing_type.Key} != 'biz' && {$listing_data.Category_ID} != 'service_car'}}
    {assign var='done_phrase_key' value='notice_after_listing_adding_auto'}
    {else}
    {assign var='done_phrase_key' value='notice_after_listing_adding'}
    {/if}

    {phrase key=$done_phrase_key}
    Can I use category Key 'service_car' instead of number ID?
    (

  10. #10
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,174
    Wei Hong,

    Actually, Bahram's example is correct,

    He only forgot to mention to use curly brackets

    so you can display category name or its key:

    {$manageListing->category.name} or {$manageListing->category.Key}

+ Reply to Thread