1

I have Sales page as category.

I am using observer (catalog_Product_Collection_Load_Before) to filter products which to be shown in frontend.

But I am getting only products connected to the current category (Sales).

How to modify collection to get other products, not related with current category?

  • 3
    Why can't you just add products to this category? – SeStro Dec 14 '15 at 23:25
  • Actualy it helped. But in this case i need to control this option automatily with some script. – CssMasters Dec 19 '15 at 19:59
1

Good point by SeStro.

Beside this: You only get products you filter for. The collection filters for products in the category, therefore you only get them. To remove the filter, you have either to manipulate the select directly or call $collection->reset()

But both are bad ideas, because you don't know the side effects.

So back to the suggestion by SeStro: You have a category, put products into you want to have for sale

0

I found the little hack in magentos libs.

There is possibility to use setPart for Select object

https://docs.magentocommerce.com/Varien/Varien_Db/Varien_Db_Select.html#setPart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.