Jump to content

Show all produts in one store from multistores


Recommended Posts

Is there any way when somebody click in my multistore on some category, for example in store which has id 1, to show all products from that shop and other shops who have the same category?
 
Now i have this code but I do not know how to put code to show all produts as I wish:

$category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id);
$products = $category->getProducts((int)Context::getContext()->language->id);

I found that the same thing exist in Administration and it use: Shop::setContext(Shop::CONTEXT_ALL)

 

What I need to change in this code or I need to make change somewhere else in code to get result as I wish?

 

 

Link to comment
Share on other sites

×
×
  • Create New...