Jump to content

Prestashop multishop sharing same data causes issues


shri

Recommended Posts

Hi, 


I have multishop so i need to check which shop is currently being used to determine which copyright text to display. Can anyone help?


 


this is the code from block cms


<div>

Copyright © toorakcomputerservices.com.au 1997-2015

</div>

 

if url = i.net.au 

than

Copyright © toorakcomputerservices.com.au 1997-2015

else 

Copyright &copy malverncomputerservices.com.au 1997-2015

 

Can anyone help ??

Edited by shri (see edit history)
Link to comment
Share on other sites

{assign var="url" value=$smarty.server.HTTP_HOST$smarty.server.REQUEST_URI}
{if $url=="http://toorakcomputerservices.com.au}
<div>
Copyright © toorakcomputerservices.com.au 1997-2015
</div>
{else}
<div>
Copyright © malverncomputerservices.com.au 1997-2015
</div>
{/if}

 

This code does not work. it shows error

Edited by shri (see edit history)
Link to comment
Share on other sites

In the .tpl file use this:

 

{if $shop_name == 'shop 1 name'}
	<div>
		Copyright © toorakcomputerservices.com.au 1997-2015
	</div>
{elseif $shop_name == 'shop 2 name'}
	<div>
		Copyright © malverncomputerservices.com.au 1997-2015
	</div>
{/if}

 

 

See http://blog.premium-templates.eu/global-smarty-variables-in-prestashop

Edited by skinnybloke (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...