As a beginner i dont know much about custom .my query is On my product page it shows 3 related product only. i want to add one more related product here. how to do this. Thanks for any advice


If you do not see more related products in frontend by default, then you can edit code and set your count to show more related products. If you are using custom theme then go to app/design/frontend/Your_Package/Your_Theme/template/catalog/product/list/related.phtml

and check for

foreach($this->getItems() as $_item):

in that file. There you add condition for checking count as per your requirement. Hope this will help you.

| improve this answer | |
  • Thankx for help but could you tell me how to used count here . my code is – Sohan Singh Feb 19 '18 at 10:27
  • <ol class="mini-products-list" id="block-related"> <?php foreach($this->getItems() as $_item): ?> <li class="item"> <?php if(!$_item->isComposite() && $_item->isSaleable()): ?> <?php if (!$_item->getRequiredOptions()): ?> – Sohan Singh Feb 19 '18 at 10:27
  • You can write like this: <?php $i = 0; ?> <?php foreach ($this->getItems() as $_item): ?> <?php if ($i++ == 4) break; ?> <li class="item"> <?php if (!$_item->isComposite() && $_item->isSaleable()): ?> <?php if (!$_item->getRequiredOptions()): ?> – Sayan Basak Feb 19 '18 at 10:38
  • no bro, Its still display only 3 related product .. i want to add one more here .i had already add 5 related product from backend but displaying only 3 – Sohan Singh Feb 19 '18 at 10:46
  • Is your cache enabled?If yes then clear the cache once and check and let me know if it is still showing 3. – Sayan Basak Feb 19 '18 at 10:47

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.