A product can be enabled in several Magento websites. How can I get a list of these websites based on a product SKU?
Obviously, there is no $product->getWebsites()
.
Looks like this information is in the table catalog_product_website
, but I'd prefer solving this without direct SQL.
mysql> select * from catalog_product_website;
+------------+------------+
| product_id | website_id |
+------------+------------+
| 1 | 3 |
| 2 | 3 |
| 3 | 3 |
| 1 | 4 |
| 2 | 4 |
$product->getWebsiteIds()
?