Jump to content

Authentication - if $back

Recommended Posts


please help. I need modify Order steps when people come from page 'my-account', but if they come from page 'order' skin of Order steps will not be same.

I thought, that I can do it as:

{if $back != my-account.php}{include file=$tpl_dir./order-steps2.tpl}{/if} 

But it do nothing. Does anybody know, how I can create condition 'if $back != something' ?


Link to comment
Share on other sites

before you can use $back variable at tpl file, you must assign it to smarty then you can use it
You can do this at .php file.

I am not sure what page you are going use it. Here is just an example.

In xyz.php

$back = Tools::getValue('back');

Then in xyz.tpl file

{if $back != 'my-account.php'} some of your other code {/if} 

Link to comment
Share on other sites

Thanks a lot, it help me. I have one other problem. I use $back in userinfo.tpl and I have there two icons - key as login and cart for order. I need other image of login when people come on authentication.php from my-account.php then they come from other page and I need other image of cart when people come on authentication.php from order.php then other page. Your code help me with login icon, but with cart no, I don't know why. Please help.

Here is my code:

<!-- Block user information module HEADER -->

{if $page_name != 'my-account'}{if $back != 'my-account.php'}{else}{/if}{/if}
   {if $logged}
{l s='My account' mod='blockuserinfo'}
{l s='Log out' mod='blockuserinfo'}
<br>       {else}<br><ul> 
{l s='Log in' mod='blockuserinfo'}
<br>       {/if}<br><br><br><a href="%7B%24base_dir_ssl%7Dorder.php" rel=""></a><div>{if $page_name != 'order'}{if $back != 'order.php'}{else}{/if}{/if}</div>
<a href="%7B%24base_dir_ssl%7Dorder.php" rel=""></a

Thank you.

Link to comment
Share on other sites

  • 1 year later...

Help us?


I'm having problems in the checkout process, when users want to complete your order click the checkout process does not go to the next page of the checkout process, the user should go to the login page or create an account.


Here even blank page. Link like this> authentication.php? Back = order.php 3Fstep% 3D1%


How do I resolve this?

Link to comment
Share on other sites

  • Create New...