Jump to content

Display based on shop ID


weckie

Recommended Posts

HI.

 

I would like to display a message in the shoppingcart, the one that shows up when you hover over your shoppingcart.

 

I need a message displayed based on the shop id.

 

i tried this, in the BLOCKCART.TPL file but it shows nothing:

 

{if $id_store EQ '3'}

{l s='message to be displayed' mod='blockcart'}

{/if}

 

I am not sure if $id_store is the right syntax, i also tried $id_shop, $shopID but nothing didn't work.

 

thx for you help in advance

 

We work with prestashop 1.6

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

 

you can get id of shop from {$cart} object

use:

{if $cart->id_shop==1}
do something
{/if}

Worked perfectly Vekia.  Thanks so much.

 

Do you know if there is some kind of overview with syntaxes to use to display things?

 

Kind regards

Link to comment
Share on other sites

  • 4 years later...
  • 2 years later...

How can this kind of logic be achieved in the invoice pdf?
How can we target the id_shop there for a condition?

 

{if $this->id_shop == 13}

<img src="{$logo_path}" style="width:100px; height:15px;" />

<p> if test </p>

{else}

<img src="{$logo_path}" style="width:100px; height:35px;" />

<p> else test</p>

{/if}

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...