Jump to content

change logo img depending on supplier


zubator

Recommended Posts

(sorry for my english)

Hi

 

I'm using presta 1.4 and I'd like to change logo image depending on id_supplier something like

{if $product->id_supplier == 1}

 

{else}

 

{/if}

 

but how I can correctly define variable product in header.tpl like in product.tpl

Link to comment
Share on other sites

(sorry for my english)

Hi

 

I'm using presta 1.4 and I'd like to change logo image depending on id_supplier something like

{if $product->id_supplier == 1}

 

{else}

 

{/if}

 

but how I can correctly define variable product in header.tpl like in product.tpl

 

hello

 

you want to change shop logo depending on supplier id?

 

please give us more information :)

 

regards

Link to comment
Share on other sites

in my opinion is better to use logo only for:

7mAGGVr.png

 

remove the number from the logo etc.

 

 

then you can easily add number in the header.tpl file,

 

with {if} conditions you can display number depend on supplier id

Link to comment
Share on other sites

in the front controller you can define product object, then put it into smarty array:

 

$product_object = new Product (Tools::getValue('id_product'));

$this->context->smarty->assign(array('product_object'=>$product_object));

 

then in header.tpl you can use $product_object variable.

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