0

Can I add a product in category page product collection?

I want to add product #123 in category page product collection but the same product already exists in the collection so it is possible?

My concern is I want to repeat products on the category page multiple times. with pagination and filter working so any have an idea about this. like ento

0

With Magento, it is best to work with the system rather than against. Regarding your requirement, you have already spotted that your difficulty is to add your changes whilst you keep layer and pagination working.

My thought is to find a solution that fits with magento inner workings: I assume there is some business logic for these 3 products to be replicated on top of your category product listing.

Then, I would add a module/script/cron of some sort that has this business logic built in. This module would crawl the categories in your system and extract the products that match your requirements. Then a duplicate of these extracted products would be created programmatically and assigned to the category. Finally, when these products would be rendered on the category page, you would then customise the rendering of these products to alter their add to cart link, swatches and so on to trigger the right action for you..

--> this solution above is lot less complex but also more flexible/scalable to further needs, enhancement you will have.

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.