Timeline for Get product list by category id in view.phtml
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
Jun 24, 2014 at 1:46 | comment | added | Rajeev K Tomy | However your intention is not at all a good idea. As category increases, page loading time also increase | |
Jun 24, 2014 at 1:45 | comment | added | Rajeev K Tomy |
$categoryIds=array(1,2,3,4);foreach($categoryIds as $id){$this->_defaultCategoryId =$id;$this->getLoadedProductCollection();}
|
|
Jun 24, 2014 at 1:41 | comment | added | Rajeev K Tomy |
If you are using above provided method inside module's list.phtml, you will achieve what you need. If it didnt work, you can try $this->_defaultCategoryId = 1;$this->getLoadedProductCollection(); . In any case, you may need to change our variable from protected to public
|
|
Jun 24, 2014 at 1:37 | history | edited | Rajeev K Tomy | CC BY-SA 3.0 |
deleted 1 character in body
|
Jun 23, 2014 at 17:32 | comment | added | blisstdev | This is useful in some context, but what I want to do is send list.phtml one category id after another as I iterate through categories...I'm not seeing how to do this given your solution. do I send it $this->setDefaultCategoryId(id)->getLoadedProductCollection? Am I missing something? | |
Jun 23, 2014 at 10:35 | comment | added | Rajeev K Tomy | @DavidManners : I have edited my answer. Thanks for your valuable comment | |
Jun 23, 2014 at 10:34 | history | edited | Rajeev K Tomy | CC BY-SA 3.0 |
added 5056 characters in body
|
Jun 23, 2014 at 8:26 | comment | added | Rajeev K Tomy | @DavidManners : I will surely do it. I dont have time right now. I will do it today itself. | |
Jun 23, 2014 at 8:22 | comment | added | David Manners | feel free to share your answer in full here, or add this link as a comment rather than a complete answer | |
Jun 23, 2014 at 8:10 | history | answered | Rajeev K Tomy | CC BY-SA 3.0 |