1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Step 7 (preview) with Extra Field...

Discussion in 'Templates, HTML, CSS, and Design Help' started by PatriceB, Jan 10, 2012.

  1. PatriceB New Member

    Hi all,

    Is there a way to display extra field on the step7 (preview) on the checkout process...

    We use : {get_extra_field id=$view fid=54} in our viewlisting.tpl... but in our step7 that don't seem to work...
  2. Mike-N-Tosh Owner

    Didn't you already ask this question here which the answer has already been given?
  3. PatriceB New Member

    Thanks Mike your right ;)

    My other question is there a way to have specific preview template for categorie in the step7 checkout...

    {if $lDisplay==1 || !isset($lDisplay)}
    {include file="preview.tpl"}
    {else}
    {include file="preview.tpl"}
    {/if}

    In our step3 we change in the includes/core/checkout/step3.tpl for something like this :

    if($category==2)
    {
    $class_tpl->assign('body','checkout/step3-location.tpl');
    }
    elseif($category==3)
    {
    $class_tpl->assign('body','checkout/step3-location.tpl');
    }
    else
    {
    $class_tpl->assign('body','checkout/step3-echange.tpl');
    }


    How can we do the same thing for the step7...

    Thanks
  4. seymourjames All Hands On Deck

    If your viewlisting.tpl is decomposed into various types of display depending upon the category for that lsiting it should render the display in checkout step 7 automatically because that step is simply including the viewlisting.tpl template file. As an aside, making too many core file changes can make upgrades increasingly difficult.
  5. PatriceB New Member

    I can't use the viewlisting.tpl

    Because in my viewlisting.php i use {get_extra_field id=$view fid=101} to display extra fields,

    But in step7 i need to use : {get_extra_field id=$listingid fid=101}

    If i use {get_extra_field id=$listingid fid=101} in the viewlisting.php my extra fields don't show up.
  6. Mike-N-Tosh Owner

    Sure you can, just do something like this:
    Code:
    {if $view}
    {get_extra_field id=$view fid=101}
    {else}
    {get_extra_field id=$listingid fid=101}
    {/if}
    Another option might be to make two copies of your viewlisting.tpl. Save one as "listingview.tpl" and one as "checkoutview.tpl" In the "checkoutview.tpl" use {get_extra_field id=$listingid fid=101} for your extra fields.

    Then in your viewlisting.tpl file only put:
    Code:
    {if $view}
    {include file='listingview.tpl'}
    {else}
    {include file='checkoutview.tpl'}
    {/if}
    When there's a will.... There's upset relatives! :D
  7. seymourjames All Hands On Deck

    Why are you modifying your viewlisting.php file. You only need to modify the viewlisting.tpl file.

    However, see if this works anyway below. In your checkout step7.tpl file just before the text to set the display, just put this; I would be interested to know if it works.

    {assign var=$view value=$listingid}
  8. PatriceB New Member

    Can i just replace

    {if $lDisplay==1 || !isset($lDisplay)}
    {include file="viewlisting.tpl"}
    {else}
    {include file="viewlisting.tpl"}
    {/if}

    from the step7.tpl by

    {if $section == 1}
    {include file="preview-echange.tpl"}
    {elseif $section == 2}
    {include file="preview-location.tpl"}
    {else}
    {include file="preview-hote.tpl"}
    {/if}

    if else work, but if i add elseif that don't work...
  9. freeze2 Super Moderator

    I use this exact method as Mike explained and it works 100 %
  10. seymourjames All Hands On Deck

    Mike gave you a solution and I did too (worth testing). Why are you not implementing it? You are making template files and including them but do they have php files too passing the variables?
  11. PatriceB New Member

    I have 3 different looking viewlisting.tpl according to the category :
    viewlisting-location.tpl
    viewlisting-hote.tpl
    viewlisting-echange.tpl

    All 3 have different design, so i can't use the

    {if $view}
    {include file='listingview.tpl'}
    {else}
    {include file='checkoutview.tpl'}
    {/if}

    So i need a way to have my design according to the category in my checkout preview...

    in my step7.tpl if i need to use something like that but it don't seem to work :

    {if $section == 1}
    {include file="preview-echange.tpl"}
    {elseif $section == 2}
    {include file="preview-location.tpl"}
    {else}
    {include file="preview-hote.tpl"}
    {/if}

    Thanks
  12. seymourjames All Hands On Deck

    Why are you using $section? Is the categoryid not available? Use the smarty debug to see what variable is available to that checkout template.
  13. PatriceB New Member

    I activated the debug in step7,

    and no categoryid or category are available...
  14. seymourjames All Hands On Deck

    You may need to pass the variables from step to step through the checkout process.
  15. PatriceB New Member

    Can you tell me how?

    thanks
  16. seymourjames All Hands On Deck

    set up a variable to pass from one checkout step to another via the php files and into each template file.

Share This Page