Toon Van Dooren
Toon Van Dooren

Reputation: 613

Magento checking if product is available in multiple sites

I have a magento-setup with multiple websites and multiple stores and i want to check if stores contain the same product programmaticly. Because i am writing a module for it I rewrite the product block so i can acces $this->product()->getid() with no problem. I checked the list ($this->product()) for websites but i cant find it there. Any idea how i start with this?

Upvotes: 1

Views: 3630

Answers (1)

Nasaralla
Nasaralla

Reputation: 1839

Have you tried ?

$this->product()->getWebsiteIds();

It will give you an array of website ids the product is active on.

You can also do,

$this->product()->getStoreIds();

Upvotes: 5

Related Questions