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...
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
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.
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.
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!
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}
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...
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?
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
Why are you using $section? Is the categoryid not available? Use the smarty debug to see what variable is available to that checkout template.
set up a variable to pass from one checkout step to another via the php files and into each template file.