Jump to content

How to get the logo URL of multistores?


MFLM

Recommended Posts

Hi all

 

I need to get the logo of a specific store, with PHP.

 

The variable is shop_logo, I saw in the emails templates, but I don't the code to get the url.

 

For example to the name is:

$shop_name = strval(Configuration::get('PS_SHOP_NAME'));

 

 

Thanks 

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

  • 1 year later...

_PS_IMG_.Configuration::get('PS_LOGO') gets "URI" for logo of default shop.

If we have a look to the "get" function, has following arguments

Configuration::get($key, $idLang = null, $idShopGroup = null, $idShop = null, $default = false) {

So if you set $idShop while calling it, just like: 

_PS_IMG_.Configuration::get('PS_LOGO', null, null, 5)

you're going to get the logo of the your 5th shop.

 

Tips:

  • You may use ShopUrl or Link classes for getting URL instead of a URI
  • The Context class provides you the shop ID easily 

Good luck 

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